I'm using CentOS 5.3. I downloaded openldap-2.3.43 (which I installed using "Add/Remove Programs" in CentOS) and tried to build it. (Ultimately, I'm trying to get a C program to initialize my local ldap server and want to link to the relevant library in gcc).
./configure worked
make depend worked
make gave me an error
... cc -g -O2 -I../../include -I. -I./slapi -I. -I../../include -c -o component.o component.c cc -g -O2 -I../../include -I. -I./slapi -I. -I../../include -c -o version.o version.c /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/swami/official/Aprius/ldap/openldap-2.3.43/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/swami/official/Aprius/ldap/openldap-2.3.43/servers/slapd' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/home/swami/official/Aprius/ldap/openldap-2.3.43/servers' make: *** [all-common] Error 1
How do I resolve this?
Thanks