[Date Prev][Date Next]
Re: (ITS#3982) libldap compile settings
Kurt D. Zeilenga wrote:
> Generally, we detect (or env is provided) for dynamic linking. For
> instance, we likely only know that -lsasl links in SASL using some
> provided -L's (and/or whatever), but we don't know what libraries
> -lsasl might dynamically link in. If, like you, the user wants to
> statically link in -lldap, then -lsasl and its dependencies will
> also need to be statically linked in. Using -lsasl and those -L's
> (and/or whatever) simply won't cut it.
Reading your answers, my impression is static linkage for OpenLDAP
binaries is broken, too. If that's the case, there's no way I can fix
static linkage for LDAP support in FreeRADIUS. I wonder what happens
when you run ./configure --disable-shared in the OpenLDAP source tree.
> Also, there is no guarantee (*) that the client developer is using
> the same compiler tool chain as was used to build ldap libraries.
> That can cause all kinds of problems.
> (* given that we use a custom libtool, one can argue its guaranteed
> that the -lldap installer is using a different build
> environment/tool chain...)
Different versions of libtool would be an issue if the client
developper try to use the file libldap.la. However, you usually don't
install this file in /usr/lib. (but the file libldap.a instead)
> I note that your script assumes that the complier tool chain accepts
> -I/..., that's actually a bad assumption. There are certainly
> compiler tool chains for POSIX -based (or -like) systems which don't
> take -I's. My point here not to ding this particular assumption,
> but to ding the more general assumption that client developer has a
> comparable environment/tool chain to that used by the -lldap
The goal here is to save the options used to build OpenLDAP binaries
on the *local* system. If the user builds on his system different
libraries with different compiler/binutils, and if it doesn't work,
then I think he deserves what he gets.
> Personally, I have never found these scripts to be particularly
As a developper of the FreeRADIUS project, my experience is we have
less build-related problems with MySQL and PostgreSQL (which provides
scripts mysql_config and pg_config) than OpenLDAP.
Here's a concrete example of the problems from the libldap dependancies: