Compiling openssl generates a number of error messages as make executes
openssl on host, producing errors: "wrong ELF class: ELFCLASS32". These
errors trigger buildbot failures as described in issue 5432 [1] at
openwrt/packages Github repo.

This patch fixes issue 5432 by removing demo certificates from the
build directory. The demo certificates are not necessary for compiling
or packaging openssl on OpenWrt.

[1] https://github.com/openwrt/packages/issues/5432

Signed-off-by: Val Kulkov <val.kul...@gmail.com>
---
 package/libs/openssl/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index b75aa45..d25c248 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -208,6 +208,9 @@ TARGET_CFLAGS += $(FPIC) -I$(CURDIR)/include 
-ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
 
 define Build/Compile
+       # Remove demo certificates to avoid execution of openssl on host 
triggering buildbot failures:
+       # ERROR: ld.so: object <...> libcrypto.so.1.0.0 from LD_PRELOAD cannot 
be preloaded (wrong ELF class: ELFCLASS32)
+       -rm $(PKG_BUILD_DIR)/certs/demo/*.pem
        +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
                CC="$(TARGET_CC)" \
                ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \
-- 
2.7.4


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to