RTLD_GLOBAL and sql_ippool

Stephen Gran steve at lobefin.net
Fri May 9 15:46:41 CEST 2008


On Fri, May 09, 2008 at 02:56:54PM +0200, Alan DeKok said:
> Stephen Gran wrote:
> > Does anyone have any great ideas for how to make this work?  How
> > difficult would it be to change the name of the modules from rlm_*
> > to librlm_* ?  Or is there a better way I'm not seeing?
> 
>   The problem is that libtool is getting in the way here.  The dynamic
>   linker can link to rlm_foo.so if you point to the file directly.
>   The "lib" prefix requirement is there only for the common case.
> 
>   libtool, on the other hand... if you give it
>   "/path/to/rlm/rlm_foo.la", it will often produce a link line saying
>   "-L/path/to/rlm -lfoo", which is wrong.  If you instead link to a
>   library as "-lfoo", it will produce a link line of
>   "/usr/lib/libfoo.so".

It does this even though the .la file says the name of the object does
not start with lib*, which is just special.

>   I can't figure out why it does this.  It's retarded.

Agreed.

> > Sorry - I didn't quite finish that thought.  What I meant to say was
> > that for the time being, we're stuck with either broken modules or
> > using a bundled libltdl, neither of which is a great solution.  It
> > looks like libtdl upstream will make it possible to load the way we
> > are again with the stock library, but that will mean code changes in
> > freeradius as well.
> 
>   What code changes?

It looks to me like they've preserved the existing API, but added some
new wrapper functions to enable loading with RTDL_GLOBAL.  If freeradius
wants to continue loading symbols with RTDL_GLOBAL, the dlopen routines
will have to be changed to use the new functions.  If freeradius wants
to not use RTDL_GLOBAL (better, IMHO), then we need to fix the build
system to support that somehow.  I haven't looked at it for a month or
so, so I forget some of the details now.  If you like, I'll have
another look and see what I can come up with.

> >  So, given that either waiting or doing some work now means some
> >  changes, which seems like a better plan?
> 
>   I'd rather see it fixed properly.

Agreed.
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Snow and adolescence are the only       |
|  steve at lobefin.net             | problems that disappear if you ignore   |
|  http://www.lobefin.net/~steve | them long enough.                       |
 --------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20080509/39303337/attachment.pgp>


More information about the Freeradius-Devel mailing list