- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Difficulty with shared objects
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
03-12-2007 10:30 AM
03-12-2007 10:30 AM
Difficulty with shared objects
I have used these forums for a while for help on a number of HP-UX related issues; this is my first time to actually post. I'm a relative newcomer to HP-UX.
System: IA64 B39010B running 11.23i (v2)
Compiler: aCC/cc A.06.13
I am building a piece of software that integrates with OV8 & NNM 7.51.
The executables and custom .so's build without problem. The executables run. However, when I trace the problem, shl_load or dlopen (i've used both) tell me it can't find the library.
I compiled with +s, and had SHLIB_PATH and LD_LIBRARY_PATH populated with the path to the library. I have verified that there are no typo's. Chatr tells me that it will used LD_LIBRARY_PATH as its primary, and SHLIB_PATH as its seconday source for searching for .so's for the executable.
The exe actually takes the library name as a parameter, and i have put the full path in with the name.
What am i doing wrong?
If you need more info, let me know and I will post it.
Thank you in advance,
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2007 10:53 AM
03-12-2007 10:53 AM
Re: Difficulty with shared objects
Hello Fred,
I'm afraid I have little or nothing of value to add to the question itself but I just wanted to compliment you on an exemplary post. Very refreshing!
All the details which seem relevant yet not too much. Not just one-line, man-page question, nor a book. Rigth in the middle.
And great attitude:
- Not assuming the system is broken.
- Assuming you need to provide more details.
Thank you.
As for the problem, I was going to suggest trace or truss, but you already did that.
How about using ldd on all images in the chain? Maybe the primary image can be found (is allowed to be found!) but the secondary image which it relies on has a problem?!
My swag for the underlying issue is protection/permission, as you already hint also. Those -s mode bits ?!
Regards,
Hein van den Heuvel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2007 03:37 PM
03-12-2007 03:37 PM
Re: Difficulty with shared objects
shl_load will not look at SHLIB_PATH or LD_LIBRARY_PATH unless you OR in DYNAMIC_PATH. I'm not sure about dlopen.
>The exe actually takes the library name as a parameter, and i have put the full path in with the name.
If you pass the full path, then my comment above isn't the issue.
You may want to export LD_LIBRARY_PATH then invoke ldd on your shared lib.
>Hein: I just wanted to compliment you on an exemplary post.
The only problem is the subject. These are shared libs not shared objects on HP-UX. ;-)
>Hein: I was going to suggest trace or truss, but you already did that.
I see no evidence of the use of tusc??
You may want to use tusc on that ldd I mention above. That would show you all of the opens it is doing to find your shlib.
Note: +s is not honored for SUID applications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2007 02:54 AM
03-15-2007 02:54 AM
Re: Difficulty with shared objects
As I mentioned I'm fairly new to working in the HP-UX environment. As such there are a lot of tools I don't know about.
For example, I had never heard of tusc. I also had not known to use the -r option for LDD.
As a result of this, I have been able to find problems and fix them.
I am still having a problem buiding one library. It says there are like 400+ unsat symbols. Most of these are things that would be define in headers, like _getrlimit64 and __thread_getspecific.
I do not understand why these are not being picked up. Can you assist with this problem?
Thanks
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2007 03:01 AM
03-15-2007 03:01 AM
Re: Difficulty with shared objects
I would like to clarify what I meant by trace in my first post. I crawled throuh it on the WDB.
Thank you once again.
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2007 02:14 PM
03-15-2007 02:14 PM
Re: Difficulty with shared objects
You ignore those and assume they are defined in libc and libpthread.
>I do not understand why these are not being picked up.
Typically shared libs don't need dependent libs if the executable has them already. In particular you should never add -lc to a shared lib. If you add it, then use ldd -r, and nothing is left, you're fine. Then you can then remove -lc.
>what are +s bits?
When you link with +s, you tell dld it can can look at SHLIB_PATH to find runtime libs.
You haven't assigned any points yet. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2007 07:41 AM
03-16-2007 07:41 AM
Re: Difficulty with shared objects
Thanks!!
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2007 03:32 PM
03-16-2007 03:32 PM
Re: Difficulty with shared objects
I don't see any evidence of that??
>what are +s bits?
Ah, Hein said: Those -s mode bits?
He may be talking about SUID bits? These cause the SHLIB_PATH to be ignored, as a security feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2007 08:48 AM
03-19-2007 08:48 AM
Re: Difficulty with shared objects
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2007 08:57 AM
03-19-2007 08:57 AM