[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Why -lresolv?

"Jeffrey W. Baker" wrote:
> Howdy,
> I am building an application using the OpenLDAP 2.0 libraries.  Whenever I
> link against -lldap -llber, I also must add -lresolv.

This comes from dnssrv.c, used for service location.  Seems it should be

> I find this
> annoying.  Obviously, you *must* link in all three libraries, or the link
> will fail, so why are these symbols unresolved in libldap.so?  For
> example, the symbols for libssl and libcrypto are resolved, so I don't
> have to pull them in explicitly.

Was broken for some time too.

> How can I fix this, so my application only has to pull in libldap?  I am
> building on Linux, using ./configure with no arguments.

You may force libldap.so creation to include a dependency on -lresolv or
wait for a fix.  It would be best if you reported this through our issue
tracking system at:


so that it is kept in the queue if not immediately solved.