Date: Thu, 06 May 2010 18:50:28 -0400 From: Boris Kochergin <spawk@acm.poly.edu> To: =?ISO-8859-1?Q?Olivier_Cochard-Labb=E9?= <olivier@freenas.org> Cc: freebsd-ports-mailinglist <freebsd-ports@freebsd.org> Subject: Re: Building net-mgmt/net-snmp fails Message-ID: <4BE347B4.8050207@acm.poly.edu> In-Reply-To: <x2h3131aa531005061431vfe41e5dt701392f483785c5d@mail.gmail.com> References: <x2h3131aa531005061431vfe41e5dt701392f483785c5d@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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-5.4.2.1/agent/.libs/libnetsnmpagent.so -lwrap -lkvm /usr/ports/net-mgmt > /net-snmp/work/net-snmp-5.4.2.1/snmplib/.libs/libnetsnmp.so -ldevstat > ../snmplib/.libs/libnetsnmp.so -lcrypto -lelf -lssp_nonshared > -Wl,--rpath -Wl,/usr/local/lib > ./.libs/libnetsnmpmibs.so: 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-5.4.2.1/agent/Makefile and modify this line: LIBS = $(USELIBS) -lelf -lssp_nonshared $(PERLLDOPTS_FOR_APPS) ...to be this: LIBS = $(USELIBS) -lelf -lssp_nonshared -lm $(PERLLDOPTS_FOR_APPS) Also, edit /usr/ports/net-mgmt/net-snmp/work/net-snmp-5.4.2.1/apps/Makefile and modify this line: TRAPDWITHAGENT = $(USETRAPLIBS) -lelf -lssp_nonshared ...to be this: TRAPDWITHAGENT = $(USETRAPLIBS) -lelf -lssp_nonshared -lm ...then continue the build, which should now complete. -Boris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BE347B4.8050207>