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

Re: SuSE 8.0/openldap-2.1.17 & BerkeleyDB



Hi Martin!

I've done this some days ago (exactly 4). I needed this for a SuSE Linux Enterprise Server 7 which is based upon SuSE Linux 7.1. It comes with a BDB 3.x and that's a rather old one.

Here's how I did it:

First configure BDB with following settings and build it:

cd build_unix
../dist/configure --prefix=/usr \
   --disable-compat185 --enable-diagnostic  --with-uniquename \
   --enable-shared --enable-static --enable-rpc --enable-cxx \
   i686-suse-linux

This was stolen from the spec-file of BDB 3.x and I've added "--with-uniquename", which is essential to use the BDB safely with OpenLDAP if you have another - older - BDB installed on the system.

Note that I disabled compat185 because I had some conflicts. Maybe you can fix this. But normally this shouldn't be needed.

To install it in another directory (e.g. when building a RPM) you call make the following way:

make prefix=${INSTROOT}${PREFIX} install

where PREFIX has to have the same value as given to configure (in this case "/usr").

Now you have to move some files around:

cd ${INSTROOT}
# The header-files - so they won't conflict with the one on the system:
mkdir usr/include/db4
mv usr/include/*.h usr/include/db4
# The tools to administer BDB:
mkdir usr/bin/db4
mv usr/bin/{b,db_}* usr/bin/db4
# Remove some conflicting links:
rm usr/lib/libdb.a
rm usr/lib/libdb.so
rm usr/lib/libdb_cxx.a
rm usr/lib/libdb_cxx.so
# And finally create some new:
ln -s libdb-4.1.a usr/lib/libdb-4.a
ln -s libdb_cxx-4.1.a usr/lib/libdb_cxx-4.a

After installing this on your build-system you can configure OpenLDAP:

export CPPFLAGS="-I/usr/include/db4"
export CFLAGS=-O2
./configure --enable-bdb \
    ...

This should do the trick!

Have a nice day ;)


Chris

Martin Müller schrieb:
Hi!


Im running SuSE 8.0 with a freshley installed BerkeleyDB 4.1.25 and a downloaded openldap-2.1.17. Im starting compiling openldap with ./configure

After a few lines i get following error:

checking for db.h... yes
checking for Berkeley DB link (default)... no
checking for Berkeley DB link (-ldb41)... no
checking for Berkeley DB link (-ldb-41)... no
checking for Berkeley DB link (-ldb-4.1)... no
checking for Berkeley DB link (-ldb-4-1)... no
checking for Berkeley DB link (-ldb-4)... yes
checking for Berkeley DB thread support... yes
checking Berkeley DB version for BDB backend... no
configure: error: BDB: BerkeleyDB version incompatible

I googled & tried several tips that i found but nothing helps.
(like:   ./configure --with-ldbm-api=berkeley  or
         env CPPFLAGS="-I/usr/local/BerkeleyDB/include" \
         LDFLAGS="-L/usr/local/BerkeleyDB/lib" ./configure
and many more...)

Can you help me by this?


Best regards,

Martin