Library dependencies

Marcus Brinkmann Marcus.Brinkmann at
Sun Nov 17 18:47:02 CET 2002

On Sun, Nov 17, 2002 at 10:36:47AM -0500, Neal H. Walfield wrote:
> > Unfortunately, OpenLDAP is terrible about changing their
> > dependencies every other release.  Until they start providing a
> > "openldap-config" script or similar (I donated one a month or two
> > ago), people are going to have to juggle the dependencies by hand via
> > LDAPLIBS for everything but the simplest LDAP configuration.  This is
> > in the NEWS file, incidentally.
> This is the wrong approach.  Library dependencies on elf based systems
> can be expressed via a DT_NEEDED in the library itself; it is not the
> application's responsibility to determine which libraries a library
> depends on.

You need them for static linking at least.  The DT_NEEDED field is only
really intended for run time linking, it is orthogonal to the task of
openldap-config and similar scripts.  In particular, DT_NEEDED doesn't
relieve you from sspecifying the libraries on the command line when linking
(although it often works in the real world, and is very convenient, it is
not the correct thing to do in the general case - not only for static
linking, but also for ordering and probably in other cases like weak
symbols, where omitting a library works but doesn't have the desired


`Rhubarb is no Egyptian god.' GNU    marcus at
Marcus Brinkmann              The Hurd
Marcus.Brinkmann at

More information about the Gnupg-devel mailing list