Hi, I am attempting to compile net-snmp-5.7.2.1 from the source tarball released here on Sourceforge.
I'm running into a few seemingly simplistic issues; so I wonder if I am doing something wrong? or if perhaps my systems here have some wholly different configuration than that which is where this build process is tested? To the point, I simply extract the sources, and ./configure ; I'm not even caring about the --prefix / --sysconfdir options I need to properly get it in the place I want it. It simply is failing to compile in a very default setup. That said, here is what works, and where it fails. ./configure finishes everything apparently OK; --------------------------------------------------------- Net-SNMP configuration summary: --------------------------------------------------------- SNMP Versions Supported: 1 2c 3 Building for: linux Net-SNMP Version: 5.7.2.1 Network transport support: Callback Unix Alias TCP UDP IPv4Base SocketBase TCPBase UDPIPv4Base UDPBase SNMPv3 Security Modules: usm Agent MIB code: default_modules => snmpv3mibs mibII ucd_snmp notification notification-log-mib target agent_mibs agentx disman/event disman/schedule utilities host MYSQL Trap Logging: unavailable Embedded Perl support: enabled SNMP Perl modules: building -- embeddable SNMP Python modules: disabled Crypto support from: crypto Authentication support: MD5 SHA1 Encryption support: DES AES Local DNSSEC validation: disabled --------------------------------------------------------- Then, either 'make' or 'make -j4' (tried without -j4 to see if it was a parallelism issue; its not) the compiler starts building a few things, then gets into the Perl module dir and then the compilation process halts with a linking error: make[3]: Entering directory `/root/net-snmp-5.7.2.1/perl/agent/default_store' /usr/local/bin/perl /usr/local/lib/perl5/5.8.8/ExtUtils/xsubpp -prototypes -typemap /usr/local/lib/perl5/5.8.8/ExtUtils/typemap default_store.xs > default_store.xsc && mv default_store.xsc default_store.c cc -c -I../../include -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -fPIC -DPIC -m64 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE -I/usr/local/ssl/include -I. -I/usr/local/include -fPIC -DPIC -m64 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"5.07021\" -DXS_VERSION=\"5.07021\" -fpic "-I/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" agent.c Running Mkbootstrap for NetSNMP::agent::default_store () cp default_store.pm ../../blib/lib/NetSNMP/agent/default_store.pm AutoSplitting ../../blib/lib/NetSNMP/agent/default_store.pm (../../blib/lib/auto/NetSNMP/agent/default_store) chmod 644 default_store.bs cc -c -I../../../include -fno-strict-aliasing -g -O2 -Ulinux -Dlinux=linux -fPIC -DPIC -m64 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE -I/usr/local/ssl/include -I. -I/usr/local/include -fPIC -DPIC -m64 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"5.07021\" -DXS_VERSION=\"5.07021\" -fpic "-I/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" default_store.c rm -f ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so LD_RUN_PATH="/usr/local/lib:/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" cc -shared -L/usr/lib64 -L/lib64 default_store.o -o ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so \ -L/root/net-snmp-5.7.2.1/perl/agent/default_store/../../../snmplib/.libs -L/root/net-snmp-5.7.2.1/perl/agent/default_store/../../../snmplib -L/usr/local/ssl/lib -L/usr/local/lib -lnetsnmp -lrt -lcrypto -lm \ chmod 755 ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.so /usr/local/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- default_store.bs ../../blib/arch/auto/NetSNMP/agent/default_store/default_store.bs 644 Manifying ../../blib/man3/NetSNMP::agent::default_store.3 make[3]: Leaving directory `/root/net-snmp-5.7.2.1/perl/agent/default_store' rm -f ../blib/arch/auto/NetSNMP/agent/agent.so LD_RUN_PATH="/usr/local/lib:/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" cc -shared -L/usr/lib64 -L/lib64 -L/usr/local/ssl/lib agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so \ -L/usr/local/lib -L/root/net-snmp-5.7.2.1/perl/agent/../../snmplib/.libs -L/root/net-snmp-5.7.2.1/perl/agent/../../snmplib -L/root/net-snmp-5.7.2.1/perl/agent/../../agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp \ /usr/bin/ld: cannot find -lnetsnmpmibs collect2: ld returned 1 exit status make[2]: *** [../blib/arch/auto/NetSNMP/agent/agent.so] Error 1 make[2]: Leaving directory `/root/net-snmp-5.7.2.1/perl/agent' make[1]: *** [subdirs] Error 2 make[1]: Leaving directory `/root/net-snmp-5.7.2.1/perl' make: *** [perlmodules] Error 1 root@server [~/net-snmp-5.7.2.1]# find ./ -name 'libnetsnmpmibs.so*' ./agent/.libs/libnetsnmpmibs.so.30 ./agent/.libs/libnetsnmpmibs.so.30.0.2 ./agent/.libs/libnetsnmpmibs.so Please notice that the path equalling "agent/.libs/" is not enumerated anywhere in the library searchpath; things "close" are listed: ../../snmplib/.libs/ ../../agent/ but not the actual location of ../../agent/.libs/ So, am I doing something fundamentally wrong? or is this broken? If I manually call the 'cc' line above, with the proper dir, it of course links fine: (I added -L/root/net-snmp-5.7.2.1/perl/agent/../../agent/.libs/ ) root@server [~/net-snmp-5.7.2.1/perl/agent]# LD_RUN_PATH="/usr/local/lib:/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" cc -shared -L/usr/lib64 -L/lib64 -L/usr/local/ssl/lib agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so -L/usr/local/lib -L/root/net-snmp-5.7.2.1/perl/agent/../../snmplib/.libs -L/root/net-snmp-5.7.2.1/perl/agent/../../snmplib -L/root/net-snmp-5.7.2.1/perl/agent/../../agent -L/root/net-snmp-5.7.2.1/perl/agent/../../agent/.libs/ -lnetsnmpmibs -lnetsnmpagent -lnetsnmp root@server [~/net-snmp-5.7.2.1]# ls -al ./perl/blib/arch/auto/NetSNMP/agent/agent.so -rwxr-xr-x 1 root root 98729 Jun 15 07:15 ./perl/blib/arch/auto/NetSNMP/agent/agent.so If I continue this way, 2 more -L directories are also not included: LD_RUN_PATH="/usr/local/lib:/usr/local/lib/perl5/5.8.8/x86_64-linux/CORE" cc -shared -L/usr/lib64 -L/lib64 -L/usr/local/ssl/lib TrapReceiver.o -o ../blib/arch/auto/NetSNMP/TrapReceiver/TrapReceiver.so -L/root/net-snmp-5.7.2.1/perl/TrapReceiver/../../apps -L/root/net-snmp-5.7.2.1/perl/TrapReceiver/../../agent -L/root/net-snmp-5.7.2.1/perl/TrapReceiver/../../snmplib/.libs -L/root/net-snmp-5.7.2.1/perl/TrapReceiver/../../snmplib -lnetsnmptrapd -lnetsnmpmibs -lnetsnmpagent -lnetsnmp /usr/bin/ld: cannot find -lnetsnmptrapd collect2: ld returned 1 exit status make[2]: *** [../blib/arch/auto/NetSNMP/TrapReceiver/TrapReceiver.so] Error 1 It lives instead in ./apps/.libs/libnetsnmptrapd.so.30 ./apps/.libs/libnetsnmptrapd.la ./apps/.libs/libnetsnmptrapd.lai ./apps/.libs/libnetsnmptrapd.so.30.0.2 ./apps/.libs/libnetsnmptrapd.a ./apps/.libs/libnetsnmptrapd.so This time, again the apps dir gets enumerated out of place... "-L/root/net-snmp-5.7.2.1/perl/TrapReceiver/../../apps" with no subdir of .libs/ as actually exists.. This one needs 2 extras: the original -L /root/net-snmp-5.7.2.1/perl/TrapReceiver/../../agent/.libs/ and -L /root/net-snmp-5.7.2.1/perl/TrapReceiver/../../apps/.libs/ And finally, it compiles. So is this broken in some weird way? Or am I missing a fundamental configuration option for example that would rectify this mal-linking issue? Thanks, Mike ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users