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

Re: [Fwd: Can't compile OpenLDAP with Berkekey DB: File format not recognized]



Howard Chu wrote:
>> ---------------------------- Original Message
>> ----------------------------
>> Subject: Can't compile OpenLDAP with Berkekey DB: File format not
>> recognized
>> From:    ben@fallinganvils.com
>> Date:    Wed, November 28, 2007 10:41 pm
>> To:      openldap-bugs@openldap.org
>> --------------------------------------------------------------------------
>>
>>
>> This is my first openldap install.
>
> Pay attention to details.
>
>> This is what I do :
>>
>> 1) Install Berkeley DB 4.6.21 in /home/ben/opt/bdb
>>
>> $ cd db-4.6.21/build_unix
>> $ ../dist/configure --prefix=/home/ben/opt/bdb
>> $ make && make install
>> $ export LD_RUN_PATH=/home/ben/opt/bdb/lib
>> $ export CPPFLAGS='-I /home/ben/opt/bdb/include'
>> $ export LDFLAGS='-L /home/ben/opt/bdb/lib'
>
> There must not be any spaces between "-L" or "-I" and the path.
>
>> $ cd
>>
>> 2) Install OpenLDAP
>> $ cd openldap-2.4.6
>> $ ./configure --prefix=/home/ben/opt/openldap
>> $ make depend
>> $ make
>>
>> Making all in /home/ben/src/openldap/openldap-2.4.6
>>   Entering subdirectory include
>> make[1]: Entering directory
>> `/home/ben/src/openldap/openldap-2.4.6/include'
>> make[1]: Nothing to be done for `all'.
>> make[1]: Leaving directory
>> `/home/ben/src/openldap/openldap-2.4.6/include'
>>
>>   Entering subdirectory libraries
>> make[1]: Entering directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries'
>> Making all in /home/ben/src/openldap/openldap-2.4.6/libraries
>>   Entering subdirectory liblutil
>> make[2]: Entering directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries/liblutil'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries/liblutil'
>>
>>   Entering subdirectory liblber
>> make[2]: Entering directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries/liblber'
>> /bin/sh ../..//libtool --mode=link cc -static -g -O2  -L
>> /home/ben/opt/bdb/lib   -o dtest dtest.o liblber.la
>> ../../libraries/liblutil/liblutil.a  -lresolv
>> cc -g -O2 /home/ben/opt/bdb/lib -o dtest dtest.o
>> -L/home/ben/src/openldap/openldap-2.4.6/libraries/liblber
>> ./.libs/liblber.a ../../libraries/liblutil/liblutil.a -lresolv
>> /usr/bin/ld: /home/ben/opt/bdb/lib: No such file: File format not
>> recognized
>> collect2: ld returned 1 exit status
>> make[2]: *** [dtest] Error 1
>> make[2]: Leaving directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries/liblber'
>> make[1]: *** [all-common] Error 1
>> make[1]: Leaving directory
>> `/home/ben/src/openldap/openldap-2.4.6/libraries'
>> make: *** [all-common] Error 1
>>

I'm also seeing similar problem with 2.4.7 on Solaris 10. The config
can't find BDB 4.5.20 files, even using the same config environment that
worked with 2.3.39.

Simon