Ubuntu 16.04 4.4.0-22
Commit 8d07349f9c8b7daf3a86299d049f3c8dcd9f6914
echo --------
echo Cleaning
echo --------
cd git-net-snmp
git reset --hard
git clean -fxd :/
git fetch --progress --prune origin
echo ------------------
echo "Making ./configure"
echo ------------------
libtoolize
aclocal -I m4
autoheader
autoconf
echo -----------
echo Configuring
echo -----------
./configure --with-default-snmp-version="3" --with-sys-contact="noone@no.where" --with-sys-location="Unknown" \
--with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp" \
--prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--with-openssl \
--with-systemd \
--enable-embedded-perl \
--enable-shared \
--enable-ipv6 \
--with-transports="UDP UDPIPv6 TCP TCPIPv6 TLSTCP" \
--with-security-modules="usm ksm tsm" \
--with-mib-modules="mibII snmpv3mibs agent_mibs notification target utilities disman/event disman/schedule smux host ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable tunnel misc/ipfwacc agentx" \
--with-python-modules
echo ---------
echo Compiling
echo ---------
make
...
/bin/bash ../libtool --mode=link gcc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -o snmpusm snmpusm.lo ../snmplib/libnetsnmp.la -lnl-3 -lm -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-Bsymbolic-functions -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err
libtool: link: gcc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -o .libs/snmpusm .libs/snmpusm.o -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro ../snmplib/.libs/libnetsnmp.so -lnl-3 -lm -L/usr/lib/x86_64-linux-gnu/mit-krb5 -lkrb5 -lk5crypto -lcom_err
/usr/bin/ld: .libs/snmpusm.o: undefined reference to symbol 'BN_bn2bin@@OPENSSL_1.0.0'
//lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:318: recipe for target 'snmpusm' failed
make[1]: *** [snmpusm] Error 1
make[1]: Leaving directory '/home/actionmystique/Program-Files/Ubuntu/SNMP/git-net-snmp/apps'
Makefile:655: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1
If this can be of any help: openssl version
OpenSSL 1.0.2g-fips 1 Mar 2016
Same error if I remove --with-openssl from configure
OK, openssl is used by default, so previous try did not change anything.
However, --without-openssl has 2 consequences:
The whole log with all the errors is attached.
The previous post has been done with latest commit e5c2f23e8d7e863b5302e91e538d5e31745326bd
Same issues when replacing all calls to make configure by:
Same issue when building with makerelease
Can you remove the ksm security module? I suspect that's causing the error.
Removing ksm from configure options does not workaround the issue with commit 0c604080a4bcc79f38a85447f5b1a0f2c3ab85da,
...
/bin/bash ../libtool --mode=compile gcc -I../include -I. -I../agent -I../agent/helpers -I../agent/mibgroup -I/usr/include/libnl3 -I../snmplib -I/usr/include/libnl3 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -c -o snmpusm.lo snmpusm.c
libtool: compile: gcc -I../include -I. -I../agent -I../agent/helpers -I../agent/mibgroup -I/usr/include/libnl3 -I../snmplib -I/usr/include/libnl3 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -c snmpusm.c -fPIC -DPIC -o .libs/snmpusm.o
libtool: compile: gcc -I../include -I. -I../agent -I../agent/helpers -I../agent/mibgroup -I/usr/include/libnl3 -I../snmplib -I/usr/include/libnl3 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -c snmpusm.c -o snmpusm.o >/dev/null 2>&1
/bin/bash ../libtool --mode=link gcc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -o snmpusm snmpusm.lo ../snmplib/libnetsnmp.la -lnl-3 -lm
libtool: link: gcc -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-qual -o .libs/snmpusm .libs/snmpusm.o ../snmplib/.libs/libnetsnmp.so -lnl-3 -lm
/usr/bin/ld: .***libs/snmpusm.o: undefined reference to symbol 'BN_bn2bin@@OPENSSL_1.0.0'
//lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:318: recipe for target 'snmpusm' failed
make[1]: *** [snmpusm] Error 1
make[1]: Leaving directory '/home/actionmystique/Program-Files/Ubuntu/SNMP/git-net-snmp/apps'
Makefile:655: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1
Exactly same issue if I remove "usm" from configure options (and keep ksm tsm), which I find a little strange considering the name ".libs/snmpusm.o"
However, I've realized that the tools I use to build configure are more recent than the requirements: is this an issue?
In particular, I assume that the patch described has been merged in 2.4.6..
"Making ./configure" with the following tools is not necessary anymore:
libtoolize
aclocal -I m4
autoheader
autoconf
Removing these calls solves this issue.