- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Wrapping Perl or Re-Linking Perl
Operating System - HP-UX
1752007
Members
4545
Online
108784
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО12-18-2008 08:12 AM
тАО12-18-2008 08:12 AM
We have recently rebuilt a perl module with a library that is failing because of this error:
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1
We can get it to work using the LD_PRELOAD environment variable. However, the perl module is used by the vast majority of our perl scripts so we'd have to either change every single shell script that calls one of the perl scripts to do the LD_PRELOAD, or we'd have to put it in everyone's environment which would mean that everything would be running with that shared library preloaded.
We've tried replacing the perl binary with a shell script that has the LD_PRELOAD in it, but we can't figure out a way to make that work with a script that executes perl using a shebang (#!).
Another idea that we've had is rebuilding perl so that it's linked to libpthread.1. We didn't build the version that we're running in the production environment though, so there's a little bit of hesitation that because of the amount of testing that our QA team would want to do before rolling it out to production. Would it be possible to just link libpthread to the executable without rebuilding everything so that it should load it at startup?
Any suggestions would be great.
Thanks,
-Vince
/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libpthread.1
We can get it to work using the LD_PRELOAD environment variable. However, the perl module is used by the vast majority of our perl scripts so we'd have to either change every single shell script that calls one of the perl scripts to do the LD_PRELOAD, or we'd have to put it in everyone's environment which would mean that everything would be running with that shared library preloaded.
We've tried replacing the perl binary with a shell script that has the LD_PRELOAD in it, but we can't figure out a way to make that work with a script that executes perl using a shebang (#!).
Another idea that we've had is rebuilding perl so that it's linked to libpthread.1. We didn't build the version that we're running in the production environment though, so there's a little bit of hesitation that because of the amount of testing that our QA team would want to do before rolling it out to production. Would it be possible to just link libpthread to the executable without rebuilding everything so that it should load it at startup?
Any suggestions would be great.
Thanks,
-Vince
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2008 12:49 PM
тАО12-18-2008 12:49 PM
Solution
>which would mean that everything would be running with that shared library preloaded.
You can't just export LD_PRELOAD and leave it set. All sorts of things will fail.
Which library is linked with libpthread? Do you own it? If you do, remove libpthread from the link line.
>rebuilding perl so that it's linked to libpthread.1.
This is the correct solution. In fact, isn't there a perl build target with that?
> Would it be possible to just link libpthread to the executable without rebuilding everything so that it should load it at startup?
The trouble with that is if you don't compile perl with threads, some things may fail if threads are created.
If threads are never created in your environment, you probably don't have to worry.
You can't just export LD_PRELOAD and leave it set. All sorts of things will fail.
Which library is linked with libpthread? Do you own it? If you do, remove libpthread from the link line.
>rebuilding perl so that it's linked to libpthread.1.
This is the correct solution. In fact, isn't there a perl build target with that?
> Would it be possible to just link libpthread to the executable without rebuilding everything so that it should load it at startup?
The trouble with that is if you don't compile perl with threads, some things may fail if threads are created.
If threads are never created in your environment, you probably don't have to worry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2008 12:58 PM
тАО12-18-2008 12:58 PM
Re: Wrapping Perl or Re-Linking Perl
The library that we build is linked to another library that's supplied by the vendor, and it's the vendor's library that is apparently linked to libpthread. This wasn't an issue with older versions of their libraries, it only recently became an issue when we updated their SDK.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP