Freeradius static compilation with openssl
Hi All, I have been trying to build Free-Radius with static libraries.The following configuration I have tried. ./configure --prefix=/home/FrRadius --disable-shared --with-openssl-libraries=/home/opensslDir8b/lib/ --with-openssl-includes=/home/opensslDir8b/include/ I have compiled openssl with the following configuration ./config no-shared --prefix=/home/openssl And I have tried almost all the combinations like, openssl with shared option,no-shared option and freeradius with "--enable-static", "--enable-shared=no".. but I am getting the same linking error all the time. The error message shown below: **************************************************************************** **************************************************************************** ******* ........................... .......................................... .......................................................... extracting global C symbols from `../modules/rlm_files/.libs/rlm_files.a' extracting global C symbols from `../modules/rlm_ippool/.libs/rlm_ippool.a' extracting global C symbols from `../modules/rlm_mschap/.libs/rlm_mschap.a' extracting global C symbols from `../modules/rlm_preprocess/.libs/rlm_preprocess.a' extracting global C symbols from `../modules/rlm_realm/.libs/rlm_realm.a' extracting global C symbols from `../modules/rlm_unix/.libs/rlm_unix.a' extracting global C symbols from `../modules/rlm_eap/types/rlm_eap_sim/.libs/rlm_eap_sim.a' extracting global C symbols from `../modules/rlm_eap/types/rlm_eap_mschapv2/.libs/rlm_eap_mschapv2.a' (cd .libs && gcc -I/home/Fradius-1.0/libltdl/ -c -fno-builtin "radiusdS.c") rm -f .libs/radiusdS.c .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT gcc .libs/radiusdS.o -pie -static -o radiusd acct.o auth.o client.o conffile.o exec.o files.o log.o mainconfig.o modules.o modcall.o nas.o proxy.o radiusd.o radius_snmp.o request_list.o session.o smux.o threads.o util.o valuepair.o version.o timestr.o xlat.o -Wl,--export-dynamic ../modules/rlm_acct_unique/.libs/rlm_acct_unique.a ../modules/rlm_always/.libs/rlm_always.a ../modules/rlm_attr_filter/.libs/rlm_attr_filter.a ../modules/rlm_attr_rewrite/.libs/rlm_attr_rewrite.a ../modules/rlm_chap/.libs/rlm_chap.a ../modules/rlm_counter/.libs/rlm_counter.a ../modules/rlm_detail/.libs/rlm_detail.a ../modules/rlm_eap/.libs/rlm_eap.a ../modules/rlm_exec/.libs/rlm_exec.a ../modules/rlm_expr/.libs/rlm_expr.a ../modules/rlm_fastusers/.libs/rlm_fastusers.a ../modules/rlm_files/.libs/rlm_files.a ../modules/rlm_ippool/.libs/rlm_ippool.a /usr/lib/libgdbm.so ../modules/rlm_mschap/.libs/rlm_mschap.a ../modules/rlm_preprocess/.libs/rlm_preprocess.a ../modules/rlm_realm/.libs/rlm_realm.a ../modules/rlm_unix/.libs/rlm_unix.a ../modules/rlm_eap/types/rlm_eap_sim/.libs/rlm_eap_sim.a /home/Fradius-1.0/src/modules/rlm_eap/libeap/.libs/libeap.a ../modules/rlm_eap/types/rlm_eap_mschapv2/.libs/rlm_eap_mschapv2.a ../modules/rlm_eap/libeap/.libs/libeap.a /home/Fradius-1.0/src/lib/.libs/libradius.a ../lib/.libs/libradius.a -lcrypt /home/Fradius-1.0/libltdl/.libs/libltdl.a -ldl -lnsl -lresolv -lpthread /usr/bin/ld: -static and -shared may not be used together collect2: ld returned 1 exit status rm -f .libs/radiusdS.o gmake[4]: *** [radiusd] Error 1 gmake[4]: Leaving directory `/home/Fradius-1.0/src/main' gmake[3]: *** [common] Error 2 gmake[3]: Leaving directory `/home/Fradius-1.0/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/home/Fradius-1.0/src' gmake[1]: *** [common] Error 2 gmake[1]: Leaving directory `/home/Fradius-1.0' make: *** [all] Error 2 **************************************************************************** ************************************************************************* Is it posible to compile freeradius with static option ?? If so how I can compile with openssl ?? Please help me out!!! Thanks in advance. Regards, Hithesh The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information.
hitheshm@tataelxsi.co.in wrote:
I have been trying to build Free-Radius with static libraries.The following configuration I have tried.
./configure --prefix=/home/FrRadius --disable-shared --with-openssl-libraries=/home/opensslDir8b/lib/ --with-openssl-includes=/home/opensslDir8b/include/
That should work, presuming all necessary libraries have been built statically. ...
/home/Fradius-1.0/src/lib/.libs/libradius.a ../lib/.libs/libradius.a -lcrypt /home/Fradius-1.0/libltdl/.libs/libltdl.a -ldl -lnsl -lresolv
It looks like it's still trying to use -ldl, which is a dynamic library. Also, you're using version 1. Version 2 is much better...
Is it posible to compile freeradius with static option ?? If so how I can compile with openssl ?? Please help me out!!!
I've done it with Version 2. I haven't tried it with Version 1 in a long time. Alan DeKok.
Thank you for your reply...As you said I have tried with latest freeradius-server-2.0.2 but I am getting the following compilation error...I have used the same config as used previously...I think prblm might be with environmental variables...I don't know how to make it properly...Still it is attempting to static link of dynamic object...Can you please help me?? **************************************************************************** ********************************* .............................................. bs/rlm_ippool.a /usr/lib/libgdbm.so ../modules/rlm_krb5/.libs/rlm_krb5.a -lkrb5 -lcom_err -lk5crypto ../modules/rlm_ldap/.libs/rlm_ldap.a -lldap_r ../modules/rlm_logintime/.libs/rlm_logintime.a ../modules/rlm_mschap/.libs/rlm_mschap.a ../modules/rlm_pam/.libs/rlm_pam.a -lpam ../modules/rlm_pap/.libs/rlm_pap.a ../modules/rlm_passwd/.libs/rlm_passwd.a ../modules/rlm_perl/.libs/rlm_perl.a -L/usr/local/lib -L/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE -lperl -lc ../modules/rlm_preprocess/.libs/rlm_preprocess.a ../modules/rlm_python/.libs/rlm_python.a -L/usr/lib/python2.4/config -lutil -lpython2.4 -lm ../modules/rlm_radutmp/.libs/rlm_radutmp.a ../modules/rlm_realm/.libs/rlm_realm.a ../modules/rlm_sql/.libs/rlm_sql.a ../modules/rlm_sqlcounter/.libs/rlm_sqlcounter.a ../modules/rlm_sqlippool/.libs/rlm_sqlippool.a ../modules/rlm_sql_log/.libs/rlm_sql_log.a ../modules/rlm_unix/.libs/rlm_unix.a ../modules/rlm_policy/.libs/rlm_policy.a ../modules/rlm_eap/types/rlm_eap_md5/.libs/rlm_eap_md5.a ../modules/rlm_eap/types/rlm_eap_leap/.libs/rlm_eap_leap.a ../modules/rlm_eap/types/rlm_eap_tls/.libs/rlm_eap_tls.a -L/home/teleap/opensslDir8b/lib/ ../modules/rlm_eap/types/rlm_eap_ttls/.libs/rlm_eap_ttls.a ../modules/rlm_eap/types/rlm_eap_sim/.libs/rlm_eap_sim.a ../modules/rlm_eap/types/rlm_eap_peap/.libs/rlm_eap_peap.a /home/hitheshm/freeradius-server-2.0.2/src/modules/rlm_eap/libeap/.libs/libf reeradius-eap.a ../modules/rlm_eap/types/rlm_eap_mschapv2/.libs/rlm_eap_mschapv2.a ../modules/rlm_eap/types/rlm_eap_gtc/.libs/rlm_eap_gtc.a ../modules/rlm_eap/libeap/.libs/libfreeradius-eap.a /home/hitheshm/freeradius-server-2.0.2/src/lib/.libs/libfreeradius-radius.a -lnsl -lresolv -lpthread -lcrypt /home/hitheshm/freeradius-server-2.0.2/libltdl/.libs/libltdl.a -ldl -lssl -lcrypto /usr/bin/ld: attempted static link of dynamic object `/usr/lib/libgdbm.so' collect2: ld returned 1 exit status rm -f .libs/radiusdS.o gmake[4]: *** [radiusd] Error 1 gmake[4]: Leaving directory `/home/hitheshm/freeradius-server-2.0.2/src/main' gmake[3]: *** [common] Error 2 gmake[3]: Leaving directory `/home/hitheshm/freeradius-server-2.0.2/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/home/hitheshm/freeradius-server-2.0.2/src' gmake[1]: *** [common] Error 2 gmake[1]: Leaving directory `/home/hitheshm/freeradius-server-2.0.2' make: *** [all] Error 2 **************************************************************************** ********************************* Thanks, Hithesh -----Original Message----- From: freeradius-devel-bounces+hitheshm=tataelxsi.co.in@lists.freeradius.org [mailto:freeradius-devel-bounces+hitheshm=tataelxsi.co.in@lists.freeradius.o rg] On Behalf Of Alan DeKok Sent: Tuesday, March 25, 2008 3:37 PM To: FreeRadius developers mailing list Subject: Re: Freeradius static compilation with openssl hitheshm@tataelxsi.co.in wrote:
I have been trying to build Free-Radius with static libraries.The following configuration I have tried.
./configure --prefix=/home/FrRadius --disable-shared --with-openssl-libraries=/home/opensslDir8b/lib/ --with-openssl-includes=/home/opensslDir8b/include/
That should work, presuming all necessary libraries have been built statically. ...
/home/Fradius-1.0/src/lib/.libs/libradius.a ../lib/.libs/libradius.a -lcrypt /home/Fradius-1.0/libltdl/.libs/libltdl.a -ldl -lnsl -lresolv
It looks like it's still trying to use -ldl, which is a dynamic library. Also, you're using version 1. Version 2 is much better...
Is it posible to compile freeradius with static option ?? If so how I can compile with openssl ?? Please help me out!!!
I've done it with Version 2. I haven't tried it with Version 1 in a long time. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information.
hitheshm@tataelxsi.co.in wrote:
Thank you for your reply...As you said I have tried with latest freeradius-server-2.0.2 but I am getting the following compilation error...I have used the same config as used previously...I think prblm might be with environmental variables...
No.
I don't know how to make it properly...Still it is attempting to static link of dynamic object...
Because your system does not have a static version of libgdbm installed. Fix that. It is NOT a FreeRADIUS problem. It may take a fair amount of effort to install static versions of all of the libraries needed by FreeRADIUS. See your local OS documentation for how to do this. Alan DeKok.
participants (2)
-
Alan DeKok -
hitheshm@tataelxsi.co.in