FreeBSD Port: net-mgmt/net-snmp

Garrett Cooper yanefbsd at
Wed May 12 21:16:26 UTC 2010

On May 12, 2010, at 4:56 PM, Mike Jakubik wrote:

> Hi,
> I am having trouble compiling net-snmp on a number of 8-STABLE systems, below is the error.
> Thanks.
> ---
> creating
> (cd .libs && rm -f && ln -s ../
> :
> /bin/sh ../libtool --mode=compile cc -I../include -I. -I../agent -I../agent/mibgroup  -I../snmplib -I/usr/include -O2 -pipe -march=nocona -fno-strict-aliasing -Ufreebsd8 -Dfreebsd8=freebsd8 -c -o snmpd.lo snmpd.c
> cc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -I/usr/include -O2 -pipe -march=nocona -fno-strict-aliasing -Ufreebsd8 -Dfreebsd8=freebsd8 -c snmpd.c  -fPIC -DPIC -o .libs/snmpd.o
> cc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -I/usr/include -O2 -pipe -march=nocona -fno-strict-aliasing -Ufreebsd8 -Dfreebsd8=freebsd8 -c snmpd.c -o snmpd.o >/dev/null 2>&1
> /bin/sh ../libtool --mode=link cc -O2 -pipe -march=nocona -fno-strict-aliasing -Ufreebsd8 -Dfreebsd8=freebsd8 -o snmpd snmpd.lo -L../snmplib/.libs -L../snmplib -L./.libs -L./helpers/.libs -L./helpers -L/usr/lib  -rpath=/usr/lib:/usr/local/lib helpers/ ../snmplib/ -lelf -lssp_nonshared
> cc -O2 -pipe -march=nocona -fno-strict-aliasing -Ufreebsd8 -Dfreebsd8=freebsd8 -o .libs/snmpd .libs/snmpd.o -rpath=/usr/lib:/usr/local/lib  -L/usr/ports/net-mgmt/net-snmp/work/net-snmp- -L/usr/ports/net-mgmt/net-snmp/work/net-snmp- -L/usr/ports/net-mgmt/net-snmp/work/net-snmp- -L/usr/ports/net-mgmt/net-snmp/work/net-snmp- -L/usr/ports/net-mgmt/net-snmp/work/net-snmp- -L/usr/lib ./.libs/ helpers/.libs/ ./.libs/ /usr/ports/net-mgmt/net-snmp/work/net-snmp- /usr/ports/net-mgmt/net-snmp/work/net-snmp- -lwrap -lkvm /usr/ports/net-mgmt/net-snmp/work/net-snmp- -ldevstat ../snmplib/.libs/ -lcrypto -lelf -lssp_nonshared   -Wl,--rpath -Wl,/usr/local/lib
> ./.libs/ undefined reference to `exp'
> *** Error code 1

It looks like -lm is missing in the linker line -- do you have the config.log?

More information about the freebsd-ports mailing list