On 2/19/07, Raphael Berlamont Raphael.berlamont@raphux.com wrote:
Hello list,
I'm trying to compile openldap v2.3.31 (same happens with v2.3.34), on a FC6 _EMT64_ (I don't have the problem on a i386). At the make step, I have the following error :
------8<------------- /bin/sh ../..//libtool --mode=link cc -static -g -O2 -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o repl.o lock.o controls.o extended.o kerberos.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o version.o libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/libldap_r.la ../../libraries/liblber/liblber.la -ldb-4.3 -lsasl2 -lssl -lcrypto -lresolv -pthread \
cc -g -O2 -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o repl.o lock.o controls.o extended.o kerberos.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o version.o -pthread libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.a /home/raphux/utils/openldap/openldap-2.3.31/libraries/liblber/.libs/liblber.a ../../libraries/liblber/.libs/liblber.a /usr/lib/libdb-4.3.so -lpthread -lsasl2 -lssl -lcrypto -lresolv -pthread /usr/lib/libdb-4.3.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[2]: *** [slapd] Error 1 make[2]: Leaving directory `/home/raphux/utils/openldap/openldap-2.3.31/servers/slapd' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/home/raphux/utils/openldap/openldap-2.3.31/servers' make: *** [all-common] Error 1 [raphux@rt-preprod openldap-2.3.31]$ ------8<-------------
I googlised a little, and try to add --includedir=/lib64/ to the configure step, but it doesn't change anything.
I did the following thing that made the make working :
- removed the /usr/lib/libdb-4.3.so symbolic link to /lib/libdb-4.3.so
- recreate a link to /lib64/libdb-4.3.so
Now compilation works, but I'm afraid that my system may be unstable, because a lot of installed software uses that library, and may have been compiled with the 32bits version.
Is there a way to force the build of openldap to use /lib64/libdb-4.3.so instead of /usr/lib/libdb-4.3.so?
For info purpose : -------8<---------- /usr/lib/libdb-4.3.so -> ../../lib/libdb-4.3.so /lib/libdb-4.3.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.20, stripped /lib64/libdb-4.3.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), for GNU/Linux 2.4.20, stripped -------8<----------
Openldap only wants to use BDB 4.2.52 or 4.4. (or 4.6, when it comes out) I would recommend building a BDB exclusively for openldap use and just putting in its own directory. (/usr/local/openldap-2.3.33/include comes to mind)
This FAQ is slightly out of date because it doesn't include the info about 4.3, but it mentioned 4.2.52 pretty heavily. 4.2.52+patches it is the most used version of bdb on this mailing list.
http://www.openldap.org/faq/index.cgi?_highlightWords=bdb&file=44