- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Can't open shared library: /usr/lib/libpthread...
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
тАО09-25-2006 03:21 AM
тАО09-25-2006 03:21 AM
Can't open shared library: /usr/lib/libpthread.1
We have a piece of code that fails while loading one of our libraries.
We reproduce the problem with this simple program:
******************************
#include
#include
#include
int main(void){
char* env_path = 0;
void* rc;
char* rs = 0;
env_path = getenv("SHLIB_PATH");
printf("value for SHLIB_PATH is: %s\n", env_path);
putenv("SHLIB_PATH=/opt/ibm/gsk7/lib:/usr/lib");
putenv("ICC_IGNORE_FIPS=yes");
env_path = getenv("SHLIB_PATH");
printf("New value for SHLIB_PATH is: %s\n", env_path);
rc = dlopen("libgsk7ssl.sl",RTLD_NOW | RTLD_GLOBAL);
rs = dlerror();
printf("Reason is %s\n",rs);
if (!rc) {
printf("ERROR. library not loaded\n");
} else {
printf("OK, library loaded\n");
}
}
**********************
libgsk7ssl.sl is our dll.
this is the output of 'ldd libgsk7ssl.sl'
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
./../gsk_cms/gskcms/hpuxrelease//libgsk7cms.sl => /usr/lib/libgsk7cms.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libCsup_v2.2 => /usr/lib/libCsup_v2.2
/usr/lib/libstd_v2.2 => /usr/lib/libstd_v2.2
./gsksys/hpuxrelease//libgsk7sys.sl => /usr/lib/libgsk7sys.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
I have some machines where this sample program works, some machines where it doesn't. I compile it with aCC:
aCC -lpthread -lm sample_code.c
I recognized that the difference between the failing machines and the good one for my sample is the presence of patch phss_33037. The presence of this patch triggers the problem.
Is it something related to the patch?
thanks.
- Tags:
- pthread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 03:29 AM
тАО09-25-2006 03:29 AM
Re: Can't open shared library: /usr/lib/libpthread.1
Patch causes the problem. You said it. Check the patch database for a successor patch. Or swremove it.
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
тАО09-25-2006 05:27 AM
тАО09-25-2006 05:27 AM
Re: Can't open shared library: /usr/lib/libpthread.1
Do you already know if there's some problem with this patch? Or if this patch added some side-effect in the way to load libraries?
I ask this because I cannot find superseded patches to this one and I need to be 100% sure before asking to remove an OS patch.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 05:48 AM
тАО09-25-2006 05:48 AM
Re: Can't open shared library: /usr/lib/libpthread.1
phss_33037 is s700_800 11.11 ld(1) and linker tools cumulative patch. Do you have latest aCC patches installed ? or, what is your acc version ? Take a look at PHSS_33944.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 12:21 PM
тАО09-25-2006 12:21 PM
Re: Can't open shared library: /usr/lib/libpthread.1
Note if you need to load libpthread.1, it is probably the Thread Local Storage error. I.e. you must link your executable with -lpthread and it seems you have it.
The only other weird case of this error occurs if you patch libpthread while the application was running. But that would only show up once, then go away.
- Tags:
- TLS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 10:14 PM
тАО09-25-2006 10:14 PM
Re: Can't open shared library: /usr/lib/libpthread.1
The dlerror I get is "Can't open shared library: /usr/lib/libpthread.1"
I've run the sample code after having completed the patch installation.
Do I have to follow some specific rules while linking to libc? (At the moment aCC does it for me)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2006 10:51 PM
тАО09-25-2006 10:51 PM
Re: Can't open shared library: /usr/lib/libpthread.1
You can but I doubt it will make a difference since it is dld that's the problem. As mentioned by Steven, you should probably remove PHSS_33037. (See comment below for one last change before removing the patch.)
>The dlerror I get is "Can't open shared library: /usr/lib/libpthread.1"
This isn't a good message since it doesn't say why it can't open it. Does it still say this if you move these into the error block?
rs = dlerror();
printf("Reason is %s\n",rs);
>I've run the sample code after having completed the patch installation.
aCC -lpthread -lm sample_code.c
This isn't correct. Your libgsk7ssl.sl is compiled with -AA. So you need to compile sample_code.c with -AA too. (You probably could compile with cc.)
So fix your source and add -AA before you remove the patch.
>Do I have to follow some specific rules while linking to libc? (At the moment aCC does it for me)
No, not for libc, just let the driver handle it.
- Tags:
- -AA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2006 04:22 AM
тАО09-26-2006 04:22 AM
Re: Can't open shared library: /usr/lib/libpthread.1
--
ranga
[i work for hpe]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2006 08:35 PM
тАО09-27-2006 08:35 PM
Re: Can't open shared library: /usr/lib/libpthread.1
Do you know if there's a place where to get this info officially from HP? (i.e. a public website or other). I have to be 100% sure before asking to remove a OS patch from a system or to wait for a new patch.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2006 08:58 PM
тАО09-27-2006 08:58 PM
Re: Can't open shared library: /usr/lib/libpthread.1
check the patch details:
http://www4.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=PHSS_33037
As mentioned you can remove this patch and install the previous PHSS_33033.
Volkmar