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

problems loading libldap shared object on solaris



Hi

I performed the following steps to build openldap version 2.0.14 on a
solaris 2.6 machine:
setenv PATH /tools/cc60/bin:$PATH
configre --prefix /home/himanshs/openldap
--exec-prefix=/home/himanshs/openldap/bin --disable-slapd --disable-slurpd
make depend
make
make install

After successfully compiling, when I try to load libldap.so using
dlopen("libldap.so", RTLD_LAZY), I get the following error:
{bin/lib} engsrv[434]--> dlopentest libldap.so
Failed to load the library: ld.so.1: dlopentest: fatal: relocation error:
file /home/himanshs/openldap/bin/lib/libldap.so: symbol
ber_sockbuf_io_readahead: referenced symbol not found

ber_sockbuf_io_readahead is defined in liblber.so but somehow, this shared
object is not listed as dependency of libldap.so:

{bin/lib} engsrv[435]--> ldd libldap.so
        libc.so.1 =>     /usr/lib/libc.so.1
        libucb.so.1 =>   /usr/ucblib/libucb.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libelf.so.1 =>   /usr/lib/libelf.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1

When I manually tweak the makefile in /libraries/libldap and add -llber to
EXTRA_LIBS, then the generated libldap.so loads fine.

Any help in this issue is greatly appreciated.


Himanshu Soni
ValiCert Inc.
http://www.valicert.com
Software Engineer
phone: 650-567-5491