cross compilation of freeradius-server-3.0.10 fails at link of radeapclient, undefined references

Aaron Wegner aaron at cs.wisc.edu
Fri Apr 22 15:53:57 CEST 2016


When I start the build of FreeRADIUS it fails with an error because it 
can't execute jlibtool.  If I use the native compiler rather than the 
cross compiler to build jlibtool the build proceeds.

$ gcc scripts/jlibtool.c -o build/make/jlibtool

However it breaks again when it tries to link 
build/bin/local/radeapclient (sorry my mail client is adding newlines to 
long single lines).

LTIB> build/make/jlibtool --silent --mode=link gcc -o 
build/bin/local/radeapclient -rpath 
/spare1/aaron/0339/ltib/rpm/BUILD/freeradius-server-3.0.10/build/lib/local//.libs 
--shared -L/spare1/aaron/0339/ltib/rootfs/usr/lib 
-Wl,-rpath,/spare1/aaron/0339/ltib/rootfs/usr/lib     
build/objs/src/modules/rlm_eap/radeapclient.lo 
build/objs/src/main/files.lo build/objs/src/main/threads.lo 
build/objs/src/main/version.lo build/objs/src/main/cb.lo 
build/objs/src/main/tls.lo build/lib/local/libfreeradius-radius.la 
build/lib/local/libfreeradius-server.la 
build/lib/local/libfreeradius-eap.la  -lcrypto -lssl -ltalloc  -lpcre  
-lcap -lnsl -lresolv -ldl -lpthread  -lcrypto -lssl

However, if I change the command to the following it works.

LTIB> gcc -o build/bin/local/radeapclient -Wl,-rpath 
/spare1/aaron/0339/ltib/rpm/BUILD/freeradius-server-3.0.10/build/lib/local//.libs 
--shared -L/spare1/aaron/0339/ltib/rootfs/usr/lib 
-Wl,-rpath,/spare1/aaron/0339/ltib/rootfs/usr/lib 
-L/spare1/aaron/0339/ltib/rpm/BUILD/freeradius-server-3.0.10/build/lib/local//.libs 
  build/objs/src/modules/rlm_eap/radeapclient.o 
build/objs/src/main/files.o build/objs/src/main/threads.o 
build/objs/src/main/version.o build/objs/src/main/cb.o 
build/objs/src/main/tls.o -lfreeradius-radius -lfreeradius-server 
-lfreeradius-eap  -lcrypto -lssl -ltalloc  -lpcre  -lcap -lnsl -lresolv 
-ldl -lpthread  -lcrypto -lssl

Now the build stops right away at the next link, build/bin/radeapclient. 
  The problem is tedious to work around issuing calls to gcc because 
after that link it stops at:

build/bin/local/smbencrypt
build/bin/smbencrypt
build/bin/local/dhcpclient
build/bin/dhcpclient

...and so on.  Don't know how may of these there are.  I'm attaching the 
original failed command with the -Wl,--verbose flag added to the link to 
this email so that it's not formatted funny.  Any help would be 
appreciated, I'm new to jlibtool and have no clue what's going on.  The 
linker seems to be finding the shared objects and I check the shared 
objects for the undefined references it is complaining about and they 
seem to be in libfreeradius-radius.so, for instance:

$ nm --defined-only -o build/lib/local//.libs/libfreeradius-radius.so | 
grep fr_pair_value_strcpy
build/lib/local//.libs/libfreeradius-radius.so:000210ac T 
fr_pair_value_strcpy

So I'm at a loss for why this link is failing.


Thanks,

Aaron
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: radeapclient.txt
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20160422/bf1f6807/attachment-0001.txt>


More information about the Freeradius-Users mailing list