- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shared lib path error
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
11-12-2007 11:25 PM
11-12-2007 11:25 PM
I have an installer which is dependant on several shared libraries. These libraries are specified with a full path name at link time and I am attempting to use chatr to remove this path dependency.
chatr +s enable +b disable –l
When I do an ldd on the installer on the destination machine (with libraries unpacked into the install directory) I see a Can’t open shared library: error followed by the original full library path.
Have I got a syntactical error in my chatr command or does my problem lie elsewhere.
Thanks in advance
Ed
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2007 11:48 PM
11-12-2007 11:48 PM
SolutionCheck the SHLIB_PATH when running the above commands. Make sure it includes paths to the relavent libraries in the correct order to avoid name conflict.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007 01:02 AM
11-13-2007 01:02 AM
Re: shared lib path error
Thanks for the advice but I am not sure I fully understand. The SHLIB_PATH is not set before the chatr call during the build on the development machine or before the ldd call on the destination machine.
As the libraries in question are unpacked into the installer directory I tried setting the SHLIB_PATH to this path before running the ldd command but saw the same error showing the library still qualified with the full path from the development machine.
Can I clarify that my aim in using the chatr command is to strip the path from the static library in question during the link so that it can just be dumped into the install directory on the destination machine.
Thanks again
Ed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2007 04:12 PM
11-13-2007 04:12 PM
Re: shared lib path error
Why? Why not use -L and -l to point to them?
>chatr +s enable +b disable -l
Why wouldn't you do this before you package it?
Also using -l isn't apt to do anything unless you used +l, or didn't use -lfoo when you linked. (I guess that's what you said by "full path name" above.)
>my aim in using the chatr command is to strip the path from the static library in question during the link so that it can just be dumped into the install directory on the destination machine.
Using +s enable with -l should do that.
$ chatr ...
$ export SHLIB_PATH=...
$ ldd ...
What did chatr(1) give when you did the above command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2007 12:23 AM
11-20-2007 12:23 AM
Re: shared lib path error
Thanks for the suggestions however as usual my problem was in missing the obvious. It appears that the chatr command was doing its jobs perfectly in stripping the library path, run in a script straight after linking as below
chatr +s enable +b disable -l
Unfortunately the second library path I had given it didn't exist and so the command failed with a nice verbal error message which I gobbled up later in my script using a grep.
Fixed this and the chatr output on my problem exe changes from this...
HP-C8000 37% chatr install
install:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
static /sources/my_lib.so
...
...to this ...
HP-C8000 45% chatr install
install:
shared executable
shared library dynamic path search:
SHLIB_PATH enabled first
embedded path disabled second Not Defined
shared library list:
dynamic /sources/mylib.so
...
Thanks again for the help
Ed