Hello,<br><br>I am writing a FreeRadius (Version 2) module for version Freeradius 2.1.10 . The module works fine. When i want to link a shared/static library from the Makefile of the module i get errors.<br><br>I link to a static library and i run radius server with the module ( radiusd -X) then i get the error: <br>
<br>/usr/local/etc/raddb/radiusd.conf[665]: Failed to link to module 'rlm_itap': file not found<br><br>makefile of the freeradius module :<br><br><i>VERS = 2.1.10<br>CFLAGS = -DNDEBUG -Wall -I/usr/include \<br> -I/usr/ports/net/freeradius2/work/freeradius-server-$(VERS)/src<br>
LIBS = -lc -L. icc-wrapper.a<br>ALL: rlm_itap.o rlm_itap-$(VERS).so</i><br><br><br>rlm_itap is the name of my module. When i remove <i>icc-wrapper.a , everything works fine.<br><br><br></i>For the shared library case. Everything works fine until the function from the shared library is called inside the module. I got the error:<br>
<br>/libexec/ld-elf.so.1: /usr/local/lib/freeradius-2.1.10/rlm_itap.so: Undefined symbol "sendiccmsg"<br><br>in that case. sendiccmsg is the only function i have in my shared library. <br><br>The makefile of the freeradius module: <br>
<br>VERS = 2.1.10<br><br>CFLAGS = -DNDEBUG -Wall -I/usr/include \<br> -I/usr/ports/net/freeradius2/work/freeradius-server-$(VERS)/src<br><br>LIBS = -lc icc-wrapper.so<br> <br>ALL: rlm_itap.o rlm_itap-$(VERS).so<br>
<br>rlm_itap.o: rlm_itap.c<br> cc -g -fPIC -DPIC -c $(CFLAGS) rlm_itap.c<br><br>rlm_itap-$(VERS).so: rlm_itap.o<br> cc -g -shared -Wl,-soname,rlm_itap-$(VERS).so \<br> -o rlm_itap-$(VERS).so rlm_itap.o $(LIBS)<br>
<br>install: ALL<br> install rlm_itap-$(VERS).so /usr/local/lib/freeradius-$(VERS)<br> ln -fs rlm_itap-$(VERS).so /usr/local/lib/freeradius-$(VERS)/rlm_itap.so<br><br>clean:<br> rm rlm_itap*.o rlm_itap*.so<br>
<br><br><br>The static/shred library i am using is compiled as a C++ library with extern "C" in front of function definitions.<br><br><br>Regards<br>Resit Sahin<br>