[Date Prev][Date Next]
Problems building OpenLDAP
I'm trying to install OpenLDAP on a Linux system (originally Slackware
7.0, with virtually everything updated to current releases and with
glibc-2.3.2) and having a few issues trying to build OpenLDAP-2.1.23.
First of all, let me diverge by commenting a little on the OpenLDAP
build configuration process. With so many different backends, I'd have
thought the configure process would test each backend and tell you which
ones it was able to support on your system, thewn let you configure
which of those you wanted to use. The current system of having to try
each backend by trial-and-error until you find a supported one seems
sub-optimal. This is compounded by the fact that it appears OpenLDAP
would be perfectly happy to use the default Berkeley DB backend, if
there was only some way to tell it that my Berkeley DB 4.1 is installed
in the default location for Berkeley DB 4.1, /usr/local/BerkeleyDB-4.1.
I tried using --enable-bdb=/usr/local/BerkeleyDB-4.1 and --enable-bdb
--with-bdb=/usr/local/BerkeleyDB-4.1 on the off chance that one of these
would do the job, but --enable-bdb=/usr/local/BerkeleyDB-4.1 is rejected
as invalid, and --with-bdb=/usr/local/BerkeleyDB-4.1 is simply not
recognized at all.
Now, that issue aside, because OpenLDAP's configuration doesn't give me
a way to tell it where bdb-4.1 is installed, I've tried a number of
other backends. The sql backend doesn't work because it can't find a
sql.h file and there appears to be no way to tell it to use MySQL.
OpenLDAP does appear to think all the requirements are met for the ldbm
and ldap backends; however, these both fail to link any executables.
When configured using:
./configure --prefix=/opt/ldap --with-gnu-ld --disable-bdb --enable-ldbm
compilation fails like this:
/bin/sh /usr/share/src/openldap-2.1.23/libtool --mode=link gcc -static -g -O2 -o apitest apitest.o libldap.la ../../libraries/liblber/liblber.la ../../libraries/liblutil/liblutil.a -lsasl -lssl -lcrypto -lresolv -ldl
gcc -g -O2 -o apitest apitest.o ./.libs/libldap.a /usr/share/src/openldap-2.1.23/libraries/liblber/.libs/liblber.a -L/usr/local/lib ../../libraries/liblber/.libs/liblber.a ../../libraries/liblutil/liblutil.a /usr/lib/libsasl.so -ldb -lcrypt -lssl -lcrypto -lresolv -ldl
./.libs/libldap.a(os-ip.o): In function `ldap_pvt_is_socket_ready':
/usr/share/src/openldap-2.1.23/libraries/libldap/os-ip.c:191: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
/usr/share/src/openldap-2.1.23/libraries/libldap/os-ip.c:191: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
/usr/local/lib/libcrypto.a(b_print.o): In function `_dopr':
b_print.o(.text+0x185): undefined reference to `__ctype_b'
b_print.o(.text+0x1d7): undefined reference to `__ctype_b'
/usr/local/lib/libcrypto.a(obj_dat.o): In function `OBJ_create_objects':
obj_dat.o(.text+0x8ab): undefined reference to `__ctype_b'
obj_dat.o(.text+0x8d6): undefined reference to `__ctype_b'
obj_dat.o(.text+0x8f9): undefined reference to `__ctype_b'
/usr/local/lib/libcrypto.a(obj_dat.o)(.text+0x91d): more undefined references to `__ctype_b' follow
/usr/local/lib/libcrypto.a(v3_utl.o): In function `string_to_hex':
v3_utl.o(.text+0x67b): undefined reference to `__ctype_tolower'
v3_utl.o(.text+0x68e): undefined reference to `__ctype_tolower'
/usr/local/lib/libcrypto.a(v3_utl.o): In function `strip_spaces':
v3_utl.o(.text+0xbf2): undefined reference to `__ctype_b'
/usr/local/lib/libcrypto.a(bn_print.o): In function `BN_hex2bn':
bn_print.o(.text+0x2e0): undefined reference to `__ctype_b'
/usr/local/lib/libcrypto.a(bn_print.o): In function `BN_dec2bn':
bn_print.o(.text+0x4ba): undefined reference to `__ctype_b'
collect2: ld returned 1 exit status
make: *** [apitest] Error 1
make: Leaving directory `/usr/share/src/openldap-2.1.23/libraries/libldap'
make: *** [all-common] Error 1
make: Leaving directory `/usr/share/src/openldap-2.1.23/libraries'
make: *** [all-common] Error 1
If configured using:
./configure --prefix=/opt/ldap --with-gnu-ld --disable-bdb --enable-ldap
the failure is exactly the same, and at the same point. The dnssrv
backend is also purportedly buildable, and again the build fails at the
point of the attempt to link the apitest executable. I believe this is
a sufficient sample to say that the failure is not backend-specific.
Now I know this is not a result of some generalized inability to build
software on my system, because I've compiled and installed updated
versions of OpenSSL, OpenSSH, Perl and Postfix during about the past
week, and Apache, PHP, mod_ssl and mod_perl just last night, and they
built (and work) perfectly. The problem is also not peculiar to
OpenLDAP-2.1.23, as my first attempt was using OpenLDAP-2.1.21 and that,
too, did not work.
So, does anyone have any suggestions as to why OpenLDAP won't build for
.********* Fight Back! It may not be just YOUR life at risk. *********.
: phil stracchino : unix ronin : renaissance man : mystic zen biker geek :
: firstname.lastname@example.org : email@example.com : firstname.lastname@example.org :
: 2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold) :
: Linux Now! ...Because friends don't let friends use Microsoft. :