You are not logged in.

#1 2009-02-03 12:19:54

lorentzc
Member
From: Romania - Iasi
Registered: 2009-02-03
Posts: 3

freeradius and rlm_perl not working. libraries issue

Hello.
I've build and installed freeradius package from aur repo. Everythig works fine ( auth against ldap server, wireless clients authentication ) except the perl module from freeradius.

After enabling perl module into authorize section from freeradius, and running radius daemon with debug option ( #radiusd -X )

Can't load '/usr/lib/perl5/core_perl/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/lib/perl5/core_perl/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_sv_cmp at /usr/lib/perl5/core_perl/XSLoader.pm line 64.
 at /usr/lib/perl5/core_perl/Data/Dumper.pm line 36
Compilation failed in require at /etc/raddb/example.pl line 30.
BEGIN failed--compilation aborted at /etc/raddb/example.pl line 30.
rlm_perl: perl_parse failed: /etc/raddb/example.pl not found or has syntax errors.
/etc/raddb/modules/perl[7]: Instantiation failed for module "perl"
/etc/raddb/radiusd.conf[94]: Failed to find module "perl".
/etc/raddb/radiusd.conf[90]: Errors parsing authorize section.
 }

perl info:
[

root@app raddb]# pacman -Q perl
perl 5.10.0-4
[root@app raddb]# pacman -Q freeradius
freeradius 2.1.3-2

Freeradius was build on "app" machine, not installed from a binary package download from another machine, where could be another perl distribution, or different compiler, and so on. Also, perl is working.   


On different distributions, with similar problems,  they resolved the issue using LD_PRELOAD = /path/to/libperl.so . On Archlinux there is no libperl.so file, only libperl.a 

For example, on Centos 5.2 x64, where is running without any issues:

[root@virtual raddb]# ldd /usr/lib64/rlm_perl.so
        [b]libperl.so[/b] => /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so (0x00002aaaaacb6000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaaafff000)
        libm.so.6 => /lib64/libm.so.6 (0x00002aaaab203000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aaaab487000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00002aaaab6bb000)
        libc.so.6 => /lib64/libc.so.6 (0x00002aaaab8be000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00002aaaabc0f000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00002aaaabe27000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaac03c000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
[root@virtual raddb]# locate libperl
/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/libperl.so
/usr/lib64/perl5/5.8.6/x86_64-linux-thread-multi/CORE/libperl.so
/usr/lib64/perl5/5.8.7/x86_64-linux-thread-multi/CORE/libperl.so
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so
[root@virtual raddb]# ldd /usr/bin/perl |grep libperl
        libperl.so => /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/[b]libperl.so[/b] (0x0000003ffd200000)

I'll post also how i resolved the issue (if i succeed) . I guess that i need an option to be added into PKGBUILD, like:   --with-rlm-perl-dir=/some/path

Offline

#2 2009-02-04 06:12:08

lorentzc
Member
From: Romania - Iasi
Registered: 2009-02-03
Posts: 3

Re: freeradius and rlm_perl not working. libraries issue

Solved the problem.. some how. But not how i expected. and here it goes
- the problem was with perl.  I added into PKGBUILD, at ./Configure option:  -Duseshrplib

I'm pretty sure that i broke something else (let's say, mod_perl from apache) , but i succeeded  to run freeradius using:

# LD_PRELOAD=/usr/lib/perl5/core_perl/CORE/libperl.so radiusd -X

This is not a solution. Hope that somebody can fix the issue. The
"right" way.

Offline

Board footer

Powered by FluxBB