Hi Ovidiu

On 6/15/18 1:22 AM, Ovidiu Panait wrote:
If "/usr/local/ssl/include" directory exists on the host machine, net-snmp will
also search the host openssl headers:

build/net-snmp/temp$ grep -i "/usr/local/ssl/include" log.do_compile
x86_64-wrs-linux-libtool: compile: x86_64-wrs-linux-gcc ... 
-I/usr/local/ssl/include

Fix this by selecting the proper sysroot headers using
--with-openssl=${STAGING_EXECPREFIXDIR}

Signed-off-by: Ovidiu Panait <[email protected]>
---
  meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb 
b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
index 5c827bb86..6f6f19ac9 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -66,7 +66,8 @@ 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} \
+                "
# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
  EXTRA_OECONF += "--with-mib-modules=smux"
@@ -121,8 +122,10 @@ do_install_append() {
      install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
      sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+           -e "s@${STAGING_DIR_TARGET}@@g" \

this change here and similar change below is causing build failures since we are removing tags which are used to replace target sysroot especially for crossscripts which exposes the host paths e.g. -L/usr/lib into net-snmp-config files. This shows up later in dependent packages which fail to detect net-snmp features due to this host contamination e.g corosync, ntop, keepalived this is worse on x86_64 where it might still work but for musl targets you get straight errors everywhere.

If you can explain what these changes are fixing. May be we can come up with alternatives which dont cause the above said regression. Please rework through this patch

          -i ${D}${bindir}/net-snmp-create-v3-user
      sed    -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \
+           -e "s@${STAGING_DIR_TARGET}@@g" \
             -e "s@\([^ ]*-fdebug-prefix-map=[^ ]*\)\1*@@g" \
             -e "s@\([^ ]*--sysroot=[^ ]*\)\1*@@g" \
             -e "s@\([^ ]*--with-libtool-sysroot=[^ ]*\)\1*@@g" \

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to