From: Bowie Bailey
I am trying to compile OpenLDAP 2.3.11 from source on CentOS4. I have the rpm for db4-4.2.52-7.1 installed and also a source build of BerkeleyDB in /usr/local/BerkeleyDB.4.4.
How do I get OpenLDAP to link with the bdb 4.4?
I have put the library locataion everywhere I can think of:
LDFLAGS=-L/usr/local/BerkeleyDB.4.4/lib LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.4/lib LD_RUN_PATH=/usr/local/BerkeleyDB.4.4/lib
Still, the configure seems to link with the 4.2 rpm build:
checking db.h usability... yes checking db.h presence... yes checking for db.h... yes checking for Berkeley DB link (default)... no checking for Berkeley DB link (-ldb43)... no checking for Berkeley DB link (-ldb-43)... no checking for Berkeley DB link (-ldb-4.3)... no checking for Berkeley DB link (-ldb-4-3)... no checking for Berkeley DB link (-ldb42)... no checking for Berkeley DB link (-ldb-42)... no checking for Berkeley DB link (-ldb-4.2)... yes checking for Berkeley DB version match... yes checking for Berkeley DB thread support... yes checking Berkeley DB version for BDB/HDB backends... yes
Update...
On the assumption that maybe OpenLDAP just doesn't like bdb 4.4, I built and installed bdb 4.3 and then tried the OpenLDAP build again. This time I get a different message:
checking db.h usability... yes checking db.h presence... yes checking for db.h... yes checking for Berkeley DB link (default)... no checking for Berkeley DB link (-ldb43)... no checking for Berkeley DB link (-ldb-43)... no checking for Berkeley DB link (-ldb-4.3)... yes checking for Berkeley DB version match... Berkeley DB version mismatch header: Sleepycat Software: Berkeley DB 4.2.52: (February 22, 2005) library: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005) no configure: error: Berkeley DB version mismatch
It seems like it is getting the header from the rpm install. I don't want to remove the rpm because of dependencies (Perl, Python, PAM, etc). Is there any way I can leave the old rpm in place and just compile OpenLDAP against the newer build?
Thanks, Bowie