Bowie Bailey
2005-Dec-01 16:19 UTC
[CentOS] Linking against a specific Berkeley DB install
I sent this question to the OpenLDAP list yesterday, but I still haven't seen the message come across the list. I am asking here in the hopes of getting a faster response. 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 Any suggestions? Bowie
Bowie Bailey
2005-Dec-01 16:54 UTC
[CentOS] Linking against a specific Berkeley DB install
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... yesUpdate... 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
Will McDonald
2005-Dec-01 17:00 UTC
[CentOS] Linking against a specific Berkeley DB install
On 01/12/05, Bowie Bailey <Bowie_Bailey at buc.com> wrote:> I sent this question to the OpenLDAP list yesterday, but I still haven't > seen the message come across the list. I am asking here in the hopes of > getting a faster response. > > > 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?Typically this would be done at the configure stage. Check... ./configure --help for OpenLDAP 2.3.11 for more information. Will.
Bowie Bailey
2005-Dec-01 17:17 UTC
[CentOS] Linking against a specific Berkeley DB install
From: Will McDonald [mailto:wmcdonald at gmail.com]> > On 01/12/05, Will McDonald <wmcdonald at gmail.com> wrote: > > On 01/12/05, Bowie Bailey <Bowie_Bailey at buc.com> wrote: > > > > > > 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? > > > > Typically this would be done at the configure stage. Check... > > > > ./configure --help > > > > for OpenLDAP 2.3.11 for more information. > > Actually, ignore that. OpenLDAP doesn't appears to have any Berkley > DB specific options in its configure. I just downloaded it to have a > look. > > I'll try installing it here and see how far I get...I got a bit farther. As far as I can tell, OpenLDAP 2.3.11 doesn't like BerkleyDB 4.4. I was able to get it to configure against 4.3 using the following: export LDFLAGS="-L/usr/local/lib -L/usr/local/BerkeleyDB.4.3/lib -R/usr/local/lib -R/usr/local/BerkeleyDB.4.3/lib" export LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.3/lib export LD_RUN_PATH=/usr/local/BerkeleyDB.4.3/lib export CPPFLAGS="-I/usr/local/BerkeleyDB.4.3/include" Apparently, either the CPPFLAGS variable, or the '-R' entry in LDFLAGS made the difference. Hopefully, I won't run into any compilation issues now. If you find a way to compile it against BDB 4.4, let me know. Bowie
On Thu, 2005-12-01 at 11:19 -0500, Bowie Bailey wrote:> I sent this question to the OpenLDAP list yesterday, but I still haven't > seen the message come across the list. I am asking here in the hopes of > getting a faster response. > > > 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 > > Any suggestions?---- it's not linking against db4.4 only 4.2 and 4.3 as you can see above. 4.4 was just released and clearly not tested and definitely not recommended. You should note that even the latest 4.3 version isn't recommended for use with openldap but rather 4.2.52+patches. Craig
Bowie Bailey
2005-Dec-01 18:19 UTC
[CentOS] Linking against a specific Berkeley DB install
From: Craig White [mailto:craigwhite at azapple.com]> > it's not linking against db4.4 only 4.2 and 4.3 as you can see above. > 4.4 was just released and clearly not tested and definitely not > recommended. You should note that even the latest 4.3 version isn't > recommended for use with openldap but rather 4.2.52+patches.Hmmm... 4.4.16 is the default download link on the website. I assumed that was the latest stable version. I was able to get OpenLDAP to compile against db4.3. Any particular reason it isn't recommended? Bowie
Bowie Bailey
2005-Dec-01 20:24 UTC
[CentOS] Linking against a specific Berkeley DB install
From: Craig White [mailto:craigwhite at azapple.com]> > On Thu, 2005-12-01 at 13:01 -0600, Les Mikesell wrote: > > On Thu, 2005-12-01 at 12:19, Bowie Bailey wrote: > > > > > I was able to get OpenLDAP to compile against db4.3. Any > > > particular reason it isn't recommended? > > > > I see fedora directory server just made the 1.0 release. Might > > that be a better choice? > > > > http://directory.fedora.redhat.com/wiki/Main_Page > > > ---- > I doubt that it would be a better choice but I would agree that it > is indeed a choice. One of those things where there isn't a black > and white better daemon. This however doesn't answer OP's question.It is an interesting choice. It supports multi-master replication which I will need and has some GUI management utilities. Anyone know of any problems with it? Bowie