Ubuntu FreeRadius does not recoginize some perl.so symbols and does not compile from source and is also outdated (Why is there no new version in SID? Is the package still maintained?)

Thomas Glanzmann thomas at glanzmann.de
Sun Jul 21 14:46:43 CEST 2013

I wanted to use the FreeRadius package included in Ubuntu 12.04.2 LTS
(GNU/Linux 3.2.0-49-generic x86_64) to do SMS OTP password. In order to
do that I need to load perl code into FreeRadius which fails with the
following error on a fresh installed system:

(1) FreeRadius does not recognize symbol from perl module

sudo apt-get install freeradius libauthen-krb5-simple-perl
sudo cat > /etc/freeradius/sites-enabled/perl <<EOF
authenticate {

authorize {
        update control {
                Auth-Type := perl

preacct {

accounting {

session {
sudo cat > /etc/freeradius/example.pl <<EOF
use Authen::Krb5::Simple;
root at ubuntu64:~# sudo /etc/init.d/freeradius restart
 * Stopping FreeRADIUS daemon freeradius
 * /var/run/freeradius/freeradius.pid not found...
 * Starting FreeRADIUS daemon freeradius
Can't load '/usr/lib/perl5/auto/Authen/Krb5/Simple/Simple.so' for module Authen::Krb5::Simple: /usr/lib/perl5/auto/Authen/Krb5/Simple/Simple.so: undefined symbol: PL_thr_key at /usr/lib/perl/5.14/DynaLoader.pm line 184.
 at /etc/freeradius/example.pl line 1
Compilation failed in require at /etc/freeradius/example.pl line 1.
BEGIN failed--compilation aborted at /etc/freeradius/example.pl line 1.

In order to resolve that issue the FreeRadius version need to be upgradred.
However I tried to rebuild from source because I saw a similar bug before which
got resolved by rebuilding the package after a perl security update:

(2) Freeradius does not build from source.

sudo su -
apt-get build-dep freeradius
apt-get source freeradius
cd freeradius-2.1.10+dfsg/
debian/rules binary

And it fails:

radeapclient.c:975:6: warning: variable 'count' set but not used [-Wunused-but-set-variable]
libtool: compile:  gcc -g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -I/tmp/freeradius-2.1.10+dfsg/src -Ilibeap -c radeapclient.c -o radeapclient.o >/dev/null 2>&1
/usr/bin/libtool --mode=link gcc   -o radeapclient radeapclient.lo libeap/libfreeradius-eap.la -lnsl -lresolv  -lpthread -lcrypto -lssl -lcrypto
libtool: link: gcc -o .libs/radeapclient .libs/radeapclient.o  libeap/.libs/libfreeradius-eap.so -lnsl -lresolv -lpthread -lssl -lcrypto  -Wl,-rpath -Wl,/usr/lib/freeradius
/usr/bin/ld: .libs/radeapclient.o: undefined reference to symbol 'fr_perror'
/usr/bin/ld: note: 'fr_perror' is defined in DSO /usr/lib/freeradius/libfreeradius-radius-2.1.10.so so try adding it to the linker command line
/usr/lib/freeradius/libfreeradius-radius-2.1.10.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[7]: *** [radeapclient] Error 1

Full log is at: http://pbot.rmdir.de/6QWM6SrvmhzLYUQzjpQ3Dg

For the second issue I saw that there was a bug report which was closed because
it was not reproducible. For me it is, I reproduced it on a system setup from
scratch. I installed your ssh key on the system so that you can troubleshoot the

ssh -l yolanda -p 4001 infra.gmvl.de
You can get root by issueing 'sudo su -'. I disabled the password prompt.
You can also set you a password by 'sudo passwd yolanda' if necessary.
The system has full internet access.

Please let me know if I should file a bugreport for (1) and/or reopen the
bugreport for (2).

Howto reproduce the build bug:

        - Install a fresh Ubuntu in the packet selection only select ssh
        - Execute the commands mentioned above.


As Alan has mention on the bug 1090365 in launchpad, is is easily fixed
by applying the following patch:

commit c86003daabfd7db7249c7259db48a5cc1aa2fb01
Author: Alan T. DeKok <aland at freeradius.org>
Date:   Thu Jan 20 16:01:17 2011 +0100

    Add $(LIBRADIUS) to allow it to link

diff --git a/src/modules/rlm_eap/Makefile.in b/src/modules/rlm_eap/Makefile.in
index 1e20588..5576294 100644
--- a/src/modules/rlm_eap/Makefile.in
+++ b/src/modules/rlm_eap/Makefile.in
@@ -6,7 +6,7 @@ TARGET      = @targetname@
 SRCS        = rlm_eap.c eap.c mem.c
 HEADERS     = eap.h rlm_eap.h
 RLM_CFLAGS  = $(INCLTDL) -Ilibeap
-CLIENTLIBS  = libeap/$(LIBPREFIX)freeradius-eap.la
+CLIENTLIBS  = libeap/$(LIBPREFIX)freeradius-eap.la $(LIBRADIUS)
 RLM_LIBS    = libeap/$(LIBPREFIX)freeradius-eap.la $(LIBLTDL)
 RLM_INSTALL = install-subdirs
 RLM_SUBDIRS = libeap @eaptypes@

So I wonder why the build problem was not fixed?

I really would like to see that both issues get fixed. That way the out of the
box FreeRadius packet gets usuable and someone does not need to recompile the
package. Also I do not understand why Debian and Ubuntu does not have the
current version of the 2.2.x branch. It looks like the package is no longer
maintained. I also do not see a current version in SID (for Debian and Ubuntu
that is). So I wonder what is going on here?

So for now I'm stuck with compiling FreeRadius by myself for
Debian/Ubuntu. Has someone updated Debian packages somewhere?

Thomas Glanzmann <thomas at glanzmann.de>  Landline  +49 9131 6 14 720
Diplom-Informatiker Univ.               Facsimile +49 9131 6 14 721
Rathsbergerstrasse 28
D-91054 Erlangen - Burgberg, Germany    http://thomas.glanzmann.de/

More information about the Freeradius-Users mailing list