Menu

#2711 /usr/bin/ld: .libs/snmpusm.o: undefined reference to symbol 'BN_bn2bin@@OPENSSL_1.0.0'

debian
closed
None
1
2016-07-28
2016-05-18
No

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

1 Attachments

Discussion

  • Jean-christophe Manciot

    If this can be of any help: openssl version
    OpenSSL 1.0.2g-fips 1 Mar 2016

     
  • Jean-christophe Manciot

    Same error if I remove --with-openssl from configure

     
  • Jean-christophe Manciot

    OK, openssl is used by default, so previous try did not change anything.

    However, --without-openssl has 2 consequences:

    • the previous issue is not triggered
    • several dozens of other errors show up, such as:
    libtool: compile:  gcc -I../include -I. -I../snmplib -I/usr/include/libnl3 -isystem /usr/include/mit-krb5 -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 transports/snmpTLSBaseDomain.c  -fPIC -DPIC -o transports/.libs/snmpTLSBaseDomain.o
    In file included from transports/snmpTLSBaseDomain.c:43:0:
    ../include/net-snmp/library/snmp_openssl.h:27:43: error: unknown type name netsnmp_cert_map
         char *netsnmp_openssl_extract_secname(netsnmp_cert_map *cert_map,
                                               ^
    ../include/net-snmp/library/snmp_openssl.h:28:43: error: unknown type name netsnmp_cert_map
                                               netsnmp_cert_map *peer_cert);
                                               ^
    transports/snmpTLSBaseDomain.c: In function verify_callback:
    transports/snmpTLSBaseDomain.c:65:5: error: unknown type name netsnmp_cert
         netsnmp_cert *cert;
         ^
    

    The whole log with all the errors is attached.

     
  • Jean-christophe Manciot

    The previous post has been done with latest commit e5c2f23e8d7e863b5302e91e538d5e31745326bd

     
  • Jean-christophe Manciot

    Same issues when replacing all calls to make configure by:

        export ACLOCAL_AMFLAGS="-I m4"
        autoreconf -v --install
    
     
  • Jean-christophe Manciot

    Same issue when building with makerelease

     
  • Wes Hardaker

    Wes Hardaker - 2016-06-22

    Can you remove the ksm security module? I suspect that's causing the error.

     
  • Wes Hardaker

    Wes Hardaker - 2016-06-22
    • status: open --> pending
     
  • Jean-christophe Manciot

    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

     
  • Jean-christophe Manciot

    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"

     
  • Jean-christophe Manciot

    However, I've realized that the tools I use to build configure are more recent than the requirements: is this an issue?

    autoconf --version
    autoconf (GNU Autoconf) 2.69
    automake --version
    automake (GNU automake) 1.15
    libtool --version
    libtool (GNU libtool) 2.4.6
    

    In particular, I assume that the patch described has been merged in 2.4.6..

     
  • Jean-christophe Manciot

    "Making ./configure" with the following tools is not necessary anymore:
    libtoolize
    aclocal -I m4
    autoheader
    autoconf

    Removing these calls solves this issue.

     
  • Niels Baggesen

    Niels Baggesen - 2016-07-28
    • status: pending --> closed
    • assigned_to: Niels Baggesen
     

Log in to post a comment.

MongoDB Logo MongoDB