Having compiled things properly (thanks, Alan!), the next step is to get
freeradius talking to mysql. 

Got this on startup:

rlm_sql (sql): Could not link driver rlm_sql_mysql: file not found
blah blah blah

Searched the archives and made sure everthing suggested was addressed.

configure looks good:

<snip>
configuring in src/modules/rlm_sql/drivers/rlm_sql_mysql
running /bin/sh ./configure  -prefix=/f --disable-shared
--with-mysql-include-dir=/usr/local/mysql/include
--with-mysql-lib-dir=/usr/local/mysql/lib --enable-ltdl-install
--enable-ltdl-install --cache-file=../../../../.././config.cache
--srcdir=.
loading cache ../../../../.././config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -pthread -D_THREAD_SAFE -Wall
-D_GNU_SOURCE -DNDEBUG ) works... yes
checking whether the C compiler (gcc -g -O2 -pthread -D_THREAD_SAFE -Wall
-D_GNU_SOURCE -DNDEBUG ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for compress in -lz... (cached) yes
checking for mysql/mysql.h... yes
checking for mysql_init in -lmysqlclient... yes
updating cache ../../../../.././config.cache
creating ./config.status
creating Makefile
</snip>

make gives me this:

<snip>
make[10]: Entering directory
`/usr/home/alan/freeradius-0.8.1/src/modules/rlm_sql/drivers/rlm_sql_mysql'
/usr/home/alan/freeradius-0.8.1/libtool --mode=compile gcc  -g -O2
-pthread -D_THREAD_SAFE -Wall -D_GNU_SOURCE -DNDEBUG -I../..
-I../../../../include -I/usr/local/mysql/include
-I/usr/home/alan/freeradius-0.8.1/libltdl -c sql_mysql.c
gcc -g -O2 -pthread -D_THREAD_SAFE -Wall -D_GNU_SOURCE -DNDEBUG -I../..
-I../../../../include -I/usr/local/mysql/include
-I/usr/home/alan/freeradius-0.8.1/libltdl -c sql_mysql.c -o sql_mysql.o
echo timestamp > sql_mysql.lo
/usr/home/alan/freeradius-0.8.1/libtool --mode=link gcc -module -static
-g -O2 -pthread -D_THREAD_SAFE -Wall -D_GNU_SOURCE -DNDEBUG -I../..
-I../../../../include \
-I/usr/local/mysql/include -I/usr/home/alan/freeradius-0.8.1/libltdl -o
rlm_sql_mysql.la -rpath /f/lib sql_mysql.lo -L/usr/local/mysql/lib/mysql
-lmysqlclient  -lz
rm -fr .libs/rlm_sql_mysql.la .libs/rlm_sql_mysql.* .libs/rlm_sql_mysql.*
ar cru .libs/rlm_sql_mysql.a  sql_mysql.o
ranlib .libs/rlm_sql_mysql.a
creating rlm_sql_mysql.la
(cd .libs && rm -f rlm_sql_mysql.la && ln -s ../rlm_sql_mysql.la
rlm_sql_mysql.la)
make[10]: Leaving directory
`/usr/home/alan/freeradius-0.8.1/src/modules/rlm_sql/drivers/rlm_sql_mysql'
</snip>

and make install gives me this:

<snip>
make[11]: Entering directory
`/usr/home/alan/freeradius-0.8.1/src/modules/rlm_sql/drivers/rlm_sql_mysql'
[ "xrlm_sql_mysql" = "x" ] || /usr/home/alan/freeradius-0.8.1/libtool
--mode=install /usr/home/alan/freeradius-0.8.1/install-sh -c -c
rlm_sql_mysql.la /f/lib/rlm_sql_mysql.la
/usr/home/alan/freeradius-0.8.1/install-sh -c -c .libs/rlm_sql_mysql.lai
/f/lib/rlm_sql_mysql.la
/usr/home/alan/freeradius-0.8.1/install-sh -c -c .libs/rlm_sql_mysql.a
/f/lib/rlm_sql_mysql.a
ranlib /f/lib/rlm_sql_mysql.a
chmod 644 /f/lib/rlm_sql_mysql.a
----------------------------------------------------------------------
Libraries have been installed in:
   /f/lib

If you ever happen to want to link against installed libraries
</snip>
We all know this verbiage.
<snip>
make[11]: Leaving directory
`/usr/home/alan/freeradius-0.8.1/src/modules/rlm_sql/drivers/rlm_sql_mysql'

</snip>

So, being a little rusty at compiling and linking and whatnot, my guess is
that ld ain't making it. I added /f/lib to the ld.so.conf file, put copies
of all of the rlm*.a and rlm*.la files in /usr/local/lib. Still getting
the famous 'could not link driver' message.

I realize this is more of an OS problem than a freeradius one, but man
pages and other available info are rather dense (or I am), and I'm not
able to get this working.

Any thoughts? Replying off-list would be fine.

thanks,
Jim


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

Reply via email to