- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- LD_LIBRARY_PATH -vs- SHLIB_PATH
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
Forums
Discussions
Discussions
Discussions
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
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-15-2006 04:26 AM
12-15-2006 04:26 AM
LD_LIBRARY_PATH -vs- SHLIB_PATH
What I'm wondering about is given the chatr and tusc output below , why is this working?
It looks to me like /usr/lib is being used by the executables even though the SHLIB_PATH and LD_LIBRARY_PATH are being set to avoid this.
Funnier still is if /usr/lib is in the SHLIB_PATH variable I can recreate the failure.
Are the naviagent and navicli using /usr/lib as specified in the shared library list?
Are they actually using the library in the LD_LIBRARY_PATH variable?
If LD_LIBRARY_PATH and SHLIB_PATH are set which one in used?
Thanks in advance for you input. I just don't feel comfortable with the "fix" even though it looks to be working.
chatr `which naviagent`
/opt/Navisphere/bin/naviagent:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic /usr/lib/libdld.1
dynamic /usr/lib/libstd.1
dynamic /usr/lib/libstream.1
dynamic /usr/lib/libCsup.1
dynamic /usr/lib/pa1.1/libcl.1
dynamic /usr/lib/libc.1
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled
chatr `which navicli`
/opt/Navisphere/bin/navicli:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic /usr/lib/libdld.1
dynamic /usr/lib/libstd.1
dynamic /usr/lib/libstream.1
dynamic /usr/lib/libCsup.1
dynamic /usr/lib/pa1.1/libcl.1
dynamic /usr/lib/libc.1
shared library binding:
deferred
global hash table disabled
echo $SHLIB_PATH
echo $LD_LIBRARAY_PATH
sh: LD_LIBRARAY_PATH: Parameter not set.
sapap9# /usr/contrib/bin/tusc navicli lunmapinfo | egrep -i 'libdld.1|libstd.1|libstream.1|libCsup.1|libcl.1'
open("/usr/lib/libdld.1", O_RDONLY, 057) ......................................................... = 3
open("/usr/lib/pa1.1/libcl.1", O_RDONLY, 057) .................................................... = 3
open("/usr/lib/libdld.1", O_RDONLY, 057) ......................................................... = 3
open("/usr/lib/libCsup.1", O_RDONLY, 057) ........................................................ = 3
open("/usr/lib/libstream.1", O_RDONLY, 057) ...................................................... = 3
open("/usr/lib/libstd.1", O_RDONLY, 057) ......................................................... = 3
open("/usr/lib/libdld.1", O_RDONLY, 057) ......................................................... = 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 07:51 AM
12-15-2006 07:51 AM
Re: LD_LIBRARY_PATH -vs- SHLIB_PATH
/usr/lib is always checked, SHLIB_PATH just adds other directories ahead of it. The only time you'd want to put /usr/lib in SHLIB_PATH is when you need libraries from other directories but still want to make sure you use the system-wide standard libraries instead of any equivalents in the other locations.
As I recall, on HP-UX SHLIB_PATH is used for 32-bit and LD_LIBRARY_PATH is used for 64-bit. They do the same thing, but for different types of binary.
You might be able to find out exactly what's wrong by running ldd on the binary and comparing the output with different SHLIB_PATH settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 09:25 AM
12-15-2006 09:25 AM
Re: LD_LIBRARY_PATH -vs- SHLIB_PATH
Looks like LD_LIBRARY_PATH is ignored.
An empty SHLIB_PATH results in all modules loading from /usr/lib and naviagent doesn't crash. Having /usr/lib explicitly in the SHLIB_PATH all modules are loaded from /usr/lib but the naviagent will crash.
Go figure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2006 11:58 PM
12-15-2006 11:58 PM
Re: LD_LIBRARY_PATH -vs- SHLIB_PATH
The only strange thing is these applications were made for 10.20.
The application doesn't try to dynamically load any other lib with shl_load??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2006 09:28 PM
12-16-2006 09:28 PM
Re: LD_LIBRARY_PATH -vs- SHLIB_PATH
LD_LIBRARY_PATH is used on Solaris.
Check out
http://docs.hp.com/en/B2355-90654/ch04s03.html#d0e8541
at the very bottom.
Looks like /usr/lib/pa1.1/libcl.1
is exactly the guy in charge.
When you put /usr/lib in SHLIB_PATH, the wrong /usr/lib/libcl.1 is used instead.
If
/usr/lib/pa1.1/libcl.1
is symlinked to the
/usr/lib/libcl.1
on your box, I do not understand the error :-(
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2006 06:53 PM
12-17-2006 06:53 PM