First steps in 3.0

Stefan Winter stefan.winter at restena.lu
Tue Aug 14 10:02:57 CEST 2012


Hi,

thanks for the quick reaction :-)

>   I need to go fix that.  I cleaned up the SQL config, but didn't check
> everything.

Saw your commit in GIT, and used the one with fixes.

>   Create an "rlm_sql_mysql/all.mk" file, and reference it from
> rlm_sql/all.mk
> 
>   Then do a build from the top of the source tree.

Did that; the build now descended into the subdir, but choked over
one thing:

CC src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c
src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:40:27: error: mysql_version.h: No such file or directory
src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:41:20: error: errmsg.h: No such file or directory
src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:42:19: error: mysql.h: No such file or directory

My headers are installed just fine, but in a mysql/ subdir. According
to the code, this *should* be detected by configure and 

#ifdef HAVE_MYSQL_MYSQL_H

should make sure that the mysql/* files are included. But that
doesn't happen, instead the "#else" is taken.

That's with the up-to-date 5.5 sql libs directly from mysql.com.

I fixed that in the code (removing ifdefs) and carried on; but would
be nice if the build system would figure itself out.

In all.mk, I added hardcoded

TGT_LDLIBS    =  -lmysqlclient -lmysqlservices -lmygcc

which allowed the build to go through (I guess configure should take
care of that at some point). rlm_sql_mysql.so and friends are in the
build's lib/ subdir, but still, the binary won't start:

rlm_sql Creating new attribute sql-webmailsso-users-SQL-Group
Could not link driver rlm_sql_mysql: rlm_sql_mysql.so: cannot open shared object file: No such file or directory
Make sure it (and all its dependent libraries!)are in the search path of your system's ld.
/usr/local/freeradius/config//raddb/modules/sql-webmailsso-users[1]: Instantiation failed for module "sql-webmailsso-users"

I don't understand why. ldd on radiusd whows that it's linked
just fine, and the lib paths are known to ld:

radius-int-test:~/freeradius-master # ldd ./build/bin/radiusd
        linux-gate.so.1 =>  (0xb77a2000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb7781000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb776b000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7751000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb771a000)
        libfreeradius-radius.so => /root/freeradius-master/build/lib/.libs/libfreeradius-radius.so (0xb76f0000)
        build/lib/.libs/rlm_acct_unique.so (0xb76ec000)
        build/lib/.libs/rlm_acctlog.so (0xb76e9000)
        build/lib/.libs/rlm_always.so (0xb76e6000)
        build/lib/.libs/rlm_attr_filter.so (0xb76e2000)
        build/lib/.libs/rlm_attr_rewrite.so (0xb76dd000)
        build/lib/.libs/rlm_chap.so (0xb76da000)
        build/lib/.libs/rlm_checkval.so (0xb76d6000)
        build/lib/.libs/rlm_detail.so (0xb76d1000)
        build/lib/.libs/rlm_digest.so (0xb76cb000)
        build/lib/.libs/rlm_dynamic_clients.so (0xb76c8000)
        build/lib/.libs/rlm_eap.so (0xb76bf000)
        build/lib/.libs/rlm_eap_gtc.so (0xb76bc000)
        build/lib/.libs/rlm_eap_leap.so (0xb76b7000)
        build/lib/.libs/rlm_eap_md5.so (0xb76b2000)
        build/lib/.libs/rlm_eap_mschapv2.so (0xb76ad000)
        build/lib/.libs/rlm_eap_peap.so (0xb76a6000)
        build/lib/.libs/rlm_eap_pwd.so (0xb769e000)
        build/lib/.libs/rlm_eap_tls.so (0xb7699000)
        build/lib/.libs/rlm_eap_ttls.so (0xb7693000)
        build/lib/.libs/rlm_exec.so (0xb768f000)
        build/lib/.libs/rlm_expiration.so (0xb768c000)
        build/lib/.libs/rlm_expr.so (0xb7688000)
        build/lib/.libs/rlm_fastusers.so (0xb7682000)
        build/lib/.libs/rlm_files.so (0xb767e000)
        build/lib/.libs/rlm_jradius.so (0xb7678000)
        build/lib/.libs/rlm_linelog.so (0xb7674000)
        build/lib/.libs/rlm_logintime.so (0xb766f000)
        build/lib/.libs/rlm_mschap.so (0xb7665000)
        build/lib/.libs/rlm_pam.so (0xb7661000)
        build/lib/.libs/rlm_pap.so (0xb765b000)
        build/lib/.libs/rlm_passwd.so (0xb7656000)
        build/lib/.libs/rlm_perl.so (0xb764c000)
        build/lib/.libs/rlm_policy.so (0xb7642000)
        build/lib/.libs/rlm_preprocess.so (0xb763e000)
        build/lib/.libs/rlm_radutmp.so (0xb7639000)
        build/lib/.libs/rlm_realm.so (0xb7634000)
        build/lib/.libs/rlm_replicate.so (0xb7631000)
        build/lib/.libs/rlm_sim_files.so (0xb762d000)
        build/lib/.libs/rlm_sometimess.so (0xb762a000)
        build/lib/.libs/rlm_sql.so (0xb7621000)
        build/lib/.libs/rlm_sql_mysql.so (0xb761c000)
        build/lib/.libs/rlm_sql_log.so (0xb7618000)
        build/lib/.libs/rlm_sqlcounter.so (0xb7613000)
        build/lib/.libs/rlm_sqlippool.so (0xb760e000)
        build/lib/.libs/rlm_unix.so (0xb7609000)
        build/lib/.libs/rlm_wimax.so (0xb7604000)
        libfreeradius-eap.so => /root/freeradius-master/build/lib/.libs/libfreeradius-eap.so (0xb75fc000)
        libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7495000)
        libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7445000)
        libc.so.6 => /lib/libc.so.6 (0xb72e9000)
        libdl.so.2 => /lib/libdl.so.2 (0xb72e3000)
        /lib/ld-linux.so.2 (0xb77a3000)
        libpam.so.0 => /lib/libpam.so.0 (0xb72d6000)
        libperl.so => /usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE/libperl.so (0xb7062000)
        libm.so.6 => /lib/libm.so.6 (0xb7039000)
        libutil.so.1 => /lib/libutil.so.1 (0xb7034000)
        libmysqlclient.so.18 => /usr/lib/libmysqlclient.so.18 (0xb6ce5000)
        libz.so.1 => /lib/libz.so.1 (0xb6cd0000)
        libaudit.so.0 => /lib/libaudit.so.0 (0xb6cb6000)
        librt.so.1 => /lib/librt.so.1 (0xb6cab000)

radius-int-test:~/freeradius-master # ll build/lib/.libs/rlm_sql_mysql.so
-rwxr-xr-x 1 root root 30103 Aug 14 09:52 build/lib/.libs/rlm_sql_mysql.so

radius-int-test:~/freeradius-master # ldd build/lib/.libs/rlm_sql_mysql.so
        linux-gate.so.1 =>  (0xb773d000)
        libmysqlclient.so.18 => /usr/lib/libmysqlclient.so.18 (0xb73e2000)
        libc.so.6 => /lib/libc.so.6 (0xb7286000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb726c000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7267000)
        libm.so.6 => /lib/libm.so.6 (0xb723d000)
        librt.so.1 => /lib/librt.so.1 (0xb7233000)
        /lib/ld-linux.so.2 (0xb773e000)


This is now going beyond my knowledge of lib-magic.

Greetings,

Stefan Winter

> 
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
> 


-- 
Stefan WINTER
Ingenieur de Recherche
Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche
6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg

Tel: +352 424409 1
Fax: +352 422473

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20120814/9ee780ac/attachment-0001.pgp>


More information about the Freeradius-Devel mailing list