FreeRadius Solaris
Материал из noname.com.ua
Сборка под Solaris 10
Обязательно нужен Оракл-клиент (с SDK), причем как на этапе сборки так и на этапе работы.
С помощью configure мне не удалось получить нормальный Makefile, потому отредактировал его руками
freeradius-server-2.1.9/src/modules/rlm_sql/drivers/rlm_sql_oracle/Makefile include ../../../../../Make.inc TARGET = rlm_sql_oracle SRCS = sql_oracle.c RLM_SQL_CFLAGS = -I/export/home/oracle/client/instantclient_10_2/sdk/include $(INCLTDL) RLM_SQL_LIBS = -L/export/home/oracle/client/instantclient_10_2 -lclntsh -lm ORACLE_HOME = /export/home/oracle/client/instantclient_10_2/ CFLAGS = -I/export/home/oracle/client/instantclient_10_2/sdk/include/ LDFLAGS = -L/export/home/oracle/client/instantclient_10_2/sdk/include/ include ../rules.mak
После чего в этом же катаалоге набираю
#gmake
и получаю рабочий модуль.
rlm_sql_oracle-2.1.9.so
Однако, дальнейшие попытки собрать FreeRadius 2.1.ХХ под Solaris закончилась неудачей.
Я получал сообщение
(cd .libs && gcc -g -O2 -c -fno-builtin "radiusdS.c") rm -f .libs/radiusdS.c .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT gcc .libs/radiusdS.o -o .libs/radiusd .libs/acct.o .libs/auth.o .libs/client.o .libs/conffile.o .libs/crypt.o .libs/exec.o .libs/files.o .libs/listen.o .libs/log.o .libs/mainconfig.o .libs/modules.o .libs/modcall.o .libs/radiusd.o .libs/stats.o .libs/session.o .libs/threads.o .libs/util.o .libs/valuepair.o .libs/version.o .libs/xlat.o .libs/event.o .libs/realms.o .libs/evaluate.o .libs/vmps.o .libs/detail.o /root/src/freeradius-server-2.1.9/src/lib/.libs/libfreeradius-radius.so -lnsl -lresolv -lsocket -lposix4 -lpthread -lcrypt -lltdl -lssl -lcrypto -R/usr/local/freeradius/lib Undefined first referenced symbol in file lt__PROGRAM__LTX_preloaded_symbols .libs/modules.o ld: fatal: Symbol referencing errors. No output written to .libs/radiusd collect2: ld returned 1 exit status gmake[4]: *** [radiusd] Error 1 gmake[4]: Leaving directory `/root/src/freeradius-server-2.1.9/src/main' gmake[3]: *** [main] Error 2 gmake[3]: Leaving directory `/root/src/freeradius-server-2.1.9/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/root/src/freeradius-server-2.1.9/src' gmake[1]: *** [src] Error 2 gmake[1]: Leaving directory `/root/src/freeradius-server-2.1.9' gmake: *** [all] Error 2
It's a bug in libltdl that is in Ubuntu. See /usr/include/ltdl.h on the affected system. It has a line: #define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols Q: Where is lt__PROGRAM__LTX_preloaded_symbols defined or referenced? A: Nowhere. If you spend some time spelunking through the internals of libltdl, you will discover that there *is* a symbol lt_libltdl_LTX_preloaded_symbols The obvious thing to do is to change the FreeRADIUS code to add: #define lt__PROGRAM__LTX_preloaded_symbols lt_libltdl_LTX_preloaded_symbols It then compiles and runs properly. Can we close this as a FreeRADIUS bug, and report it against libltdl? Searching google for lt__PROGRAM__LTX_preloaded_symbols shows similar problems with a number of projects. I have *no* idea why this happens for some projects using libltld, and not others. I *do* know that the problem is very clear-cut: libltdl is buggy, and I hate it beyond words.