[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Compiling Openldap 2.1.22 - linking to BerkeleyDB libraries problems
- To: <openldap-software@OpenLDAP.org>
- Subject: Compiling Openldap 2.1.22 - linking to BerkeleyDB libraries problems
- From: "Mavric Domen ITWEN5" <d.mavric@iskratel.si>
- Date: Wed, 14 Apr 2004 12:19:54 +0200
- Content-class: urn:content-classes:message
- Thread-index: AcQeNYbIWF/Ab53UTeqKts8VzRD1XwAAO6MQAPUJwWA=
- Thread-topic: slapd and permissions
Hi,
I'm trying to compile OpenLDAP 2.1.22 package on MontaVista Linux CGE 3.1, but I have some problems with linking to the right BerkeleyDB4.1 libraries.
Compiling of OpenLDAP is started with the following command:
env CPPFLAGS="-I/usr/local/BerkeleyDB.4.1/include" \LDFLAGS="-L/usr/local/BerkeleyDB.4.1/lib" \./configure --without-kerberos --enable-aci -enable-crypt --enable-ldbm
Even if I used LDFLAGS with path to appropriate libraries, the config.log says libdb-3.2.so was used instead of libdb-4.1.so library. I think this is due to "undefined reference... " errors when linking to libdb-4.1.so. Here is abstact from config.log file (see "undefined reference" lines):
#if DB_VERSION_MAJOR > 2
db_env_create( NULL, 0 );
#elif DB_VERSION_MAJOR > 1
db_appexit( NULL );
#else
(void) dbopen( NULL, 0, 0, 0, NULL);
#endif
; return 0; }
configure:18063: checking for Berkeley DB link (-ldb-4.1)
configure:18120: cc -o conftest -g -O2 -I/usr/local/BerkeleyDB.4.1/include -L/usr/local/BerkeleyDB.4.1/lib conftest.c -ldb-4.1 -pthread -lresolv -ldl 1>&5
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `cond_signal'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `cond_init'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `mutex_lock'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `mutex_init'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `mutex_trylock'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `mutex_unlock'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `mutex_destroy'
/usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so: undefined reference to `cond_wait'
collect2: ld returned 1 exit status
configure: failed program was:
#line 18073 "configure"
#include "confdefs.h"
OpenLDAP compiles, but when I start it, I get the following:
slapd startup: initiated.
backend_startup: bi_open 1 failed!
slapd shutdown: initiated
ldbm backend syncing
ldbm backend done syncing
====> cache_release_all
slapd shutdown: freeing system resources.
slapd stopped.
connections_destroy: nothing to destroy.
I've also tryed the following configure command, but no success:
env CC=cc \CFLAGS=-O \CPPFLAGS="-D_REENTRANT -I/usr/local/include -I/usr/local/BerkeleyDB.4.1/include" \LDFLAGS="-L/usr/local/lib -L/usr/local/BerkeleyDB.4.1/lib" \LIBS="-lpthread" \./configure --without-kerberos --enable-aci --enable-crypt --enable-ldb
The interesting thing is that compiling works on MV CGE 3.0 and other Linux systems (Redhat 8.0, 9.0, Fedora ...).
What do I have to do to make things working?
Thank you,
Domen