Re: rlm_perl and perl modules

2005-04-21 Thread Boian Jordanov
On Thu, Apr 21, 2005 at 01:14:15AM +0200, Emil Wilmanski wrote:
  Check output of perl -V, see if it does include useshrplib=true? and
  libperl=libperl.so. 
 
 $perl -V | grep -i useshrplib
 -Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des'
 libc=/lib/libc-2.3.2.so, so=so, useshrplib=true,
 libperl=libperl.so.5.8.4
  
Ok you can see that your perl come with libperl.so.5.8.4 and i guess
that DBI.so is linked against this libperl.so.5.8.4

 All ok.
 
  Check output of perl -MExtUtils::Embed -e ccopts
  -e ldopts 
 
  $perl -MExtUtils::Embed -e ccopts -e ldopts
 -Wl,-E  -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
 -L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
  -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
 -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
 -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.8/CORE 
 
 
 [EMAIL PROTECTED]:/usr/lib$ ls -l | grep libperl
 -rw-r--r--   1 root root  1400854 2005-03-08 11:15 libperl.a
 lrwxrwxrwx   1 root root   14 2005-04-16 16:28 libperl.so -
 libperl.so.5.8
 lrwxrwxrwx   1 root root   16 2005-04-16 16:28 libperl.so.5.8 -
 libperl.so.5.8.4
 -rw-r--r--   1 root root  1150824 2005-03-08 11:15 libperl.so.5.8.4
 
  Check against which libperl is linked rlm_perl
  

from your next mail i see that rlm_perl is linked against
libperl.so.5.8 So infact you are using different libs and that's why you
have a rellocation problems. Maybe you have more that one perl on your
system ?

-- 
Best Regards,
Boian Jordanov
SNE
Orbitel - Next Generation Telecom
tel. +359 2 4004 723 
tel. +359 2 4004 002

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-21 Thread Emil Wilmanski
Dnia 21-04-2005, czw o godzinie 10:57 +0300, Boian Jordanov napisa(a):
 Ok you can see that your perl come with libperl.so.5.8.4 and i guess
 that DBI.so is linked against this libperl.so.5.8.4
 

# ldd /usr/lib/perl5/auto/DBI/DBI.so 
libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7e8f000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)

If I use right command to test if DBI is linked with libperl so it is
not... I have install DBI 1.48 from src and 

# ldd /usr/local/lib/perl/5.8.4/auto/DBI/DBI.so
libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7e8f000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)

Is the same.

 from your next mail i see that rlm_perl is linked against
 libperl.so.5.8 So infact you are using different libs and that's why you
 have a rellocation problems. Maybe you have more that one perl on your
 system ?

Hmmm... I din't install perl from src... it is instaled only from
package so it is only one.  (I hope :) )
libperl.so.5.8.4 and libperl.so.5.8 are symlinks to libperl.so
so is the same libperl for 5.8 and 5.8.4


Maybe there are problem with paths to libs? Freeradius use standard
paths nut Debian use it's own diffrent paths...??


-- 
Emil Wilmanski [EMAIL PROTECTED]
Galeria-M


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-20 Thread Boian Jordanov
On Wed, Apr 20, 2005 at 01:41:21AM +0200, Emil Wilmanski wrote:
 
 All of normal scripts work perfect with any module... Only radius say
 that have problem with libs. I don't know why.maybe somebody have any
 idea... Maybe perl 5.8.4 is not for this, or I have to compile
 freeradius with some other flags. I just use dpkg-buildpackage. 
 Any idea? Maybe wrong path to libs? (how to set it?)

Check output of perl -V, see if it does include useshrplib=true? and
libperl=libperl.so. Check output of perl -MExtUtils::Embed -e ccopts
-e ldopts 

Check against which libperl is linked rlm_perl

-- 
Best Regards,
Boian Jordanov
SNE
Orbitel - Next Generation Telecom
tel. +359 2 4004 723 
tel. +359 2 4004 002

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-20 Thread Emil Wilmanski
 Check output of perl -V, see if it does include useshrplib=true? and
 libperl=libperl.so. 

$perl -V | grep -i useshrplib
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.4
-Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des'
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.4

All ok.

 Check output of perl -MExtUtils::Embed -e ccopts
 -e ldopts 

 $perl -MExtUtils::Embed -e ccopts -e ldopts
-Wl,-E  -L/usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl/5.8/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
 -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.8/CORE 


[EMAIL PROTECTED]:/usr/lib$ ls -l | grep libperl
-rw-r--r--   1 root root  1400854 2005-03-08 11:15 libperl.a
lrwxrwxrwx   1 root root   14 2005-04-16 16:28 libperl.so -
libperl.so.5.8
lrwxrwxrwx   1 root root   16 2005-04-16 16:28 libperl.so.5.8 -
libperl.so.5.8.4
-rw-r--r--   1 root root  1150824 2005-03-08 11:15 libperl.so.5.8.4

 Check against which libperl is linked rlm_perl
 

Hmmm. how to test it??

--
EW


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-20 Thread Emil Wilmanski
 Check against which libperl is linked rlm_perl

 ldd rlm_perl-1.0.2.so 
libperl.so.5.8 = /usr/lib/libperl.so.5.8 (0xb7ec3000)
libdl.so.2 = /lib/tls/i686/cmov/libdl.so.2 (0xb7ebf000)
libm.so.6 = /lib/tls/i686/cmov/libm.so.6 (0xb7e9d000)
libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7d69000)
libcrypt.so.1 = /lib/tls/i686/cmov/libcrypt.so.1 (0xb7d3c000)
libnsl.so.1 = /lib/tls/i686/cmov/libnsl.so.1 (0xb7d28000)
libresolv.so.2 = /lib/tls/i686/cmov/libresolv.so.2 (0xb7d16000)
libpthread.so.0 = /lib/tls/i686/cmov/libpthread.so.0 (0xb7d05000)
libcrypto.so.0.9.7 = /usr/lib/i686/cmov/libcrypto.so.0.9.7
(0xb7c06000)
libssl.so.0.9.7 = /usr/lib/i686/cmov/libssl.so.0.9.7 (0xb7bd5000)
/lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000)


# ldconfig -p | grep libperl.so.5.8
libperl.so.5.8 (libc6) = /usr/lib/libperl.so.5.8
??
--
EW

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-19 Thread Emil Wilmanski
Dnia 19-04-2005, wto o godzinie 11:03 +0200, Emil Wilmanski napisa(a):

 Can I use any perl modules in rlm_perl script?

I don't know what the problem is... noone of perl modules dos work... 

Can't load '/usr/local/lib/perl/5.8.4/auto/Data/Dumper/Dumper.so' for
module
Data::Dumper: /usr/local/lib/perl/5.8.4/auto/Data/Dumper/Dumper.so:
undefined symbol: Perl_sv_cmp at /usr/lib/perl/5.8/XSLoader.pm line 68.
 at /usr/local/lib/perl/5.8.4/Data/Dumper.pm line 27

I have sth wrong with perl libs ?
It is problem with my system?

-- 
EW


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-19 Thread Thor Spruyt
Emil Wilmanski wrote:
 Can I use any perl modules in rlm_perl script?
 I try to use DBI and I get

I don't know about any, must normally they *should* work.
For example, I use the following:
use strict;
use DBI;

Write a normal perl script that uses the module's functions and see if that
works.

--
Groeten, Regards, Salutations,

Thor Spruyt
M: +32 (0)475 67 22 65
E: [EMAIL PROTECTED]
W: www.thor-spruyt.com

www.salesguide.be
www.telenethotspot.be


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-19 Thread Jakub Wartak
On Tuesday 19 April 2005 11:03, Emil Wilmanski wrote:
 Hi,

 Can I use any perl modules in rlm_perl script?

Yes, you can.

 I try to use DBI and I get

 freeradius: relocation error: /usr/lib/perl5/auto/DBI/DBI.so: undefined
 symbol: Perl_Gthr_key_ptr

 I try to use Socket and I get

 freeradius: relocation error: /usr/lib/perl/5.8/auto/Socket/Socket.so:
 undefined symbol: Perl_Tstack_sp_ptr

 I'm using Debian with perl 5.8.4
 DBI 1.46 (but I tested with newest end older)

It works for me(c) on:
a) FreeBSD 5.x
b) OpenWall Linux
c) Slackware Linux 10.0  10.1

simple snippet from radiusd.conf:
        perl macauth {
                func_authenticate = authenticate
                func_authorize = authorize
                func_detach = detach
                module = [path_to_script]/auth.pl
        }

simple parts from auth.pl:
#!/usr/bin/perl -W

use strict;
use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);
use Data::Dumper;

# your code here
sub authenticate  {
}

sub authorize {
}

sub detach {
}

detach;

---8---
but you must rember about returing good values from authorize and authenticate 
( look at example.pl in freeradius source directory or in raddb )

-- 
Jakub Wartak
-vnull
FreeBSD/OpenBSD/Linux/Network Administrator

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_perl and perl modules

2005-04-19 Thread Emil Wilmanski
 I don't know about any, must normally they *should* work.
 For example, I use the following:
 use strict;
 use DBI;

Hmmm... I need DBI to work :)

 
 Write a normal perl script that uses the module's functions and see if that
 works.
 

All of normal scripts work perfect with any module... Only radius say
that have problem with libs. I don't know why.maybe somebody have any
idea... Maybe perl 5.8.4 is not for this, or I have to compile
freeradius with some other flags. I just use dpkg-buildpackage. 
Any idea? Maybe wrong path to libs? (how to set it?)

Thanx for any help.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html