Skip to contentSkip to conversation

netsnmp: remove --with-openssl=PATH configure option

PATCH New Yu, Mingli 1 participant 1 message Feb 5, 2021

lore
Share & tools
lore

Yu, Mingli

author
#0 lore raw

PATCH 1/1 netsnmp: remove --with-openssl=PATH configure option

From: Mingli Yu <[email protected]>

The openssl already added in DEPENDS and the openssl related library will be in recipe-sysroot. So it's meanlingless to add the configure option "--with-openssl=${STAGING_EXECPREFIXDIR}" as the below help message.

 $ cd /prj/net-snmp-5.9/
 $ ./configure --help
 [snip]
 --with-openssl=PATH             Look for openssl in PATH/lib,
                                  or PATH may be "internal" to build with
                                  minimal copied OpenSSL code for USM only
 [snip]

And there is also a side effect after add the above openssl configuration
as the build path is added for NSC_LDFLAGS in /usr/bin/net-snmp-config. NSC_LDFLAGS="-L/prj/tmp/work/corei7-64-wrs-linux/net-snmp/5.9-r0/recipe-sysroot/usr/lib64 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now"

To improve reproducibility for netsnmp as below.

 $ sed -i -e 's@${STAGING_DIR_HOST}@@g' -i ${D}${bindir}/net-snmp-config

The NSC_LDFLAGS in net-snmp-config will be changed to below:
NSC_LDFLAGS="-L/usr/lib64 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now"

But it will result in other packages which depend on net-snmp such as
corosync, quagga and etc uses the build host library and introduce
below do_configure error.
ERROR: QA Issue: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. [configure-unsafe]

So remove the useless configuration to fix the issue.

---
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.bb | 1 -
 1 file changed, 1 deletion(-)
meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.bb +0 -1
index 051e168f0..d9040c164 100644
@@ -58,7 +58,6 @@ EXTRA_OECONF = "--enable-shared \
                 --with-install-prefix=${D} \
                 --with-persistent-directory=${localstatedir}/lib/net-snmp \
                 ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)} \
-                --with-openssl=${STAGING_EXECPREFIXDIR} \
                 --with-mib-modules='${MIB_MODULES}' \
 "
 
Signature · 1 line
2.29.2