[CentOS] Linking against a specific Berkeley DB install

Thu Dec 1 17:17:28 UTC 2005
Bowie Bailey <Bowie_Bailey at BUC.com>

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