On 10:32 Thu 25 Dec , Anders Holm wrote:
> Anatoly S. Zimin wrote:
> >> Greg Fuller wrote:
> >> [snip]
> >> $ cd /usr/local/src/freeradius-server-2.1.3/
> >> $ rm -rf src/modules/rlm_perl
> >>
> > This is not solution.
> > I am know how resolve this problem.
> > If anyone need this. Please ask me.
> > May be this solution need for developers.
> > I am long time useing FreeRadius on Solaris.
> > And I am know how to do this.
> >
>
> Post it to the list, and document it in the Wiki. Someone is bound to
> need a real solution to this problem.
>
> //anders
OK.
How to build rlm_perl module on Solaris 9/10.
Work on FreeRadius 1.x and 2.x
Set shell environment like LDFLAGS, LD_OPTIONS, and others.
# export
PATH=$PATH:/usr/sbin:/usr/bin:/opt/csw/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/local/bin:/usr/sfw/bin
# export LDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib -L/lib -R/lib'
# export LD_OPTIONS='-L/usr/sfw/lib -R/usr/sfw/lib -L/lib -R/lib'
# export CFLAGS='-I/usr/include -I/usr/sfw/include -I/usr/include/kerberosv5
-I/zones/src/freeradius-server-2.1.3/libltdl'
# /usr/sfw/bin/gtar -xvjf freeradius-*
# cd freeradius-*
# patch < solaris.rlm_perl.patch
File to patch: src/modules/rlm_perl/configure
done.
# ./configure --prefix=/path/to/install
--with-openssl-includes=/usr/sfw/include --with-openssl-libraries=/usr/sfw/lib
# gmake
# gmake install
P.S. patch file in attach.
Where I got it?
I am read this in manual for gcc! :)
########################
-mimpure-text
-mimpure-text, used in addition to -shared, tells the compiler to
not pass -z text to the linker when linking a shared object. Using
this option, you can link position-dependent code into a shared
object.
-mimpure-text suppresses the ``relocations remain against allocat-
able but non-writable sections'' linker error message. However,
the necessary relocations will trigger copy-on-write, and the
shared object is not actually shared across processes. Instead of
using -mimpure-text, you should compile all source code with -fpic
or -fPIC.
This option is only available on SunOS and Solaris.
########################
And please somebody put this on freeradius Wiki.
Or include in main branch of freeradius.
Thanks a lot.
--
Anatoly S. Zimin
--- src/modules/rlm_perl/configure Thu Dec 25 15:28:18 2008
+++ src/modules/rlm_perl/configure.good Thu Dec 25 15:50:52 2008
@@ -3249,7 +3249,7 @@
fi
old_LIBS="$LIBS"
- LIBS="$old_LIBS `perl -MExtUtils::Embed -e ldopts`"
+ LIBS="$old_LIBS `perl -MExtUtils::Embed -e ldopts` -fPIC -mimpure-text"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3295,7 +3295,7 @@
conftest$ac_exeext conftest.$ac_ext
if test "x$BROKEN" = "x"; then
- perl_ldflags='`perl -MExtUtils::Embed -e ldopts`'
+ perl_ldflags='`perl -MExtUtils::Embed -e ldopts` -fPIC -mimpure-text'
else
fail="$fail libperl.so"
targetname=
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html