Attempting to compile OpenLDAP (2.3.2beta or 2.2.24) results in the
following message:
cc -g -O2 -o dntest dntest.o ./.libs/libldap.a
/Users/finlay/openldap-2.3.2beta/libraries/liblber/.libs/liblber.a
../../libraries/liblber/.libs/liblber.a
../../libraries/liblutil/liblutil.a -lssl -lcrypto
ld: Undefined symbols:
_res_9_dn_expand
_res_9_query
make[2]: *** [dntest] Error 1
make[1]: *** [all-common] Error 1
make: *** [all-common] Error 1
These symbols are in libresolv. There are two solutions: either use
the BIND 8 resolver API or add -lresolve to the LDFLAGS. However, this
should be detected by the build system so it compiles out of the box.
Jason Townsend provided a patch, but it was rejected unequivocally
(see
<http://www.openldap.org/its/index.cgi/Build?id=2763;expression=lresolv;s
tatetype=-1>).