/usr/ports/net/freeradius (port version 1.0.2_1) doesn't build if libradius is already installed on the system. The linker exits with an error while compiling 'radwho' module: Making all in main... gmake[4]: Entering directory `/usr/ports/net/freeradius/work/freeradius-1.0.2/src/main' /usr/ports/net/freeradius/work/freeradius-1.0.2/libtool --mode=link cc -export-dynamic -dlopen self \ -O -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -Wall -D_GNU_SOURCE -DNDEBUG -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DHOSTINFO=\"\" -DRADIUSD_VERSION=\"1.0.2\" -rpath=/usr/local/lib -L/usr/local/lib -L../lib -o radiusd \ radiusd.o files.o util.o acct.o nas.o log.o valuepair.o version.o proxy.o exec.o auth.o timestr.o conffile.o modules.o modcall.o session.o xlat.o threads.o smux.o radius_snmp.o client.o request_list.o mainconfig.o -lcrypt -lpthread -lcrypto -lssl -lradius \ -lltdl -lcrypt rm -f .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT creating .libs/radiusdS.c (cd .libs && cc -c -fno-builtin -fno-rtti -fno-exceptions "radiusdS.c") cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C rm -f .libs/radiusdS.c .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT cc .libs/radiusdS.o -O -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5 -Wall -D_GNU_SOURCE -DNDEBUG -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -DHOSTINFO=\"\" -DRADIUSD_VERSION=\"1.0.2\" -rpath=/usr/local/lib -o radiusd radiusd.o files.o util.o acct.o nas.o log.o valuepair.o version.o proxy.o exec.o auth.o timestr.o conffile.o modules.o modcall.o session.o xlat.o threads.o smux.o radius_snmp.o client.o request_list.o mainconfig.o -Wl,--export-dynamic -L/usr/local/lib -L/usr/ports/net/freeradius/work/freeradius-1.0.2/src/lib -lcrypt -lpthread -lcrypto -lssl /usr/local/lib/libradius.so /usr/local/lib/libltdl.so -lcrypt -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib rm -f .libs/radiusdS.o cc -rpath=/usr/local/lib -L/usr/local/lib -L../lib -o radwho radwho.o mainconfig.o util.o nas.o client.o log.o conffile.o files.o xlat.o -lpthread -lcrypto -lssl -lradius /usr/local/lib/libradius.so: undefined reference to `crypt' gmake[4]: *** [radwho] Error 1 gmake[4]: Leaving directory `/usr/ports/net/freeradius/work/freeradius-1.0.2/src/main' gmake[3]: *** [common] Error 1 gmake[3]: Leaving directory `/usr/ports/net/freeradius/work/freeradius-1.0.2/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/ports/net/freeradius/work/freeradius-1.0.2/src' gmake[1]: *** [common] Error 1 gmake[1]: Leaving directory `/usr/ports/net/freeradius/work/freeradius-1.0.2' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/net/freeradius. so it seems like freeradius-port conflicts with itself. After '#make deinstall' the problem didn't appear. And, for one-time build-and-install the port behaves well. For furter compiling (i.e. making a package for fast-installation of a second-third-... server while the main has already the port installed) the port doesn't compile. Fix: As it seems to me, the linker-library path in 'cc -rpath=/usr/local/lib -L/usr/local/lib -L../lib -o radwho radwho.o mainconfig.o util.o nas.o client.o log.o conffile.o files.o xlat.o -lpthread -lcrypto -lssl -lradius' should be corrected - instead of '-L/usr/local/lib -L../lib' it should be reversed to '-L../lib -L/usr/local/lib' so the linker first checks for 'libradius' in src/main/../lib (which compiles earlier) and so for all the objects, referenced by that library (which also compile into src/main/../lib). A sample patch, which works fine for me: How-To-Repeat: #cd /usr/ports/net/freeradius #make install clean #make build This will repeat the problem.
Dear maintainer of FreeBSD port net/freeradius, please take a look at http://www.freebsd.org/cgi/query-pr.cgi?q=80883 Do you approve this patch? I wasn't able to reproduce the problem, BTW. -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Fufie> snow should be on the tv and in the mountains, not here
State Changed From-To: open->feedback Asked maintainer for approval
Responsible Changed From-To: freebsd-ports-bugs->pav Track
State Changed From-To: feedback->closed Committed, thanks!
On Fri, May 20, 2005 at 08:37:36PM +0200, Pav Lucistnik wrote: > Dear maintainer of FreeBSD port net/freeradius, please take a look at > > http://www.freebsd.org/cgi/query-pr.cgi?q=80883 > > Do you approve this patch? > > I wasn't able to reproduce the problem, BTW. > Yes, please commit.