- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Incorrect embedded library names in shared library
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
тАО06-11-2009 08:29 AM
тАО06-11-2009 08:29 AM
While building a shared library, I noticed that if I pass a path to a dependent shared library on the link line (as opposed to using the -l and -L linker options), the path is embedded in the new library. For example, building libbar that depends on libfoo:
$ aCC -AA -b +DD64 -g -mt -o libbar.so bar.o ../foo/bin/libfoo.so
results in:
$ chatr libbar.so
libbar.so:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/lib/hpux64:/opt/langtools/lib/hpux64
shared library list:
../foo/bin/libfoo.so
libpthread.so.1
.
.
.
The name of libfoo.so is embedded with the path used on the link line. Now libbar will only load if the relative path to libfoo.so resolves- LD_LIBRARY_PATH and SHLIB_PATH do not work. Is this the way it should work? I would think that just the name of the library should be embedded.
Thanks,
Jim Gallagher
Solved! Go to Solution.
- Tags:
- shlib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 08:40 AM
тАО06-11-2009 08:40 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 08:49 AM
тАО06-11-2009 08:49 AM
Re: Incorrect embedded library names in shared library
That was a very fast reply, thank you.
I ran into this using Boost-Build to run the the build of a several library project. Do you know if this behavior is similar on other Unix variants?
Thanks,
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2009 10:20 PM
тАО06-11-2009 10:20 PM
Re: Incorrect embedded library names in shared library
-L../foo/bin -lfoo
(You should also be putting foo in a lib/ directory, not bin/.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-12-2009 05:24 AM
тАО06-12-2009 05:24 AM