- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Cannot dlopen load module
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
тАО05-09-2006 12:31 AM
тАО05-09-2006 12:31 AM
Cannot dlopen load module
I am facing this error when I am linking libclntsh.so with TRIGGER.so
Load error : file 'TRIGGER.so'
error code: 198, pc=125, call=1, seg=0
198 Load failure (Cannot dlopen load module '/usr/lib/hpux32/libpthread.so.1' because it contains thread
PS 32-bit objects & libraries have been used everywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 01:05 AM
тАО05-09-2006 01:05 AM
Re: Cannot dlopen load module
Have you linked the module with -lpthread ?
If not, try to do so.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 02:24 AM
тАО05-09-2006 02:24 AM
Re: Cannot dlopen load module
cob -z TRIGGER.COB
/9.2/lib32/ -lclntsh -lpthread -lcurses -lm
While going thru documentation, I found:
"Use caution when building shared libraries with external library dependencies. Any library that contains Thread Local Storage (TLS) and uses static TLS model should not be used as a dependency. If a dependent library contains TLS, was built with static TLS model and it is not loaded during program startup (that is, not linked against the executable), the dynamic loader fails to perform the operation. You can use +tls=dynamic compiler option to re-compile the library to avoid errors."
I am doubting -lclntsh (Oracle Client Library) is having some connection with TLS.
-Maruti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 12:44 PM
тАО05-09-2006 12:44 PM
Re: Cannot dlopen load module
>Load error : file 'TRIGGER.so'
>(Cannot dlopen load module '/usr/lib/hpux32/libpthread.so.1' because it contains thread
This was recently discussed:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1024963
>I am doubting -lclntsh (Oracle Client Library) is having some connection with TLS.
-Maruti
Your problem IS with libclntsh.so. It links with libpthread and it shouldn't do this.
You are dynamically loading your module. What is the name of the executable that is dynamically loading things? If that is compiled with libpthread, it will work. Or you can use LD_PRELOAD.
- Tags:
- LD_PRELOAD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 09:43 PM
тАО05-09-2006 09:43 PM
Re: Cannot dlopen load module
I have already gone through
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1024963
But the solution there isn't helping either.
>Your problem IS with libclntsh.so. It links with libpthread and it shouldn't do this.
Oracle Client Library libclntsh.so will definitely link to libpthread. I am pasting the "ldd" O/P here:
ldd /oracle/product/9.2/lib32/libclntsh.so.9.0
libwtc9.so => /oracle/product/9.2/lib32/libwtc9.so
librt.so.1 => /usr/lib/hpux32/librt.so.1
libnss_dns.so.1 => /usr/lib/hpux32/libnss_dns.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
libm.so.1 => /usr/lib/hpux32/libm.so.1
libpthread.so.1 => /usr/lib/hpux32/libpthread.so.1
libCsup.so.1 => /usr/lib/hpux32/libCsup.so.1
libunwind.so.1 => /usr/lib/hpux32/libunwind.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
ibuca.so.1 => /usr/lib/hpux32/libuca.so.1
>You are dynamically loading your module. What is the name of the executable that is dynamically loading things? If that is compiled with libpthread, it will work. Or you can use LD_PRELOAD.
I have tried LD_PRELOAD option:
export LD_PRELOAD=/usr/lib/hpux32/libpthread.so.1
But then I started getting this error:
aCC runtime: Use of "-mt" must be consistent during both compilation and linking.
rts32: Error 115 encountered in critical run-time section
Then, I tried to recompile the COBOL codes with "-t" directive to make them multi-threaded. But still getting the same error. I also tried the other solution of applying HP-UX latest patches PHSS_34043 & PHSS_34441 to over-ride this problem. But after applying these patches, the LD_PRELOAD option has stopped working.
I am calling this shared object TRIGGER.so from a cobol code as the first step towards the execution of cobol code. I am not suposed to change the cobol run-time executable through which the code will be run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-10-2006 01:12 PM
тАО05-10-2006 01:12 PM
Re: Cannot dlopen load module
export LD_PRELOAD=/usr/lib/hpux32/libpthread.so.1
But then I started getting this error:
aCC runtime: Use of "-mt" must be consistent during both compilation and linking.
This means you have some aC++ code, most likely in shared libs, that is not compiled with -mt.
>Then, I tried to recompile the COBOL codes with "-t" directive to make them multi-threaded.
The error message deals with aC++ sources, not COBOL.
>I also tried the other solution of applying HP-UX latest patches PHSS_34043 & PHSS_34441 to override this problem. But after applying these patches, the LD_PRELOAD option has stopped working.
This shouldn't change the issue. I don't see how LD_PRELOAD shouldn't work with them.
About the only other solution is to remove libpthread.so.1 from Oracle's libclntsh.so.
You do this by using "chatr +s enable libclntsh.so" and then creating an empty dummy libpthread.1 (compile an empty source to that shlib) and use SHLIB_PATH to point to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2006 11:09 PM
тАО05-15-2006 11:09 PM
Re: Cannot dlopen load module
Sorry for a delayed response to your solutions.
>This means you have some aC++ code, most likely in shared libs, that is not compiled with -mt.
This error was coming while using LD_PRELOAD option but before applying HP-UX latest patches PHSS_34043 & PHSS_34441. But as I have mentioned earlier, now LD_PRELOAD is not making any differences in execution.
>You do this by using "chatr +s enable libclntsh.so"
Can yu give me more information on this option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2006 03:49 PM
тАО05-16-2006 03:49 PM
Re: Cannot dlopen load module
>Can you give me more information on this option?
Make a copy of this shlib, or make it writable to you.
Then use "chatr +s enable libclntsh.so". (At least you need to do that for PA. First use chatr libclntsh.so, to see if either LD_LIBRARY_PATH or SHLIB_PATH is enabled.)
Once enabled, you can use those env vars to point to a different and dummy libpthread so you can get it out of the way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2006 12:20 AM
тАО05-17-2006 12:20 AM
Re: Cannot dlopen load module
I tried chatr +s enable libclntsh.so.9.0 and it shwed same current & new values.
Then I created a dummy file with name libpthread.so.1 in a directory and set LD_LIBRARY_PATH to it. After doing so, I recreated libclntsh.so.9.0 but still I am getting same error.
/oracle/product/9.2/lib32 >chatr +s enable libclntsh.so.9.0
libclntsh.so.9.0:
current values:
32-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /oracle/product/9.2/lib32
internal name:
libclntsh.so.9.0
shared library list:
libwtc9.so
librt.so.1
libnss_dns.so.1
libdl.so.1
libm.so.1
libpthread.so.1
libCsup.so.1
libunwind.so.1
shared vtable support disabled
explicit unloading enabled
segments:
index type address flags size
6 text 04000000 z---c- D (default)
7 data 40000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references enabled
address space model: default
caliper dynamic instrumentation disabled
new values:
32-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /oracle/product/9.2/lib32
internal name:
libclntsh.so.9.0
shared library list:
libwtc9.so
librt.so.1
libnss_dns.so.1
libdl.so.1
libm.so.1
libpthread.so.1
libCsup.so.1
libunwind.so.1
shared vtable support disabled
explicit unloading enabled
segments:
index type address flags size
6 text 04000000 z---c- D (default)
7 data 40000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references enabled
address space model: default
caliper dynamic instrumentation disabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2006 06:39 PM
тАО05-17-2006 06:39 PM
Re: Cannot dlopen load module
So you don't need to do that or make a copy.
>Then I created a dummy file with name libpthread.so.1 in a directory and set LD_LIBRARY_PATH to it.
A dummy shared lib must be created by the compiler and linker from an empty file.
$ touch empty.c
$ cc -b -o libpthread.so.1 empty.c
And remove any -lpthread or LD_PRELOAD with libpthread.