OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Build Failure
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Medium
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Florian Fainelli - 01.03.2017
Last edited by Florian Fainelli - 02.03.2017

FS#572 - OpenSSL STAMP_CONFIGURED can lead to filename too long

Build OpenSSL with the default set of options, the STAMP_CONFIGURED line can result in the following:

rm -f /home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_*
touch /home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2
touch: cannot touch ‘/home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2’: File name too long
Makefile:258: recipe for target ‘/home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2’ failed

Which is a filename too long for “touch” from Ubuntu 16.10, coreutils-8.25-2ubuntu2.

OpenSSL .config:

fainelli@fainelli-laptop:[~/../trunk]$ grep -i openssl .config
# CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL is not set
CONFIG_PACKAGE_libopenssl=m
CONFIG_OPENSSL_WITH_EC=y
# CONFIG_OPENSSL_WITH_EC2M is not set
# CONFIG_OPENSSL_WITH_SSL3 is not set
CONFIG_OPENSSL_WITH_DEPRECATED=y
# CONFIG_OPENSSL_WITH_DTLS is not set
# CONFIG_OPENSSL_WITH_COMPRESSION is not set
CONFIG_OPENSSL_WITH_NPN=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SRP=y
# CONFIG_OPENSSL_HARDWARE_SUPPORT is not set
# CONFIG_OPENSSL_ENGINE_CRYPTO is not set
# CONFIG_PACKAGE_libevent2-openssl is not set
# CONFIG_PACKAGE_libustream-openssl is not set
# CONFIG_PACKAGE_openvpn-openssl is not set
CONFIG_PACKAGE_openssl-util=m

Closed by  Florian Fainelli
02.03.2017 02:08
Reason for closing:  Fixed
Additional comments about closing:  

https://git.l ede-project.org/?p=source.git;a=commitdi ff;h=9e740fa5a51fee102671209273f01798ea1 d7694

Project Manager
Florian Fainelli commented on 01.03.2017 06:07

Proposed fix:

diff –git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 73811e16da97..1aa0677d0d10 100644
— a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -168,7 +168,7 @@ else

 endif

endif

-STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(subst $(space),_,$(OPENSSL_OPTIONS))
+STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(subst $(space),,$(patsubst no-%,n,$(OPENSSL_OPTIONS)))

define Build/Configure

      [ -f $(STAMP_CONFIGURED) ] || { \
Hannu Nyman commented on 01.03.2017 07:18

Or maybe something similar as in:

"rules.mk: make PKG_CONFIG_DEPENDS properly track string values"

https://git.lede-project.org/?p=source.git;a=commitdiff;h=5ef0854b1109ba2dbd1dd3d9f87ce5801002d0ba;hp=d49ddcdfd27ba3d171b856f223712b88d5fc2046

After that commit the hash of the configure options string is added, instead of the cleartext options string. (That is the bc7334694fa4b40acb40d6b11be8a816 in the above example's filename)

Project Manager
Florian Fainelli commented on 02.03.2017 02:08

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing