(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) OpenLDAP Software FAQ : (Category) Installation : (Category) Platform Hints : (Category) Sun Microsystems Solaris : (Answer) Solaris stock ld and elf error: file ../../libraries/libldbm/libldbm.a: elf_getarsym
Problem:

With 
Solaris 8
gcc 2.95.3
stock Solaris ld
linking of slapd blows the error below.

Fix:
Use the GNU ld, and ensure that it's getting called instead.


gcc -g -O2 -o slapd main.o daemon.o connection.o search.o filter.o add.o cr.o
attr.o entry.o config.o backend.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 limits.o backglue.o operational.o matchedValues.o cancel.o
version.o -pthreads  -L/opt/BerkeleyDB/lib libbackends.a
../../libraries/libavl/libavl.a ../../libraries/libldbm/libldbm.a
../../libraries/liblunicode/liblunicode.a
../../libraries/librewrite/librewrite.a ../../libraries/libldif/libldif.a
../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.a
/opt/sunservices/OpenLDAP/openldap-2.1.22/libraries/liblber/.libs/liblber.a
../../libraries/liblber/.libs/liblber.a /opt/BerkeleyDB/lib/libdb-4.1.a -lresolv
-lgen -lnsl -lsocket -ldl
ld: elf error: file ../../libraries/libldbm/libldbm.a: elf_getarsym
ld: fatal: File processing errors. No output written to slapd
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `slapd'
Current working directory
/opt/sunservices/OpenLDAP/openldap-2.1.22/servers/slapd
*** Error code 1
[Append to This Answer]
Previous: (Answer) Why can 'configure' fail to work out sizeof 'short', 'int' and 'long'?
Next: (Answer) Identifying Berkeley DB version mismatch
This document is: http://www.openldap.org/faq/index.cgi?file=952
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org