- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Segmentation fault when link to libc.sl
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
тАО10-22-2008 08:51 AM
тАО10-22-2008 08:51 AM
(gdb) bt
#0 0xc000000000036930:1 in strcpy+0x31 () from /usr/lib/hpux64/dld.so
#1 0xc0000000000583e0:0 in _dlopen+0xac0 () from /usr/lib/hpux64/dld.so
#2 0xc000000000394010:0 in __dlopen+0xf0 () from /usr/lib/hpux64/libdl.so.1
#3 0xc000000000393a60:0 in dlopen+0x40 () from /usr/lib/hpux64/libdl.so.1
#4 0xc0000000000583e0:0 in _dlopen+0xac0 () from /usr/lib/hpux64/dld.so
However when I remove the libc.sl form the linking option the application start ok, my compilation option line include
-g0 +objdebug -AA +W67,612,336,2815,2830 +We652,829 +p +DD64 -mt -D_REENTRANT
thanks for help in advance
Solved! Go to Solution.
- Tags:
- dlopen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2008 11:29 AM
тАО10-22-2008 11:29 AM
Re: Segmentation fault when link to libc.sl
> libc.sl, [...]
What makes you say that?
> [...] when i link to this shared lib [...]
How, exactly, did you do this? Actual
commands are often more helpful than vague
descriptions.
> However when I remove the libc.sl form the
> linking option the application start ok,
So, it would appear that you _don't_ need to
link (explicitly) with libc.sl. The C
compiler should know where to find the right
libc without any help ("help"?) from you.
> [...] my compilation option line include
> [...]
The whole command would be better than an
excerpt.
Is there any chance that you're mixing 32-bit
code with 64-bit code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-22-2008 06:39 PM
тАО10-22-2008 06:39 PM
Solution(That's libc.so on Integrity.)
You should never ever link with -lc. This is done automatically for you by the driver. Especially don't add it to shlibs. And you especially don't want that -lc before -lpthread.
>when I remove the libc.so from the linking option the application start ok
That's because you have libc and some other lib that is calling dlopen in a static initializer and libc is linked in the wrong order. It must be last.
You can also install PHSS_38134 to solve the problem:
QXCR1000771352: accessing TLS data in shared library initializer aborts application
>Steven: > my application need to link to libc.sl
>What makes you say that?
Every application needs libc. But on Integrity, they should let the driver add it.
>Actual commands are often more helpful than vague descriptions.
Yes, would need to see the dependent shlib graph. But since I've seen the problem over and over and told them how to fix QXCR1000771352, it isn't needed.
>The C driver should know where to find the right libc
Exactly.
>Is there any chance that you're mixing 32-bit code with 64-bit code?
Nothing so simple. :-)
- Tags:
- TLS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:01 AM
тАО10-23-2008 12:01 AM
Re: Segmentation fault when link to libc.sl
However I understand from Dennis and Steven that I have to let the driver add it.
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:48 AM
тАО10-23-2008 12:48 AM
Re: Segmentation fault when link to libc.sl
I forgot to mention, we now remind you not to do that:
aCC: warning 983: The -lc library specified on the command line is also added automatically by the compiler driver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2008 12:54 AM
тАО10-23-2008 12:54 AM