Operating System - HP-UX
1833750 Members
3014 Online
110063 Solutions
New Discussion

Unresolved symbol: ldap_get_option (code) from ./ldapsearch

 
SOLVED
Go to solution
10ft
Occasional Advisor

Unresolved symbol: ldap_get_option (code) from ./ldapsearch

I installed LDAP-UX Integration on 11.11i
when i try to configure with command:
/opt/ldapux/config/setup

the command fails with this echo
/usr/lib/dld.sl: Unresolved symbol: ldap_get_option (code) from ./ldapsearch

the output of :

ldd ldapsearch
=>
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/librt.2 => /usr/lib/librt.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libldap.sl => /usr/lib/libldap.sl
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libsec.2 => /usr/lib/libsec.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libgen.2 => /usr/lib/libgen.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1

I tried to set te variable LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ldapux/lib
but nothing appened ...


the output of same command in an another workstation is:

ldd ldapsearch
=>
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/librt.2 => /usr/lib/librt.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libldap.sl => /usr/lib/libldap.sl
/opt/ldapux/lib/libssl3.sl => /opt/ldapux/lib/libssl3.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/librt.2 => /usr/lib/librt.2
/opt/ldapux/lib/libplds4.sl => /opt/ldapux/lib/libplds4.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/opt/ldapux/lib/libplc4.sl => /opt/ldapux/lib/libplc4.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/opt/ldapux/lib/libnss3.sl => /opt/ldapux/lib/libnss3.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/opt/ldapux/lib/libplds4.sl => /opt/ldapux/lib/libplds4.sl
/opt/ldapux/lib/libplc4.sl => /opt/ldapux/lib/libplc4.sl
/opt/ldapux/lib/libsoftokn3.sl => /opt/ldapux/lib/libsoftokn3.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/opt/ldapux/lib/libplds4.sl => /opt/ldapux/lib/libplds4.sl
/opt/ldapux/lib/libplc4.sl => /opt/ldapux/lib/libplc4.sl
/opt/ldapux/lib/libsoftokn3.sl => /opt/ldapux/lib/libsoftokn3.sl
/opt/ldapux/lib/libplds4.sl => /opt/ldapux/lib/libplds4.sl
/opt/ldapux/lib/libplc4.sl => /opt/ldapux/lib/libplc4.sl
/opt/ldapux/lib/libnss3.sl => /opt/ldapux/lib/libnss3.sl
/opt/ldapux/lib/libnspr4.sl => /opt/ldapux/lib/libnspr4.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/librt.2 => /usr/lib/librt.2

in this workstation all works.


Thanks ;-)




3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Unresolved symbol: ldap_get_option (code) from ./ldapsearch

Few things to poke at.

swverify \* make sure there are no problems with the ldap installation if it was installed from hp depots.

Check the SHLIB_PATH environment variable.

If its not correctly set these kind of errors are common. Modify it or set it to include at least:

SHLIB_PATH=/usr/lib:$SHLIB_PATH
export SHLIB_PATH

leave off the $SHLIB_PATH if not already set. You can check current settings with the echo command

echo $SHLIB_PATH.

If all that checks out, see if the ldap binaries compare in filesize and checksum to a working system.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ermin Borovac
Honored Contributor
Solution

Re: Unresolved symbol: ldap_get_option (code) from ./ldapsearch

I think that /usr/lib/libldap.sl is culprit. This library contains ldap_get_option symbol.

# nm /usr/lib/libldap.sl | grep ldap_get_option

ldap_get_option | 131244|extern|entry |
ldap_get_option | 131316|extern|code |$CODE$
ldap_get_option | 250652|uext |stub |

I'm guessing that on your system this library has somehow been replaced. You can check this with swverify.

# swverify -v J4269AA

/opt/ldapux/bin/ldapsearch is linked with /usr/lib/libldap.sl, which is in turn linked with libraries in /opt/ldapux/lib. That would explain why you don't see libraries from /opt/ldapux/lib in the output of ldd on the system that throws the error.

Muthukumar_5
Honored Contributor

Re: Unresolved symbol: ldap_get_option (code) from ./ldapsearch

LDAP-UX will not configure when you try to do as /opt/ldapux/config/setup.

Try do as,

cd /opt/ldapux/config/
./setup

It will not be using relative path there.

Try to export shared library path as,

export SHLIB_PATH=/opt/ldapux/bin

If you try execute,

/opt/ldapux/bin/ldapsearch

it will work there. It will be executing exact share library path location there when your execute from relative path.

HTH.
Easy to suggest when don't know about the problem!