Compling net-snmp 5.7.2 on AIX 6.1 and meet error while compling perl/agent.c.
Configuration:
export CC=cc_r
./configure \
--with-defaults \
--with-sys-contact="Unknown" \
--prefix="/opt/freeware" \
--with-mib-modules="smux" \
--with-sysconfdir="/etc/net-snmp" \
--without-kmem-usage \
--enable-shared \
--disable-embedded-perl
Note that I don't need the embedded perl but I need the perl modules.
Error msg:
chmod 644 agent.bs
rm -f ../blib/arch/auto/NetSNMP/agent/agent.so
ld -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE/perl.exp -bE:agent.exp -bnoentry -lpthreads -lc_r -brtl agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so -L/opt/freeware/lib -L/opt/freeware/src/packages/BUILD/net-snmp-5.7.2/perl/agent/../../snmplib/.libs -L/opt/freeware/src/packages/BUILD/net-snmp-5.7.2/perl/agent/../../snmplib -L/opt/freeware/src/packages/BUILD/net-snmp-5.7.2/perl/agent/../../agent/.libs -L/opt/freeware/src/packages/BUILD/net-snmp-5.7.2/perl/agent/../../agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp
ld: 0711-317 ERROR: Undefined symbol: .netsnmp_free
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: The error code from the last command is 8.
I get a similar error compiling 5.7.3 on CentOS:
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -L/usr/local/lib agent.o -o ../blib/arch/auto/NetSNMP/agent/agent.so \
-L/dvr/revue_daemons/net-snmp-5.7.3/perl/agent/../../snmplib/.libs -L/dvr/revue_daemons/net-snmp-5.7.3/perl/agent/../../snmplib -L/dvr/revue_daemons/net-snmp-5.7.3/perl/agent/../../agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp \
/usr/bin/ld: cannot find -lnetsnmpmibs