Freeradius rlm_perl with Custom Perl

classic Classic list List threaded Threaded
6 messages Options
| Threaded
Open this post in threaded view
|

Freeradius rlm_perl with Custom Perl

Onur GURSOY
Hello everyone,

currently, i can build freeradius rlm_perl successfully.
But rlm_perl.se depends on libperl.so.5.26 =>
/usr/lib/x86_64-linux-gnu/libperl.so.5.26

but i want to use
<foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/libperl.so

How is this possible?

This is problem for deployment point of view.
Because I have custom perl which i build from source.
and i want to use this instead of any other already installed perl which is
in deployment machine.

Many thanks
With best regards

--
Onur GÜRSOY
R&D Engineer in Embedded Systems
Master Student at Gebze Institute Of Technology
Department Of Electronic Engineering
GSM : 0(545) 764 7653
e-mail: [hidden email]
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius rlm_perl with Custom Perl

Alan DeKok-2
On Nov 17, 2020, at 8:02 AM, Onur GURSOY <[hidden email]> wrote:
> currently, i can build freeradius rlm_perl successfully.
> But rlm_perl.se depends on libperl.so.5.26 =>
> /usr/lib/x86_64-linux-gnu/libperl.so.5.26
>
> but i want to use
> <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/libperl.so
>
> How is this possible?

  You have to fix the linker to use that library instead of the system one.

  Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:

TGT_LDLIBS :=  <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/ libperl.so

  And rebuild.

> This is problem for deployment point of view.
> Because I have custom perl which i build from source.
> and i want to use this instead of any other already installed perl which is
> in deployment machine.

  It's generally a bad idea to install two versions of the same library on a system.  It's not well supported by the linker, and it has a tendency of breaking.

  i.e. you can tell FreeRADIUS to use one library, but the system might just choose another one.  There isn't a lot you can do to work around that, other than fix the system.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius rlm_perl with Custom Perl

Onur GURSOY
Hello Alan,

You have to fix the linker to use that library instead of the system one.
>   Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:
> TGT_LDLIBS :=  <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/
> libperl.so
>   And rebuild.

Thanks for your answer. It's good point. So, Is there a configuration
option for build. Why im saying this: because all.mk is produced after
./configure operation ? If yes first i have to configure radius and then i
have to change all.mk files.

 It's generally a bad idea to install two versions of the same library on a
> system.  It's not well supported by the linker, and it has a tendency of
> breaking.
>   i.e. you can tell FreeRADIUS to use one library, but the system might
> just choose another one.  There isn't a lot you can do to work around that,
> other than fix the system.

Generally, you're right. But i want to exactly this, I mean, freeradius
should use one library which is installed by me, system should use any
other library

Many Many Thanks,
With My Best Regards,

Alan DeKok <[hidden email]>, 17 Kas 2020 Sal, 16:36 tarihinde
şunu yazdı:

> On Nov 17, 2020, at 8:02 AM, Onur GURSOY <[hidden email]> wrote:
> > currently, i can build freeradius rlm_perl successfully.
> > But rlm_perl.se depends on libperl.so.5.26 =>
> > /usr/lib/x86_64-linux-gnu/libperl.so.5.26
> >
> > but i want to use
> > <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/libperl.so
> >
> > How is this possible?
>
>   You have to fix the linker to use that library instead of the system one.
>
>   Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:
>
> TGT_LDLIBS :=  <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/
> libperl.so
>
>   And rebuild.
>
> > This is problem for deployment point of view.
> > Because I have custom perl which i build from source.
> > and i want to use this instead of any other already installed perl which
> is
> > in deployment machine.
>
>   It's generally a bad idea to install two versions of the same library on
> a system.  It's not well supported by the linker, and it has a tendency of
> breaking.
>
>   i.e. you can tell FreeRADIUS to use one library, but the system might
> just choose another one.  There isn't a lot you can do to work around that,
> other than fix the system.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html



--
Onur GÜRSOY
R&D Engineer in Embedded Systems
Master Student at Gebze Institute Of Technology
Department Of Electronic Engineering
GSM : 0(545) 764 7653
e-mail: [hidden email]
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius rlm_perl with Custom Perl

Bjørn Mork
Onur GURSOY <[hidden email]> writes:

> You have to fix the linker to use that library instead of the system one.
>>   Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:
>> TGT_LDLIBS :=  <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/
>> libperl.so
>>   And rebuild.
>
> Thanks for your answer. It's good point. So, Is there a configuration
> option for build. Why im saying this: because all.mk is produced after
> ./configure operation ? If yes first i have to configure radius and then i
> have to change all.mk files.

I believe you should be able to do

 ./configure --with-perl=/path/to/local/bin/perl

or

 PERL=/path/to/local/bin/perl ./configure


Completely untested....  The cflags and ldlibs will be looked up using

 $PERL -MExtUtils::Embed -e ccopts
 $PERL -MExtUtils::Embed -e ldopts

which should Just Work as long as your alternate perl installation is
sane.



Bjørn

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius rlm_perl with Custom Perl

Onur GURSOY
Hello Bjørn,

Hmm this answer is very good.
In this way, in checking Perl section freeradius will see
<pathtomyperl>/bin/Perl and its configuration, right ?
That is excellent
I hope it will be work.

Thank you again,
With best regards.

On Wed, Nov 18, 2020, 10:25 Bjørn Mork <[hidden email]> wrote:

> Onur GURSOY <[hidden email]> writes:
>
> > You have to fix the linker to use that library instead of the system one.
> >>   Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:
> >> TGT_LDLIBS :=  <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/
> >> libperl.so
> >>   And rebuild.
> >
> > Thanks for your answer. It's good point. So, Is there a configuration
> > option for build. Why im saying this: because all.mk is produced after
> > ./configure operation ? If yes first i have to configure radius and then
> i
> > have to change all.mk files.
>
> I believe you should be able to do
>
>  ./configure --with-perl=/path/to/local/bin/perl
>
> or
>
>  PERL=/path/to/local/bin/perl ./configure
>
>
> Completely untested....  The cflags and ldlibs will be looked up using
>
>  $PERL -MExtUtils::Embed -e ccopts
>  $PERL -MExtUtils::Embed -e ldopts
>
> which should Just Work as long as your alternate perl installation is
> sane.
>
>
>
> Bjørn
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Freeradius rlm_perl with Custom Perl

Onur GURSOY
Hello Bjørn,

this configure option (--with-perl=<foorPathto>/bin/perl) is working.
great :-)

Many Many Thanks Again,
Have a Great Day and Healthy Day

Onur GURSOY <[hidden email]>, 18 Kas 2020 Çar, 10:48 tarihinde
şunu yazdı:

> Hello Bjørn,
>
> Hmm this answer is very good.
> In this way, in checking Perl section freeradius will see
> <pathtomyperl>/bin/Perl and its configuration, right ?
> That is excellent
> I hope it will be work.
>
> Thank you again,
> With best regards.
>
> On Wed, Nov 18, 2020, 10:25 Bjørn Mork <[hidden email]> wrote:
>
>> Onur GURSOY <[hidden email]> writes:
>>
>> > You have to fix the linker to use that library instead of the system
>> one.
>> >>   Edit src/modules/rlm_perl/all.mk, and set TGT_LDLIBS to that path:
>> >> TGT_LDLIBS :=
>> <foopath>/perl/lib/5.26.3/x86_64-linux-thread-multi/CORE/
>> >> libperl.so
>> >>   And rebuild.
>> >
>> > Thanks for your answer. It's good point. So, Is there a configuration
>> > option for build. Why im saying this: because all.mk is produced after
>> > ./configure operation ? If yes first i have to configure radius and
>> then i
>> > have to change all.mk files.
>>
>> I believe you should be able to do
>>
>>  ./configure --with-perl=/path/to/local/bin/perl
>>
>> or
>>
>>  PERL=/path/to/local/bin/perl ./configure
>>
>>
>> Completely untested....  The cflags and ldlibs will be looked up using
>>
>>  $PERL -MExtUtils::Embed -e ccopts
>>  $PERL -MExtUtils::Embed -e ldopts
>>
>> which should Just Work as long as your alternate perl installation is
>> sane.
>>
>>
>>
>> Bjørn
>>
>

--
Onur GÜRSOY
R&D Engineer in Embedded Systems
Master Student at Gebze Institute Of Technology
Department Of Electronic Engineering
GSM : 0(545) 764 7653
e-mail: [hidden email]
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html