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;statetype=-1>).
Is building out of the box not a goal?
Also, there is no method in the config script of specifying where
Berkely DB is installed. Given that it defaults to installing in
/usr/local/BerkeleyDB.4.x, would it not make sense to support
specifying a path to the BDB installation?