Building net-mgmt/net-snmp fails

Boris Kochergin spawk at
Thu May 6 22:50:57 UTC 2010

Olivier Cochard-Labbé wrote:
> Hi all,
> since some days, I can't compile net-snmp on my FreeBSD 8-Stable using
> the default make value.
> I've got this error message:
> 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'
> Does anyone meet the same problem ?
> Thanks,
> Olivier
I can confirm this on an 8.0-RELEASE/i386 machine. exp(3) lives in the 
math library, so those shared objects must be linked against it. Quick 
fix: when the build bombs out, edit 
/usr/ports/net-mgmt/net-snmp/work/net-snmp- and 
modify this line:

LIBS            = $(USELIBS) -lelf -lssp_nonshared $(PERLLDOPTS_FOR_APPS) be this:

LIBS            = $(USELIBS) -lelf -lssp_nonshared -lm 

Also, edit 
/usr/ports/net-mgmt/net-snmp/work/net-snmp- and 
modify this line:

TRAPDWITHAGENT  = $(USETRAPLIBS) -lelf -lssp_nonshared be this:

TRAPDWITHAGENT  = $(USETRAPLIBS) -lelf -lssp_nonshared -lm

...then continue the build, which should now complete.


More information about the freebsd-ports mailing list