On Tuesday, December 30, 2003, at 07:24 AM, Farokh Irani wrote:


I mailed earlier about this problem. I have found a solution. Here it is:
I found a little bug in the "src/main/Makefile.in". In the normal setup, radius uses dynamic libraries and default search paths.
Problem arises when I give this: "./configure --with-threads=no --enable-static=yes --enable-shared=no --prefix=somedir --exec-prefix=somedir"
After doing this everything the Make, make install goes well. But when I run "somedir/sbin/radiusd -X" it shows that it cannot find module md5 for eap.
To get around this problem I added some lines to "src/main/Makefile.in" which are as follows:
Originally a particular section looked like:


ifneq ($(USE_SHARED_LIBS),yes)
MODULE_LIBS += $(shell for x in $(MODULES);do test -f ../modules/$$x/$$x.la && echo -dlpreopen ../modules/$$x/$$x.la;done)
MODULE_OBJS += $(shell for x in $(MODULES);do test -f ../modules/$$x/$$x.la && echo ../modules/$$x/$$x.la;done)
endif


I changed it to:
ifneq ($(USE_SHARED_LIBS),yes)
MODULE_LIBS += $(shell for x in $(MODULES);do test -f ../modules/$$x/$$x.la && echo -dlpreopen ../modules/$$x/$$x.la;done)


MODULE_LIBS += $(shell test -f ../modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.la && echo -dlpreopen ../modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.la)
MODULE_LIBS += $(shell test -f ../modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.la && echo -dlpreopen ../modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.la)


MODULE_OBJS += $(shell for x in $(MODULES);do test -f ../modules/$$x/$$x.la && echo ../modules/$$x/$$x.la;done)

MODULE_OBJS += $(shell test -f ../modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.la && echo ../modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.la)
MODULE_OBJS += $(shell test -f ../modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.la && echo ../modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.la)
endif



After that all went well. Actually, the rlm_eap_md5.la and rlm_eap_leap.la were not deing dlpreopen-ed in case of static >> modules.


I hope what I said was correct.
Please let me know if there is any other way to get around the problem.

Well, the above solved my problem, but only when I reconfigured using the options you specified above. If I tried to use the ./configure --disable-shared specified in doc/MACOSX then the above didn't seem to help.


Has anyone attempted to contact Apple about the dynamic loading issue? I find it a bit hard to believe that OS X has a problem that other variants of BSD don't.


BSD proper uses standard 'shared object' (.so) libraries. MacOSX uses a different kind of shared object for 'Mach-O' dynamic linking (.dylib). The differences between these are not really relevant to this list, but it should be enough to say that their symbol tables, and the way the symbols are resolved at compile time are quite different. For more information on these differences reference the documentation located in /Developer/Documentation/DeveloperTools on MacOSX with the devtools installed in their default location.


There is a lot of discussion regarding Apple's use of the non-so shared libraries on other lists if its a discussion you want to take up with them. Apple is choosing to use the Mach-O libraries over the .so libraries, their most common reason has to do with library versioning issues. Popular opinion is that Mach-O was developed in house, and they don't like to admit someone did something better. By all means, yell at them, we'd all love to see .so's be the default in the darwin kernel.

frm



- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to