- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Mozialla Build LDAP SDK: Getting hard links with s...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2007 12:32 AM
тАО12-04-2007 12:32 AM
Mozialla Build LDAP SDK: Getting hard links with shared libraries
Hi,
I am building Mozialla LDAP SDK on HP-UX platform. The problem is that when i do ldd to the build shared libraries(on libobfreebl_pure32_3.sl and others also),
it shows the complete path to its dependencies on other mozialla build shared objects.
ldd ./HP-UXB.11.11_OPT.OBJ/libobfreebl_pure32_3.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/lib/freebl/../../../../dist/HP-UXB.11.11_OPT.OBJ/lib//libobnspr4.sl => /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/lib/freebl/../../../../dist/HP-UXB.11.11_OPT.OBJ/lib//libobnspr4.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
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
I tried moving ibobnspr4.sl to some other location and setting my SHLIB_PATH to the moved directory, but still libobfreebl_pure32_3.sl is refering to the earlier link /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/lib/freebl/../../../../dist/HP-UXB.11.11_OPT.OBJ/lib//libobnspr4.sl
I am using ANSI "cc" compiler for building the mozialla LDAP sdk.
The linker command for "libobfreebl_pure32_3.sl" is
d -b +h libobfreebl_pure32_3.sl +k +vshlibunsats -u FREEBL_GetVector +e FREEBL_GetVector -o HP-UXB.11.11_OPT.OBJ/libobfreebl_pure32_3.sl HP-UXB.11.11_OPT.OBJ/ldvector.o HP-UXB.11.11_OPT.OBJ/prng_fips1861.o HP-UXB.11.11_OPT.OBJ/sysrand.o HP-UXB.11.11_OPT.OBJ/sha_fast.o HP-UXB.11.11_OPT.OBJ/md2.o HP-UXB.11.11_OPT.OBJ/md5.o HP-UXB.11.11_OPT.OBJ/alg2268.o HP-UXB.11.11_OPT.OBJ/arcfour.o HP-UXB.11.11_OPT.OBJ/arcfive.o HP-UXB.11.11_OPT.OBJ/desblapi.o HP-UXB.11.11_OPT.OBJ/des.o HP-UXB.11.11_OPT.OBJ/rijndael.o HP-UXB.11.11_OPT.OBJ/dh.o HP-UXB.11.11_OPT.OBJ/pqg.o HP-UXB.11.11_OPT.OBJ/dsa.o HP-UXB.11.11_OPT.OBJ/rsa.o HP-UXB.11.11_OPT.OBJ/mpprime.o HP-UXB.11.11_OPT.OBJ/mpmontg.o HP-UXB.11.11_OPT.OBJ/mplogic.o HP-UXB.11.11_OPT.OBJ/mpi.o /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/lib/freebl/../../../../dist/HP-UXB.11.11_OPT.OBJ/lib/libsecutil.a -L/scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/lib/freebl/../../../../dist/HP-UXB.11.11_OPT.OBJ/lib/ -lobplc4 -lobplds4 -lobnspr4 -lc
I also tried ld with "+s" and "+b" option but it didn't help much.
Thanks
- Tags:
- LDAP
- shlib
- SHLIB_PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2007 12:47 AM - edited тАО09-18-2011 01:03 PM
тАО12-04-2007 12:47 AM - edited тАО09-18-2011 01:03 PM
Re: Mozilla Build LDAP SDK: Getting hard links with shared libraries
(Darn, I answered this already and the original thread seems to have disappeared??)
Basically don't use ldd on shlibs, use it on your executable that is linked with this shlib.
Or you can use chatr(1).
>I also tried ld with "+s" and "+b" option but it didn't help much.
You'll need to use one or more of those to make ldd work when when you use ldd on the executable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2007 01:13 AM
тАО12-04-2007 01:13 AM
Re: Mozialla Build LDAP SDK: Getting hard links with shared libraries
Thanks for the reply.
Actually we are writing a plugin for a webserver which is a shared library(its not an executable). Our plugin(.sl library) gets linked to these built mozilla ldap sdk shared libraries.
Moreover "+s" option is not always working. In some cases it doesn't give the desired result.
Step 1
ld +s -b +h libobplds4.sl -o libobplds4.sl ./plarena.o ./plhash.o ./plvrsion.o -L/scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/../../dist/HP-UXB.11.11_OPT.OBJ/lib -lobnspr4
Step 2
copy the newly build libobplds4.sl to /scratch/Ranjan/Mozialla_HP
set SHLIB_PATH to /scratch/Ranjan/Mozialla_HP
This directory has libobnspr4.sl
Rename /scratch/Ranjan/LDAP_SDK5_Source to some other directory.
Step 3
[/scratch/Ranjan/Mozialla_HP]$ ldd libobplds4.sl
/scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/../../dist/HP-UXB.11.11_OPT.OBJ/lib/libobnspr4.sl => /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/../../dist/HP-UXB.11.11_OPT.OBJ/lib/libobnspr4.sl
/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/libm.2 => /usr/lib/libm.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/librt.2 => /usr/lib/librt.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
Its should have referred to the libobnspr4 present in /scratch/Ranjan/Mozialla_HP directory rather than the other one which is now moved.
If I don't set the SHLIB_PATH then ldd command says
/usr/lib/dld.sl: Can't open shared library: /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/../../dist/HP-UXB.11.11_OPT.OBJ/lib/libobnspr4.sl
/usr/lib/dld.sl: No such file or directory
Dont know why its behaving like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2007 01:29 AM - edited тАО09-18-2011 01:05 PM
тАО12-04-2007 01:29 AM - edited тАО09-18-2011 01:05 PM
Re: Mozilla Build LDAP SDK: Getting hard links with shared libraries
>Moreover "+s" option is not always working. In some cases it doesn't give the desired result.
How do you know? You are trusting in the ldd output rather than something tried and true like tusc.
>It should have referred to the libobnspr4 present in /scratch/Ranjan/Mozialla_HP directory rather than the other one which is now moved.
It probably did but printed the wrong lib. It can't point to the moved one because nobody but you knows where that went. What dld/linker patch do you have?
Running tusc would prove which shlib is being used.
>If I don't set the SHLIB_PATH then ldd command says
dld.sl: Can't open shared library: /scratch/Ranjan/LDAP_SDK5_Source/mozilla/security/nss/../../dist/HP-UX B.11.11_OPT.O
BJ/lib/libobnspr4.sl
This seems to imply SHLIB_PATH is working but ldd is printing the wrong thing.
I thought I've seen a bug like that.
- Tags:
- tusc