Can't shl_load() a library ...

  • Follow


Hi,

I get the following error when I tried to load a C++ shared library
dynamically using HP11.11 - aCC compiler 3.27. I havelinked -lpthread
while compiling the shared library.

>>>>>>>>>>>>>>>>>>

/usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libpthread.1
/usr/lib/dld.sl: Exec format error

To overcome this, I used LD_PRELOAD=/usr/lib/libpthread.1 and it
worked.
But other applications(clear case)in my server crashes after setting
this env variable.

Anyone faced this problem? Anyother workarounds ?

thanks in advance,
venkat
0
Reply venky_rk14 7/28/2003 10:35:49 AM

venky_rk14@ureach.com (venky_rk) writes:

> /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local

Search groups.google.com ...

Here is one relevant thread:
http://groups.google.com/groups?threadm=un0gpqlwk.fsfYB8X%40earthlink.net

Cheers,
-- 
In order to understand recursion you must first understand recursion.
0
Reply Paul 7/28/2003 3:05:23 PM


> To overcome this, I used LD_PRELOAD=/usr/lib/libpthread.1 and it
> worked.
> But other applications(clear case)in my server crashes after setting
> this env variable.

set LD_PRELOAD=/usr/lib/libpthread.1 only for the particular
application that needs it (e.g. by prefixing
"LD_PRELOAD=/usr/lib/libpthread.1" to the command line). do not set it
in some place like .profile or .bashrc or for an interactive shell
from where it can apply to all applications launched subsequently.

however, this LD_PRELOAD setting will apply to any other programs your
application may exec and that may cause problems. this is a known
problem and a fix will be made soon.
0
Reply jignaasu 7/29/2003 4:39:01 AM

Hi,

Thanks. I have an executble which inturn loads the threaded shared library.
I tried to load the libpthread using 

dlopen("/usr/lib/libpthread.1",....)

Still I'm getting a dlopen error. I also tried with putenv() in my 
executable before loading the shared library. 
That also didn't help.

Any suggestions?  I'm using HP11.0 and HP11.11.  
Any patches available for this particular problem.
Pl. share the pointers.

thanks,
venkat 




jignaasu@yahoo.com (jignaasu) wrote in message news:<1238ce7b.0307282039.4c1d43f9@posting.google.com>...
> > To overcome this, I used LD_PRELOAD=/usr/lib/libpthread.1 and it
> > worked.
> > But other applications(clear case)in my server crashes after setting
> > this env variable.
> 
> set LD_PRELOAD=/usr/lib/libpthread.1 only for the particular
> application that needs it (e.g. by prefixing
> "LD_PRELOAD=/usr/lib/libpthread.1" to the command line). do not set it
> in some place like .profile or .bashrc or for an interactive shell
> from where it can apply to all applications launched subsequently.
> 
> however, this LD_PRELOAD setting will apply to any other programs your
> application may exec and that may cause problems. this is a known
> problem and a fix will be made soon.
0
Reply venky_rk14 7/29/2003 4:29:43 PM

Hi All,

Are there any specific patches for this which you know ?

Thanks
Praveen And Venkat

jignaasu@yahoo.com (jignaasu) wrote in message news:<1238ce7b.0307292212.115e81d@posting.google.com>...
> > Thanks. I have an executble which inturn loads the threaded shared library.
> > I tried to load the libpthread using 
> > 
> > dlopen("/usr/lib/libpthread.1",....)
> > 
> > Still I'm getting a dlopen error. I also tried with putenv() in my 
> > executable before loading the shared library. 
> 
> i think you should not link your shared library with libpthread.1. you
> can either link the executable with libpthread or use LD_PRELOAD while
> invoking the executable. setting LD_PRELOAD from within the executable
> will not work.
0
Reply pravlm 7/30/2003 1:30:58 PM

Hi Guys ,

Thanks for the replies that was realy nice of you guys.
I solved the problem , 
we have to install a patch "PHCO_27632" and have to  export
"LD_PRELOAD=/usr/lib/pa20_64/libpthread.1"

It works it does not break any othre third party software.

Thanks
Praveen and Venkat


jignaasu@yahoo.com (jignaasu) wrote in message news:<1238ce7b.0307292212.115e81d@posting.google.com>...
> > Thanks. I have an executble which inturn loads the threaded shared library.
> > I tried to load the libpthread using 
> > 
> > dlopen("/usr/lib/libpthread.1",....)
> > 
> > Still I'm getting a dlopen error. I also tried with putenv() in my 
> > executable before loading the shared library. 
> 
> i think you should not link your shared library with libpthread.1. you
> can either link the executable with libpthread or use LD_PRELOAD while
> invoking the executable. setting LD_PRELOAD from within the executable
> will not work.
0
Reply pravlm 7/30/2003 2:57:08 PM

5 Replies
593 Views

(page loaded in 0.151 seconds)

Similiar Articles:













7/30/2012 2:43:25 PM


Reply: