Re: Error loading shared library
From: jimw (no_spam_at_sofla.com)
Date: 05/24/04
- Next message: jimw: "Re: Error loading shared library"
- Previous message: Paul Sure: "Re: Error loading shared library"
- In reply to: Paul Sure: "Re: Error loading shared library"
- Next in thread: jimw: "Re: Error loading shared library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 May 2004 20:08:36 -0400
"Paul Sure" <phv_temp@yahoo.com> wrote in message
news:10b16r0s7c7km47@corp.supernews.com...
> Do a ldd on the library that gives the error and do a locate/find on the
> missing library. Next add the location to the SHLIB_PATH. BTW if your java
> is 64 bit you need to use LD_LIBRARY_PATH instead.
>
> Paul
>
> "jimw" <no_spam@sofla.com> wrote in message
> news:B28rc.16041$l%4.7954@bignews4.bellsouth.net...
> > I'm having a bit of difficulty loading the Java virtual machine
(although
> I
> > don't think this is a java problem).
> > I don't use HP-UX a whole lot, so bear with me please.
> >
> > I set my SHLIB_PATH as follows:
> > export
> >
>
SHLIB_PATH=/usr/java/jre/lib/PA_RISC/native_threads:/usr/java/jre/lib/PA_RIS
> > C:/usr/java/jre/lib/PA_RISC/classic:/opt/cs2/lib:.:::./
> >
> > Then I do a dlopen and dlsym of libjvm.sl, both of which work.
> > Then when I call to create the Java Virtual Machine (jvm) , I get an
error
> > message (in a callback routine) this error:
> > "Can't load library "/home/jww/src/libverify.sl", because specified
> library,
> > or one of its dependencies, does not exist."
> >
> > I think it's not because libverify.sl does have satisfied dependencies,
> but
> > because libverify.sl is NOT in /home/jww/src.
> > Why would it be looking there anyway?
> > It should have found it in one of the directories specified by
SHLIB_PATH
> > (/usr/java/jre/lib/PA_RISC).
> >
> > I am in /home/jww/src/mqpcjms directory when I start my program. How in
> the
> > world does it want to look in /home/jww/src for the library.
> >
> > Thanks,
> >
> > JimW
> >
> >
> >
>
I stumbled on something called LD_PRELOAD and I first tried setting this
LD_PRELOAD="/usr/java/jre/lib/PA_RISC/classic/libjvm.sl" and I immediately
got a bus error(coredump).
Soooo, then I set LD_PRELOAD="/usr/java/jre/lib/PA_RISC/libverify.sl" and
now it works. I assume that LD_PRELOAD tells the loader to pre-load this
library so that libjvm.sl doesn't have to look for it (actually, I think
libjvm.sl loads libjava.sl which in turn tries to load libverify.sl.
Hmmmmmmmmm.
- Next message: jimw: "Re: Error loading shared library"
- Previous message: Paul Sure: "Re: Error loading shared library"
- In reply to: Paul Sure: "Re: Error loading shared library"
- Next in thread: jimw: "Re: Error loading shared library"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|