[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
dynamic vs static linking of db in 2.2.15
- To: "Open LDAP Software List \(E-mail\)" <openldap-software@OpenLDAP.org>
- Subject: dynamic vs static linking of db in 2.2.15
- From: "James Courtney" <Jcourtney@inphonic.com>
- Date: Thu, 12 Aug 2004 16:15:41 -0400
- Content-class: urn:content-classes:message
- Thread-index: AcSAqSQeM45hN0QYS72oYLtemk7tMQ==
- Thread-topic: dynamic vs static linking of db in 2.2.15
My current OpenLDAP version is 2.1.25. My build script for that uses the following options:
./configure --prefix=/apps/openldap/<ver> \
--disable-ipv6 \
--enable-slapd \
--enable-crypt \
--enable-bdb \
--with-bdb-module=static \
--enable-monitor \
--without-cyrus-sasl \
--without-kerberos \
--enable-slurpd
I also have set:
CC=gcc;
CFLAGS="-O2 -D_REENTRANT";
LD_LIBRARY_PATH="/apps/db/4.2.52/lib -I/apps/openssl/0.9.7d/lib";
PATH="/apps/db/4.2.52/bin:/apps/openssl/0.9.7d/bin";
CPPFLAGS="-I/apps/db/4.2.52/include -I/apps/openssl/0.9.7d/include";
LDFLAGS="-L/apps/db/4.2.52/lib -I/apps/openssl/0.9.7d/lib";
With 2.1.25 this resulted in a statically linked db 4.2.52.
I determine this using strace on /apps/openldap/2.1.25/sbin/slapcat --help and looking for and loading of /apps/db/*/*.so.
When I compile OpenLDAP 2.2.15 with the same script /apps/openldap/2.2.15/sbin/slapcat errors out with:
./sbin/slapcat: error while loading shared libraries: libdb-4.2.so: cannot open shared object file: No such file or directory
When I strace this I see it trying to load libdb-4.2.so from many default OS locations and never /apps/db/4.2.52/lib.
The contents of my /apps/db/4.2.52/lib directory is:
libdb-4.2.a libdb-4.2.la libdb-4.2.so libdb-4.so libdb.a libdb.so
So all appears well there.
Is the "--with-bdb-module=static" option for the configure script still valid for 2.2.15?
I see it when I do ./configure --help for 2.1.25 but not for 2.2.15.
Am I going to HAVE to resort to using LD_LIBRARY_PATH?
I'd REALLY prefer to statically link this if I could.
Many thanks!
Jamey
James Courtney
InPhonic, Inc.