- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Problem loading library with shl_load (hpux 11...
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-30-2008 11:03 PM
тАО06-30-2008 11:03 PM
HP-UX itahp B.11.23 U ia64 2910282009 unlimited-user license
I'm trying to load a library using the following command
libraryHandle = shl_load( library, BIND_FIRST | BIND_DEFERRED | DYNAMIC_PATH, 0L );
(gdb) p library
$2 = 0x600000000001fb20 "/opt/BMCS/mq/bin/AMQAMP00"
This fails with errno=2
(gdb) p errno
$1 = 2
from errno.h:
#define ENOENT 2 /* No such file or directory */
if I try to ls the file there is no problem and also if I try to read its content:
ls -la /opt/BMCS/mq/bin/AMQAMP00
-rwxr-xr-x 2 patrolmq mqm 21552 Jun 25 19:45 /opt/BMCS/mq/bin/AMQAMP00
$ file /opt/BMCS/mq/bin/AMQAMP00
/opt/BMCS/mq/bin/AMQAMP00: ELF-64 shared object file - IA64
The path is built from a few links
/opt/BMCS/mq -> /home/patrolmq/common/mq
/opt/BMCS/mq/bin/AMQAMP00 -> HPUX11/AMQAMP00
I have no idea what is wrong. I tried to copy the file to some other location without any link to the file (/home/patrolmq) and it didn't help.
Were should I go from here?
Solved! Go to Solution.
- Tags:
- shl_load
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2008 11:34 PM
тАО06-30-2008 11:34 PM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
It is illegal for you you to look at errno unless libraryHandle is NULL. Otherwise you may get some stale errno value.
If you want more details on errors, OR in BIND_VERBOSE.
Also, any reason you aren't using dlopen(3) on IPF?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2008 11:42 PM
тАО06-30-2008 11:42 PM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
The reason I use shl_load is because this is old code that i'm porting from PA-RISC to itanium.
Anyway I will try now using dlopen.
Thanks a lot from you quick answer.
I will let you know what happened after the change to dlopen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2008 11:49 PM
тАО06-30-2008 11:49 PM
SolutionOk, I assumed the answer was easy.
>Anyway I will try now using dlopen.
Before you do that, try with BIND_VERBOSE. You may be getting the errors on dependent shlibs.
I.e. what does "chatr AMQAMP00" show?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2008 11:53 PM
тАО06-30-2008 11:53 PM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
-------------------------------
/opt/BMCS/mq/bin/AMQAMP00:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third .:/opt/BMCS/mq/bin:/opt/mqm/lib:/usr/ucblib:/usr/ccs/lib:/usr/lib
shared library list:
libamq.so
shared vtable support disabled
explicit unloading enabled
segments:
index type address flags size
6 text 4000000000000000 z---c- D (default)
7 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled
address space model: default
caliper dynamic instrumentation disabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2008 12:02 AM
тАО07-01-2008 12:02 AM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
>shared library list: libamq.so
So where is libamq.so?
In /opt/BMCS/mq/bin:/opt/mqm/lib:/usr/ucblib?
/usr/ccs/lib:/usr/lib are not valid. The former because there are no libs there. The latter because this is a PA32 path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2008 12:25 AM
тАО07-01-2008 12:25 AM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
Either the file needed is not there at all or it may be corrupt.
if its there compare it to a library of the same name and location on a working system.
I've seen a few circumstances where an oracle library was sitting on an unlucky part of the disk where the size suddenly changed and we out of the blue could not compile or start oracle.
Such corruption could be the case here.
Good Luck
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
тАО07-01-2008 01:01 AM
тАО07-01-2008 01:01 AM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
/opt/BMCS/mq/bin/libamq.so -> /opt/BMCS/mq/bin/HPUX11/libamq.so
But still this doesn't help.
I'm now testing with the BIND_VERBOSE flag, and will also try the dlopen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2008 01:09 AM
тАО07-01-2008 01:09 AM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
You may need to recursively apply chatr on your shlib to find all dependent shlibs.
You can also use ldd(1) to get the all at once. But unfortunately it stops on the first missing one, where chatr(1) just lists them where they should be.
- Tags:
- ldd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2008 01:30 AM
тАО07-01-2008 01:30 AM
Re: Problem loading library with shl_load (hpux 11-23/ia64)
Its restore or reinstall the product time. If this ever worked, and you have backups, you should be able to install/restore and verify the contents of the missing folder.
Where one library is missing, there are probably other ones missing.
If you have a similar system you may be able to shortcut the process with an scp -p of a directory or two.
To be safe though reinstall of the depots/sources of the software is my recommendation.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com