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

Re: back-bdb as module & DB 4.1.24



> Jehan PROCACCIA a écrit :
>> OK it link ok with BDB 4.1.24 now :-)
>>
>>[jehan@corbeau /usr/local/src/openldap-2.1.8]
>>$ CPPFLAGS=-I/usr/local/jehan/bdb-4.1.24/include
>> LDDFLAGS=-L/usr/local/jehan/bdb-4.1.24/lib ./configure  --enable-debug
>> --enable-crypt --enable-modules --enable-bdb --enable-ldbm
>> --with-ldbm-api=berkeley --with-ldbm-module=dynamic --enable-monitor
>> --with-bdb-module=dynamic --with-monitor-module=dynamic --enable-local
>> --enable-cldap --disable-rlookups --with-tls --with-cyrus-sasl
>> --enable-passwd --with-passwd-module=dynamic --enable-shell
>> --with-shell-module=dynamic --enable-cleartext --enable-spasswd
>> $ make depend
>> $ make
>> [jehan@corbeau /usr/local/src/openldap-2.1.8]
>> $ ldd servers/slapd/slapd
>>         libdb-4.1.so => /usr/local/jehan/bdb-4.1.24/lib/libdb-4.1.so
>> (0x40021000)
>>
>> But make test complains:
>>
>> make[1]: [test-bdb] Error 1 (ignored)
>> run configure with --enable-bdb
>
> I had to modify the test Makefile so that it takes care of bdb as a
> modules:
>
> [jehan@corbeau /usr/local/src/openldap-2.1.8]
> $ vi tests/Makefile
> line 264:
> @if test "$(BUILD_BDB)" = "mod" ; then \ # before it was  ="mod" it was
> ="yes" !
>
> Then inlude the load of modules in the test slapd.conf file:
>
> [jehan@corbeau /usr/local/src/openldap-2.1.8/tests]
> $ vi test-db/slapd.conf
> modulepath      ../servers/slapd/back-bdb/.libs/
> moduleload     back_bdb.la
>
> [jehan@corbeau /usr/local/src/openldap-2.1.8/tests]
> $ ../servers/slapd/slapd -s0 -f ./test-db/slapd.conf -h
> ldap://localhost:9009/
> ../servers/slapd/slapd: relocation error:
> ../servers/slapd/back-bdb/.libs/back_bdb.so.2: undefined symbol:
> ldap_pvt_thread_rdwr_init
>
> Now I still get that undefined symbol problem ! ??

that symbol is in the reentrant version of libldap, e.g. libldap_r;
it looks like the library is not in the appropriate place.  I guess
it should be installed before, or it is not actually linked
by back_bdb.la.  You should try to see if is back_bdb.la (actually,
../servers/slapd/back-bdb/.libs/back_bdb.so.2) is linking libldap_r.so
and if it doesn't you should check why (maybe something is missing
in back-bdb/Makefile.in?)

>
> does someone managed to run BDB as a module whitout problems ?

Good question.

> After all is it usefull to use modules ?

IMHO no.  I never tried, that's why I cannot really help but give
a few twopence hints on dynamic linking...

Pierangelo.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it