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

RE: configure: error: Berkeley DB version mismatch



If I am not wrong, RedHat stores most of its lib files at /usr/lib and
sometimes /lib, instead of the configure default prefix of /usr/local,
so adjustment are needed.

Shown below are what I did, note that there is a risk of overwriting
redhat original lib files, take it or leave it, don't do it on prod.
Server pls, however it can be very easy to restore back redhat original
lib files using CD and rpm.

Sorry some sidetrack, For OpenSSL build for OpenLDAP on RedHat and
Solaris, I discovered that on RedHat I must use shared object, whereas
on Solaris I must link statically for it to work, don't ask me why.

# cd db-4.X.XX/build_unix
# ../dist/configure --prefix=/usr
# make clean
# make
# make install

# cd openssl-0.9.7c
# ./config shared --prefix=/usr                 # Build shared library
# make clean
# make
# make test                                                    #
Optional step
# make install

Note 1: --prefix=/usr is required so as to overwrite RedHat EL3 built-in
rpm.
Note 2: db-4.X.XX in the above case overwrites the db-4.X.XX-XX
built-into RedHat EL3
Note 3: openssl-0.9.7c in the above case overwrites the openssl-0.9.7a
built-into RedHat EL3

Additional steps shown bellow are required to rename and hide
openssl-0.9.7a original files (due to the fact that RedHat stores libssl
and libcrypto shared object files at odd location, i.e. /lib), and to
edit /etc/man.config to include /usr/ssl/man

# cd /lib
# mv libssl.so.4 libssl.so.4.orig
# ln -s /usr/lib/libssl.so.0.9.7 libssl.so.4
# mv libcrypto.so.4 libcrypto.so.4.orig
# ln -s /usr/lib/libcrypto.so.0.9.7 libcrypto.so.4

Note: if OpenSSL is installed in other prefix location, please make sure
it could be referenced by editing /etc/ld.so.conf and run "ldconfig" to
effect the changes.

# vi /etc/ld.so.conf
# ldconfig

...

# cd openldap-2.X.XX
# ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/sbin
--enable-bdb --enable-crypt
# make depend
# make clean
# make
# make install

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of Cameron Gregg
Sent: Thursday, September 16, 2004 2:18 PM
To: Tony Earnshaw
Cc: Openldap list
Subject: Re: configure: error: Berkeley DB version mismatch


Tony Earnshaw wrote:

> ons, 15.09.2004 kl. 03.55 skrev Kurt D. Zeilenga:
> [...]
> 
> 
>>configure is looking for the library version to match the header 
>>version (and, subsequently, for that version to be appropriate).
> 
> 
> Indeed ... I never did GNU compiles on Solaris, but FWIW I get exactly

> the same error as Greg when compiling Openldap source on RedHat 
> RHAS/RHEL3 unless I put /path/to/BerkeleyDB.4.2/lib into 
> /etc/ld.so.conf and run ldconfig, even though I give the LDFLAGS path 
> to configure. Perhaps if I included -ldb-4.2 to link against work; as 
> it is, I use ld.so.conf.
> 
> Does Solaris have any similar library definition config arrangement?
> 
> --Tonni
> 

yes. crle

# crle

Configuration file [3]: /var/ld/ld.config
   Default Library Path (ELF):   /usr/lib:/usr/local/lib
   Trusted Directories (ELF):    /usr/lib/secure  (system default)

Command line:
   crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib

#

Cam