- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: LD_PRELOAD and libcl.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
тАО03-08-2006 07:09 AM
тАО03-08-2006 07:09 AM
LD_PRELOAD and libcl.sl
I am having trouble with running my application HP-UX B.11.11.
I have an executable (a.exe) that dynamically loads a shared library (b.so). I get an undefined symbol:
/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol 'FTN_DTOI' in load module '/homes/dudee/myneni/workarea/exec/b.so'
I tried setting the following environment variable at runtime:
"LD_PRELOAD=/usr/lib/pa20_64/libcl.sl"
but that doesn't help. Same message as above.
If I list "-L/usr/lib/pa20_64/ -lcl" in the link line, I get:
"Error: Cannot dlopen load module '/homes/dudee/myneni/workarea/exec//b.so' because it contains thread specific data."
At this point, I had -Wl,-aarchive, which I changed to -Wl,-ashared_archive and I get the following:
Cannot dlopen load module '/usr/lib/pa20_64/libcl.2' because it contains thread specific data.
With or without LD_PRELOAD pointing to /usr/lib/pa20_64/libcl.sl.
Can someone help me understand how to fix this issue?
Thanks in advance
-Sachin
- Tags:
- LD_PRELOAD
- TLS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 07:13 AM
тАО03-08-2006 07:13 AM
Re: LD_PRELOAD and libcl.sl
Try put path from your shared library in SHLIB_PATH enviroment variable.
Schimidt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 07:22 AM
тАО03-08-2006 07:22 AM
Re: LD_PRELOAD and libcl.sl
Could you provide more information about your server's architecture etc...
# uname -a
# file a.exe
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 08:02 AM
тАО03-08-2006 08:02 AM
Re: LD_PRELOAD and libcl.sl
myneni@hp76 BOM_opti/os-mbd-fem > uname -a
HP-UX hp76 B.11.11 U 9000/785 3968680693 unlimited-user license
myneni@hp76 BOM_opti/os-mbd-fem > file ~/os_binaries/os80d_HP-UX_42_64mp
/homes/dudee/t/tad/os_binaries/os80d_HP-UX_42_64mp: ELF-64 executable object file - PA-RISC 2.0 (LP64)
myneni@hp76 BOM_opti/os-mbd-fem > file ~/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so
/homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so: ELF-64 shared object file - PA-RISC 2.0 (LP64)
myneni@hp76 BOM_opti/os-mbd-fem > chatr ~/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so
/homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/nu_libs:/a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX:/opt/fortran90/lib/pa20_64:/usr/lib/pa20_64:/opt/aCC/lib/pa20_64:/usr/lib/pa20_64:/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
shared vtable support disabled
segments:
index type address flags size
5 text 4000000000000000 z---c D (default)
6 data 8000000100000000 ---m- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
myneni@hp76 BOM_opti/os-mbd-fem >
Here is the information on the build machine:
myneni@hp77 p4_mbd/mbd > uname -a
HP-UX hp77 B.11.11 U 9000/785 2005242756 unlimited-user license
myneni@hp77 p4_mbd/mbd >
Thanks
-Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 08:58 AM
тАО03-08-2006 08:58 AM
Re: LD_PRELOAD and libcl.sl
How about the output of the following commands...
# file a.exe
# ldd -v a.exe
# file /homes/dudee/myneni/workarea/exec/b.so
# ldd -v /homes/dudee/myneni/workarea/exec/b.so
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 08:59 AM
тАО03-08-2006 08:59 AM
Re: LD_PRELOAD and libcl.sl
How about the output of the following commands...
# file a.exe
# ldd -v a.exe
# file /homes/dudee/myneni/workarea/exec/b.so
# ldd -v /homes/dudee/myneni/workarea/exec/b.so
...also post the command used for compilation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 10:29 AM
тАО03-08-2006 10:29 AM
Re: LD_PRELOAD and libcl.sl
I don't have ldd on any of my HP-UX systems, so I cannot give the output of 2 of the commands. But here is the output of 'file' from both the executable and shared object:
Executable:
myneni@hp76 BOM_opti/os-mbd-fem > file ~tad/os_binaries/os80d_HP-UX_42_64mp
/homes/dudee/t/tad/os_binaries/os80d_HP-UX_42_64mp: ELF-64 executable object file - PA-RISC 2.0 (LP64)
Shared Object:
myneni@hp76 BOM_opti/os-mbd-fem > file /homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so
/homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so: ELF-64 shared object file - PA-RISC 2.0 (LP64)
COMPILATION FLAGS:
FORTRAN compilation flags: /opt/fortran90/bin/f90 +U77 +DA2.0W +DS2.0 -Df90 +O2 +Z +Onoopenmp +source=default +noextend_source
C++ Compilation flags: /opt/aCC/bin/aCC +DA2.0W +DS2.0 -Dhpf90 -Dhpux +O2 +Z
Verbose Link output:
/opt/aCC/bin/aCC +DA2.0W +DS2.0 -Wl,-aarchive,+vnocompatwarnings -v //OBJ_LIST// +O2 -b -L/a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/nu_libs -L/a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX -lnumerflib_HP-UX_64mp -lnumerclib_HP-UX_64mp -lblas_HP-UX_64mp -lblas_HP-UX_64mp -L/opt/fortran90/lib/pa20_64 -lU77 -lF90_parallel -L/usr/lib/pa20_64 -lstd -lstream -lCsup -lm -L/opt/aCC/lib/pa20_64 -ldemangle -lcl /a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX/cflex_64.o /a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX/lm_new_cflex_64.o -llmgr_cflex_64 -lcrvs_cflex_64 -lsb_cflex_64 -L/usr/lib/pa20_64 -o nusolver.so
LPATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
/usr/ccs/bin/ld -b -o /tmp/nusolver.so_myneni +I__shlTerm -aarchive +vnocompatwarnings acceleration.o ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 10:32 AM
тАО03-08-2006 10:32 AM
Re: LD_PRELOAD and libcl.sl
Hi Sandman,
I don't have ldd on any of my HP-UX systems, so I cannot give the output of 2 of the commands. But here is the output of 'file' from both the executable and shared object:
Executable:
-----------
myneni@hp76 BOM_opti/os-mbd-fem > file ~tad/os_binaries/os80d_HP-UX_42_64mp
/homes/dudee/t/tad/os_binaries/os80d_HP-UX_42_64mp: ELF-64 executable object file - PA-RISC 2.0 (LP64)
Shared Object:
--------------
myneni@hp76 BOM_opti/os-mbd-fem > file /homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so
/homes/dudee/myneni/workarea/p4_mbd/mbd/exec/HP-UX_64mp/nusolver.so: ELF-64 shared object file - PA-RISC 2.0 (LP64)
COMPILATION FLAGS:
==================
FORTRAN compilation flags:
--------------------------
/opt/fortran90/bin/f90 +U77 +DA2.0W +DS2.0 -Df90 +O2 +Z +Onoopenmp +source=default +noextend_source
C++ Compilation flags:
----------------------
/opt/aCC/bin/aCC +DA2.0W +DS2.0 -Dhpf90 -Dhpux +O2 +Z
Verbose Link output:
--------------------
/opt/aCC/bin/aCC +DA2.0W +DS2.0 -Wl,-aarchive,+vnocompatwarnings -v //OBJ_LIST// +O2 -b -L/a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/nu_libs -L/a/homes/dudee/m
/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX -lnumerflib_HP-UX_64mp -lnumerclib_HP-UX_64mp -lblas_HP-UX_64mp -lblas_HP-UX_64mp -L/opt/fortran90/lib/pa20_64 -lU77 -lF90_parallel -L/usr/lib/pa20_64 -lstd -lstream -lCsup -lm -L/opt/aCC/lib/pa20_64 -ldemangle -lcl /a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX/cflex_64.o
/a/homes/dudee/m/myneni/workarea/p4_mbd/mbd/OSLIBS/LIB-HP-UX/lm_new_cflex
_64.o -llmgr_cflex_64 -lcrvs_cflex_64 -lsb_cflex_64 -L/usr/lib/pa20_64 -o nusolver.so
LPATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
/usr/ccs/bin/ld -b -o /tmp/nusolver.so_myneni +I__shlTerm -aarchive +vnocompatwarnings acceleration.o ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 11:16 AM
тАО03-08-2006 11:16 AM
Re: LD_PRELOAD and libcl.sl
Thanks for the legible output. From your last post it looks like you have the wrong library path for linking the "libcl.2" library (that's if I'm reading the aCC compilation correctly).
Under your "Verbose Link output" section the lib path is specified...
"-L/opt/aCC/lib/pa20_64 -ldemangle -lcl"
...which is incorrect since the libcl.sl is found under "/usr/lib/pa20_64". In fact you can search for it as:
# find / -name "libcl.sl" -type f
<...should show up only in /usr/lib/pa20_64>
Another suggestion would be not to use "-Wl,-aarchive" and let the defaults apply. The default action is to link the shared lib (and if it's not found bind the executable with the archive version). See ld(1) for details.
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2006 08:32 PM
тАО03-08-2006 08:32 PM
Re: LD_PRELOAD and libcl.sl
It seems that a.exe is C++ and b.so is Fortran?
If you are doing that, you should link a.exe with libcl.sl.
A similar issue occurs with C and aC++ and we have a nice web explaining what to do:
http://docs.hp.com/en/7133/distributing.htm
I would have expected your first LD_PRELOAD to work, though I would have used .../libcl.2.
Your second attempt, -lcl will not work unless you have the LD_PRELOAD too.
You said you had -Wl,-aarchive, where?
As Sandman suggests, you should using the default, especially when creating shlibs.
From your link line of a.exe, that's your problem! If you insist upon using archives, you must have the system libs as shared.
You can use -l:libm.a for performance.
Note you seem to be including all of the aC++ libs? Why don't they appear twice in the aCC -v output? (Ah, aCC -b.)
In particular, you should have -ldemangle
before the default libs. And there should be no user libs/objects after them.
cflex_64.o...-lsb_cflex_64
>I don't have ldd on any of my HP-UX systems
You should have /usr/ccs/bin/ldd on your system. If not, you need a newer linker patch. (And we really need that ldd or chatr output.)
Also for aCC, you should change +DA2.0W to +DD64.
A comment about Sandman's comment:
-L/opt/aCC/lib/pa20_64 -ldemangle -lcl"
...which is incorrect
This isn't incorrect since -L paths are additive and -lcl will be found under the default or previous -L paths.
- Tags:
- ldd