How to compile 2.1.3 under Cygwin

Joachim Altenhein Joachim.Altenhein at mikado.de
Mon Dec 22 11:58:45 CET 2008


Hello,

i moved this topic from the users to the developer list. Sorry for this cross posting.

Here the original question:

i'm trying to compile Freeradius 2.1.3 under Cygwin.

I used './configure --without-rlm_perl' and './configure --without-rlm_perl --without-snmp --enable-static' which compile successfully.

I'm using a fresh cygwin installation and 'make install' works great.

But when i start 'radiusd -X' i always get:

...
 realm LOCAL {
 }
radiusd: #### Instantiating modules ####
 instantiate {
/usr/local/etc/raddb/modules/exec[24]: Failed to link to module 'rlm_exec': No such file or directory
Errors initializing modules

I do have the files rlm_exec-2.1.3.la, rlm_exec.a and rlm_exec.la in /usr/local/lib. Note, that the problem is not specific to rlm_exec. Same is true e.g. for rlm_expr and i think my installation is not able to load any rlm_*file.

Shouldn't be there some typ of .dll/.so?

Could anybody please tell my who to make freeradius for windows/cygwin.

That was the original posting. Now i know more:

The problem is releted to the following libtool error:
*** Warning: This system can not link to static lib archive ../../libeap/libfreeradius-eap.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries

libtool never builds dll files under cygwin if -no-undefined is not specified on the command line.

I change a line in src/lib (LINK_MODE	= -export-dynamic -no-undefined) and got a dll.
Than i have done the same on rules.mak and here the make failed:

/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/libtool --mode=link gcc -release 2.1.3 \
        -no-undefined -module -export-dynamic   -o rlm_acctlog.la     \
        -rpath /usr/local/lib rlm_acctlog.lo rlm_acctlog.c /cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/lib/libfreeradius-radius.la  -lws2_32  -lpthread
gcc -shared  .libs/rlm_acctlog.o  /cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/lib/.libs/libfreeradius-radius.dll.a -lws2_32 -lpthread  -o .libs/rlm
_acctlog-2-1-3.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/rlm_acctlog.dll.a
.libs/rlm_acctlog.o: In function `acctlog_instantiate':
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:63: undefined reference to `_rad_malloc'
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:66: undefined reference to `_cf_section_parse'
.libs/rlm_acctlog.o: In function `do_acctlog_acct':
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:110: undefined reference to `_radius_xlat'
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:116: undefined reference to `_radlog'
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:91: undefined reference to `_radius_xlat'
/cygdrive/g/Daten/freeradius/freeradius-server-2.1.3/src/modules/rlm_acctlog/rlm_acctlog.c:92: undefined reference to `_radlog'
Creating library file: .libs/rlm_acctlog.dll.a
collect2: ld returned 1 exit status
make[6]: *** [rlm_acctlog.la] Error 1

To fix this i would have to put all the functions undefined here in a dll. This is far beyond me knowledge of freeradius and sigificantly exceeds me time frame for implementing a Radius server :-(

Any further suggestions? Can i link the rlm* modules statically to radiusd?

Thanks for any help.

  Joachim Altenhein





More information about the Freeradius-Devel mailing list