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

Version 2.0.2x and berkeleydb4: linked again 2 lb-db-Versions ?



Hi everybody,

i'm having problems to get version 2.0.2x
together with berkeleydb4 (4.0.14).

When i configure/compile with the following options,
slapd is linked against two lbdb's :

---snipp---
CPPFLAGS="-I/usr/local/ssl/include -I/usr/local/berkeleydb4/include \
-I/usr/local/kerberos/include -I/usr/local/sasl/include"
LDFLAGS="-L /usr/local/ssl/lib -L/usr/local/berkeleydb4/lib \
-L/usr/local/kerberos/lib -L/usr/local/sasl/lib"
export LD_LIBRARY_PATH="/usr/local/berkeleydb4/lib"

export CPPFLAGS LDFLAGS

make clean

./configure \
--prefix=/usr/local/ldap2-0-x \
--sysconfdir=/usr/local/ldap2-0-x/etc \
--localstatedir=/usr/local/ldap2-0-x/run \
--enable-wrappers \
--enable-modules \
--enable-kpasswd \
--enable-spasswd \
--with-threads \
--enable-crypt \
--enable-sldapd \
--enable-ldbm \
--enable-dynamic \
--enable-shared \
--with-tls \
--with-cyrus-sasl \
--with-ssl \
--enable-syslog \
--enable-sql \
--enable-shell \
--enable-slurpd \
--enable-local \
--enable-aci \
--enable-phonetic \
--enable-dnssrv \
&& make depend && make

---snipp---

And here you can see , it's linked against 
libdb-4.0.so and libdb-3.1.so .

---snipp---
486dx66:/opt/make/openldap-2.0.26/servers/slapd # ldd slapd
        /lib/libregframe.so => /lib/libregframe.so (0x40019000)
        libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0x4002a000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x40056000)
        libdb-4.0.so => /usr/local/berkeleydb4/lib/libdb-4.0.so (0x40060000)
        libiodbc.so.2 => /usr/local/lib/libiodbc.so.2 (0x400ea000)
        libsasl.so.7 => /usr/local/sasl/lib/libsasl.so.7 (0x40108000)
        libkrb4.so.2 => /usr/local/kerberos/lib/libkrb4.so.2 (0x40114000)
        libdes425.so.3 => /usr/local/kerberos/lib/libdes425.so.3 (0x4012a000)
        libkrb5.so.3 => /usr/local/kerberos/lib/libkrb5.so.3 (0x4012e000)
        libk5crypto.so.3 => /usr/local/kerberos/lib/libk5crypto.so.3 (0x40187000)
        libcom_err.so.3 => /usr/local/kerberos/lib/libcom_err.so.3 (0x40199000)
        libssl.so.0.9.6 => /lib/libssl.so.0.9.6 (0x4019b000)
        libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x401c8000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40285000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x402b3000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x402ca000)
        libdl.so.2 => /lib/libdl.so.2 (0x402db000)
        libltdl.so.0 => /usr/lib/libltdl.so.0 (0x402de000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402e3000)
        libc.so.6 => /lib/libc.so.6 (0x402f9000)
        libdb-3.1.so => /usr/lib/libdb-3.1.so (0x4040c000)
        libpam.so.0 => /lib/libpam.so.0 (0x40489000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
486dx66:/opt/make/openldap-2.0.26/servers/slapd #
---snipp---

This can't work and it segfaults when doing make test :

---snipp---

486dx66:/opt/make/openldap-2.0.26 # make test
cd tests; make test
make[1]: Entering directory `/opt/make/openldap-2.0.26/tests'
ln: `./data': cannot overwrite directory
make[1]: [test-ldbm] Error 1 (ignored)
ln: `./schema': File exists
make[1]: [test-ldbm] Error 1 (ignored)
Initiating LDAP tests for LDBM...
>>>>> Executing all LDAP tests...
>>>>> Test Directory: .
>>>>> Backend: ldbm
>>>>> Starting test000-rootdse ...
running defines.sh . ldbm
Datadir is ./data
Cleaning up in ./test-db...
Starting slapd on TCP/IP port 9009...
Using ldapsearch to retrieve all the entries...
Waiting 5 seconds for slapd to start...
./scripts/test000-rootdse: line 35: 13388 Segmentation fault      \
$SLAPD -f $SCHEMACONF -h $MASTERURI -d $LVL $TIMING >$MASTERLOG 2>&1
Waiting 5 seconds for slapd to start...
---snipp---

(By the way, where's the file  $MASTERLOG ?)

Here's the version which works, 
but it doesn't use berkeleydb4 :

That's how i configure/compile :

---snipp---

CPPFLAGS="-I/usr/local/ssl/include -I/usr/local/kerberos/include\
 -I/usr/local/sasl/include"
LDFLAGS="-L/usr/local/ssl/lib -L/usr/local/kerberos/lib \
-L/usr/local/sasl/lib"
LD_LIBRARY_PATH="/usr/local/berkeleydb4/lib"

export CPPFLAGS LDFLAGS LD_LIBRARY_PATH

make clean

./configure \
--enable-ldbm \
--prefix=/usr/local/ldap2-0-x \
--sysconfdir=/usr/local/ldap2-0-x/etc \
--localstatedir=/usr/local/ldap2-0-x/run \
--enable-wrappers \
--enable-modules \
--enable-kpasswd \
--enable-spasswd \
--with-threads \
--enable-crypt \
--enable-sldapd \
--enable-dynamic \
--enable-shared \
--with-tls \
--with-cyrus-sasl \
--with-ssl \
--enable-syslog \
--enable-sql \
--enable-shell \
--enable-slurpd \
--enable-local \
--enable-aci \
--enable-phonetic \
--enable-dnssrv \
--enable-kerberos  \
&& make depend && make

---snipp---
486dx66:/opt/make/openldap-2.0.26/servers/slapd # ldd slapd
        /lib/libregframe.so => /lib/libregframe.so (0x40019000)
        libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0x4002a000)
        liblber.so.2 => /usr/lib/liblber.so.2 (0x40056000)
        libdb-3.1.so => /usr/lib/libdb-3.1.so (0x40060000)
        libiodbc.so.2 => /usr/local/lib/libiodbc.so.2 (0x400dd000)
        libsasl.so.7 => /usr/local/sasl/lib/libsasl.so.7 (0x400fb000)
        libkrb4.so.2 => /usr/local/kerberos/lib/libkrb4.so.2 (0x40107000)
        libdes425.so.3 => /usr/local/kerberos/lib/libdes425.so.3 (0x4011d000)
        libkrb5.so.3 => /usr/local/kerberos/lib/libkrb5.so.3 (0x40121000)
        libk5crypto.so.3 => /usr/local/kerberos/lib/libk5crypto.so.3 (0x4017a000)
        libcom_err.so.3 => /usr/local/kerberos/lib/libcom_err.so.3 (0x4018c000)
        libssl.so.0.9.6 => /lib/libssl.so.0.9.6 (0x4018e000)
        libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x401bb000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40278000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x402a6000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x402bc000)
        libdl.so.2 => /lib/libdl.so.2 (0x402ce000)
        libltdl.so.0 => /usr/lib/libltdl.so.0 (0x402d1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402d6000)
        libc.so.6 => /lib/libc.so.6 (0x402ec000)
        libpam.so.0 => /lib/libpam.so.0 (0x403ff000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
486dx66:/opt/make/openldap-2.0.26/servers/slapd #

---snipp---

So, the difference is that in the first case i export the 
the include- and lib-path of berkeleydb4 , but this
is only partly used, as then two libdb- are linked ... 

---snipp---

What's going wrong ?
In version 2.1.x i use the first configure/compile-process
(with include- and lib-path of berkeleydb4) and it works fine ...
so it seems to be an error in the configure/compile-process of
version 2.0.2x ...

That's how i configure/compile 2.1.5 :

---snipp---
CPPFLAGS="-I/usr/local/berkeleydb4/include -I/usr/local/kerberos/include \ 
-I/usr/local/sasl2/include/sasl -I/usr/local/sasl2/include -I/usr/local/ssl/include"
LDFLAGS="-L/usr/local/berkeleydb4/lib -L/usr/local/kerberos/lib  \
-L/usr/local/sasl2/lib/sasl2 -L/usr/local/sasl2/lib -L/usr/local/ssl/lib"

export CPPFLAGS LDFLAGS

export LD_LIBRARY_PATH=/usr/local/berkeleydb4/lib:$LD_LIBRARY_PATH

./configure \
--prefix=/usr/local/ldapv2-1-5 \
--mandir=/usr/local/ldapv2-1-5/man \
--enable-proctitle \
--enable-aci \
--enable-ipv6 \
--enable-monitor \
--enable-wrappers \
--enable-modules \
--enable-kpasswd \
--enable-spasswd \
--with-threads \
--enable-crypt \
--enable-sldapd \
--enable-ldbm \
--enable-aclgroups \
--enable-dynamic \
--enable-shared \
--with-tls \
--with-cyrus-sasl \
--with-ssl=/usr/local/ssl \
--enable-syslog \
--enable-shell \
--enable-slurpd \
--enable-local \
--enable-phonetic \
--enable-dnssrv \
&& make depend && make

---snipp---

And that's what ldd shows me and what is what i want
with 2.0.2x too ...

---snipp---

486dx66:/opt/make/openldap-2.1.5/servers/slapd # ldd slapd
        /lib/libregframe.so => /lib/libregframe.so (0x40019000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4002a000)
        libdb-4.0.so => /usr/local/berkeleydb4/lib/libdb-4.0.so (0x4003b000)
        libkrb4.so.2 => /usr/local/kerberos/lib/libkrb4.so.2 (0x400c5000)
        libdes425.so.3 => /usr/local/kerberos/lib/libdes425.so.3 (0x400db000)
        libkrb5.so.3 => /usr/local/kerberos/lib/libkrb5.so.3 (0x400df000)
        libk5crypto.so.3 => /usr/local/kerberos/lib/libk5crypto.so.3 (0x40138000)
        libcom_err.so.3 => /usr/local/kerberos/lib/libcom_err.so.3 (0x4014a000)
        libssl.so.0.9.6 => /lib/libssl.so.0.9.6 (0x4014c000)
        libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x40179000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40236000)
        libdl.so.2 => /lib/libdl.so.2 (0x40264000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40267000)
        libc.so.6 => /lib/libc.so.6 (0x4027d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
486dx66:/opt/make/openldap-2.1.5/servers/slapd #

---snipp---

I posted some times ago with the same problem and i tried everything
people on the list suggested (renaming /usr/lib/libdb.h ....etc).

My configuration :

bdb4 in /usr/local/berkeleydb4
bdb3.1 in /usr/ (lib/include)

OS : LINUX with Kernel 2.4.19
gcc 2.95.2


greets 

Harry