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

RE ./configure Error WAS: RE: dynamic vs static linking of db in 2.2.15



-----Original Message-----
From: owner-openldap-software@OpenLDAP.org [mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of James Courtney
Sent: Thursday, August 12, 2004 3:29 PM
To: Open LDAP Software List (E-mail)
Subject: dynamic vs static linking of db in 2.2.15

After some examination of the configure scripts for 2.1.25 and 2.2.15 I've noticed that the 2.1.25 seems to look for --with-bdb_module (not --with-bdb-module like the --help docs suggest) and defaults to static.  This indicates that --with-bdb-module is likely ignored by the 2.1.25 configure script (as are several other options) and it always defaults to static linking unless you somehow know to use --with-bdb_module instead.  2.2.15 seems to have no such options.  Is there a reason to do away with static linking in 2.2.15?

Thanks!

Jamey





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.