Hi, Anyone could suggest a fix for the bug http://bugs.freeradius.org/show_bug.cgi?id=350 ? Regards, Alin
Alin Nastac <mrness@gentoo.org> wrote:
Anyone could suggest a fix for the bug http://bugs.freeradius.org/show_bug.cgi?id=350 ?
Change the order of linking so libradius is linked before libeap. Alan DeKok.
Alan DeKok wrote:
Alin Nastac <mrness@gentoo.org> wrote:
Anyone could suggest a fix for the bug http://bugs.freeradius.org/show_bug.cgi?id=350 ?
Change the order of linking so libradius is linked before libeap.
Those 2 unresolved symbols are not defined in libradius, but in radiusd daemon. libradius is already compiled before modules.
Alin Nastac wrote:
Anyone could suggest a fix for the bug http://bugs.freeradius.org/show_bug.cgi?id=350 ?
The patch you attached to the bug report is the cause of the link errors. Don't remove the -static option when linking radeapclient. I note it'd be more useful to post the errors you're seeing without changing anything in the Makefile. -- Nicolas Baradakis
Nicolas Baradakis wrote:
Alin Nastac wrote:
Anyone could suggest a fix for the bug http://bugs.freeradius.org/show_bug.cgi?id=350 ?
The patch you attached to the bug report is the cause of the link errors. Don't remove the -static option when linking radeapclient.
I note it'd be more useful to post the errors you're seeing without changing anything in the Makefile.
In radeapclient.c you will see there is a main function declared in it, therefore radeapclient must be an executable, not a library. If I don't apply that patch, I get the following error: /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/libtool --mode=compile gcc -m64 -O3 -pipe -fomit-frame-pointer -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/include -Ilibeap -c radeapclient.c gcc -m64 -O3 -pipe -fomit-frame-pointer -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/include -Ilibeap -c radeapclient.c -fPIC -DPIC -o radeapclient.lo /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/libtool --mode=link gcc -static -o radeapclient radeapclient.lo libeap/libeap.la -lnsl -lresolv -lpthread gcc -o radeapclient radeapclient.o libeap/.libs/libeap.so /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs/libradius.so -lcrypt -lnsl -lresolv -lpthread -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/modules/rlm_eap/libeap/.libs -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs gcc: radeapclient.o: No such file or directory If I apply only the -static thing, I get a bunch of "unresolved symbol" errors. Almost all of the symbols (excepting those 2 functions which are defined in radiusd daemon _not_ libradius) are defined by openssl.
Alin Nastac wrote:
gcc -o radeapclient radeapclient.o libeap/.libs/libeap.so /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs/libradius.so -lcrypt -lnsl -lresolv -lpthread -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/modules/rlm_eap/libeap/.libs -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs gcc: radeapclient.o: No such file or directory
This error was already posted on the freeradius-users mailing list last week. It seems you're using "./configure --disable-static". Remove this option and it'll build normally. -- Nicolas Baradakis
Nicolas Baradakis wrote:
Alin Nastac wrote:
gcc -o radeapclient radeapclient.o libeap/.libs/libeap.so /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs/libradius.so -lcrypt -lnsl -lresolv -lpthread -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/modules/rlm_eap/libeap/.libs -Wl,--rpath -Wl,/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib/.libs gcc: radeapclient.o: No such file or directory
This error was already posted on the freeradius-users mailing list last week. It seems you're using "./configure --disable-static". Remove this option and it'll build normally.
True. Now the compilation succeeds, but make install fails. It seems libradius gets installed in /usr rather than /usr/lib: gmake[4]: Entering directory `/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib' /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/libtool --mode=install /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/install-sh -c -c libradius.la /var/tmp/portage/freeradius-1.1.1/image//usr/lib /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/install-sh -c -c .libs/libradius-1.1.1.so /var/tmp/portage/freeradius-1.1.1/image//usr/libradius-1.1.1.so (cd /var/tmp/portage/freeradius-1.1.1/image//usr && rm -f libradius.so && ln -s libradius-1.1.1.so libradius.so) /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/install-sh -c -c .libs/libradius.lai /var/tmp/portage/freeradius-1.1.1/image//usr/libradius.la /var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/install-sh -c -c .libs/libradius.a /var/tmp/portage/freeradius-1.1.1/image//usr/libradius.a ranlib /var/tmp/portage/freeradius-1.1.1/image//usr/libradius.a chmod 644 /var/tmp/portage/freeradius-1.1.1/image//usr/libradius.a libtool: install: warning: remember to run `libtool --finish /usr/lib' rm -f /var/tmp/portage/freeradius-1.1.1/image//usr/lib/libradius-1.1.1.la; ln -s libradius.la /var/tmp/portage/freeradius-1.1.1/image//usr/lib/libradius-1.1.1.la ln: creating symbolic link `/var/tmp/portage/freeradius-1.1.1/image//usr/lib/libradius-1.1.1.la' to `libradius.la': No such file or directory gmake[4]: *** [install] Error 1 gmake[4]: Leaving directory `/var/tmp/portage/freeradius-1.1.1/work/freeradius-1.1.1/src/lib' But never mind this new problem. The main issue is the improper usage of functions defined in radiusd daemon. Those symbols are not meant to be used from outside, otherwise they would be defined in libradius. The -static tweak is simply a nasty workaround.
Alin Nastac <mrness@gentoo.org> wrote:
But never mind this new problem.
The "new problem" was discussed on the -users list multiple times, there's a bug in bugzilla, and a patch in CVS to fix it.
Those symbols are not meant to be used from outside, otherwise they would be defined in libradius. The -static tweak is simply a nasty workaround.
Sure. As I said before, I will look into it. Please either supply a patch to fix the problem, or wait for me to fix it. Either way, there's no need to keep posting messages saying it should be fixed. Alan DeKok.
participants (3)
-
Alan DeKok -
Alin Nastac -
Nicolas Baradakis