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

Re: (ITS#3809) db library detection procedure



"Kurt D. Zeilenga" <Kurt@OpenLDAP.org> writes:

[...]

>>
>>1) libdb-4.3 is installed on the system in an usual place (/usr/lib)
>>2) libdb-4.2.52 is installed in an unusual directory (/opt/foo/lib)
>>3) running configure with the proper environment variables, set with correct
>>values, fails becaus the script stop right after detecting the mismatch of
>>version between the 4.2.52 headers and the 4.3 library.
>
> Then the environment must not be properly configured.  A
> proper configuration allows configure to find matching
> headers and libraries files for the desired version of
> each development library.

I'm not sure your explanation is enough to justify the following
lines:

------------------------------------------------------------------------
$ sudo apt-get install libdb4.3
#
# Now on the system are present both db-4.2.52 (under /opt/foo) and
# db-4.3 (under /usr/).
#
$ export LD_LIBRARY_PATH=/opt/foo/lib
$ export CPPFLAGS=-I/opt/foo/include/
$ export LDFLAGS=-L/opt/foo/lib
$ ./configure
Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
	Restrictions apply, see COPYRIGHT and LICENSE files.
Configuring [1mOpenLDAP 2.X-Devel[m ...
...
...
checking for db.h... yes
checking for Berkeley DB link (default)... no
checking for Berkeley DB link (-ldb43)... no
checking for Berkeley DB link (-ldb-43)... no
checking for Berkeley DB link (-ldb-4.3)... yes
checking for Berkeley DB version match... Berkeley DB version mismatch
	header: Sleepycat Software: Berkeley DB 4.2.52: (December  3, 2003)
	library: Sleepycat Software: Berkeley DB 4.3.28: (April 22, 2005)
no
configure: error: Berkeley DB version mismatch


$
$ sudo apt-get remove libdb4.3
#
# Now on the system only db-4.2.52 is present
#
$ ./configure
Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved.
	Restrictions apply, see COPYRIGHT and LICENSE files.
Configuring [1mOpenLDAP 2.X-Devel[m ...
...
...
checking for db.h... yes
checking for Berkeley DB link (default)... no
checking for Berkeley DB link (-ldb43)... no
checking for Berkeley DB link (-ldb-43)... no
checking for Berkeley DB link (-ldb-4.3)... no
checking for Berkeley DB link (-ldb-4-3)... no
checking for Berkeley DB link (-ldb42)... no
checking for Berkeley DB link (-ldb-42)... no
checking for Berkeley DB link (-ldb-4.2)... yes
checking for Berkeley DB version match... yes
checking for Berkeley DB thread support... yes
checking Berkeley DB version for BDB backend... yes
...
...
Making servers/slapd/backends.c
Add config ...
Add ldif ...
Add bdb ...
Add hdb ...
Add monitor ...
 Add relay ...
Please run "make depend" to build dependencies
$
------------------------------------------------------------------------

Can you explain the above behaviour?

I don't want to annoy you too much, I'm trying to be useful and to
learn something :-)

walter