You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Joanne Bogart <jr...@SLAC.Stanford.EDU> on 2001/03/06 18:28:36 UTC
Re: Location of libxerces-c1_4.so (and gdb)
Miroslaw Dobrzanski-Neumann wrote:
>
> On Tue, Mar 06, 2001 at 02:41:20PM +0000, Bill Klein wrote:
>
> > I have a project that makes use of Xerces that's working fine on Solaris
> > (compiled with Forte C++ 6 update 1). The problem occurs when I try to
> > run my application on another box. I get the error:
> >
> > bash-2.03$ someapp
> > ld.so.1: someapp: fatal: /export/home/atn/dev/lib/link/libxerces-c1_4.so: open failed: No such file or directory
> >
[snip]
> >
> > Any ideas what I might be doing wrong?
> No, but:
>
> if you link with absolute path the library will be looked for there.
> instead use -L, -l flags when linking
>
> instead of
> CC ... -o someapp /export/home/atn/dev/lib/link/libxerces-c1_4.so
>
> try
> CC ... -o someapp -L/export/home/atn/dev/lib/link -lxerces-c1_4
>
However (apologies in advance if this is a little off-topic), on Linux
I've found that when
I link with -L, -l (as is done for sample programs like DOMCount)
gdb cannot find the xerces shared object. DOMCount will run like this:
$ DOMCount myfile.xml
but not like this:
$ gdb DOMCount
GNU gdb19991004
[and other stuff, snipped]
gdb> set args myfile.xml
gdb> run
error in loading shared libraries: libxerces-c1_3.so: cannot
open shared object file: No such file or directory
Program exited with code 0177.
If I modify the makefile to force an absolute link, gdb can find the
shared object.
This is on Redhat Linux 6.2, egcs-2.91.66 compiler,
gdb version gdb19991004
If anyone has information about this as a known gdb problem I'd
appreciate a pointer.
thanks,
Joanne
--
Joanne Bogart jrb@slac.stanford.edu
SLAC, MS 71 (650) 926-3685 phone
Stanford University (650) 926-2923 FAX
P.O. Box 4349
Stanford, CA 94309
Re: Location of libxerces-c1_4.so (and gdb)
Posted by Radovan CHYTRACEK <Ra...@cern.ch>.
Joanne Bogart wrote:
>
> Radovan CHYTRACEK wrote:
> >
> > Hi Joanne,
> > have you checked your LD_LIBRARY_PATH setting? It should contain
> > the path to the location where the Xerces-C shared libraries are
> > installed.
> >
> > Radovan
>
> Yes, I have and it does. And, as I said below, the loader has no trouble
> finding the shareable when I attempt to run the program from the command line.
> But if I then (without changing any environment variables, working directory,
> or anything else) try to run the program from within gdb, it fails.
OK, then try to install the Xerces-C librarie into one of the standard
shared library locations as /lib,
/usr/lib or /usr/local/lib or simply just make a symbolic links and rerun
"ldconfig" as root. This should update cached info for dynamic loader on
Linux where to look for shared libraries. To get a list of all shared
libraries recognized by dynamic loader type "ldconfig -p" command. If the
problem persists then it has to do something with the way you have build
your libraries and executables.
BTW, what says the command "ldd DOMCount" ?
Radovan
Re: Location of libxerces-c1_4.so (and gdb)
Posted by Joanne Bogart <jr...@slac.stanford.edu>.
Radovan CHYTRACEK wrote:
>
> Hi Joanne,
> have you checked your LD_LIBRARY_PATH setting? It should contain
> the path to the location where the Xerces-C shared libraries are
> installed.
>
> Radovan
Yes, I have and it does. And, as I said below, the loader has no trouble
finding the shareable when I attempt to run the program from the command line.
But if I then (without changing any environment variables, working directory,
or anything else) try to run the program from within gdb, it fails.
Joanne
>
> Joanne Bogart wrote:
> > However (apologies in advance if this is a little off-topic), on Linux
> > I've found that when
> > I link with -L, -l (as is done for sample programs like DOMCount)
> > gdb cannot find the xerces shared object. DOMCount will run like this:
> >
> > $ DOMCount myfile.xml
> >
> > but not like this:
> >
> > $ gdb DOMCount
> > GNU gdb19991004
> > [and other stuff, snipped]
> > gdb> set args myfile.xml
> > gdb> run
> > error in loading shared libraries: libxerces-c1_3.so: cannot
> > open shared object file: No such file or directory
> > Program exited with code 0177.
> >
> > If I modify the makefile to force an absolute link, gdb can find the
> > shared object.
> >
> > This is on Redhat Linux 6.2, egcs-2.91.66 compiler,
> > gdb version gdb19991004
> >
> > If anyone has information about this as a known gdb problem I'd
> > appreciate a pointer.
> > thanks,
> > Joanne
> >
> > --
> > Joanne Bogart jrb@slac.stanford.edu
> > SLAC, MS 71 (650) 926-3685 phone
> > Stanford University (650) 926-2923 FAX
> > P.O. Box 4349
> > Stanford, CA 94309
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ------------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Location of libxerces-c1_4.so (and gdb)
Posted by Radovan CHYTRACEK <Ra...@cern.ch>.
Hi Joanne,
have you checked your LD_LIBRARY_PATH setting? It should contain
the path to the location where the Xerces-C shared libraries are
installed.
Radovan
Joanne Bogart wrote:
> However (apologies in advance if this is a little off-topic), on Linux
> I've found that when
> I link with -L, -l (as is done for sample programs like DOMCount)
> gdb cannot find the xerces shared object. DOMCount will run like this:
>
> $ DOMCount myfile.xml
>
> but not like this:
>
> $ gdb DOMCount
> GNU gdb19991004
> [and other stuff, snipped]
> gdb> set args myfile.xml
> gdb> run
> error in loading shared libraries: libxerces-c1_3.so: cannot
> open shared object file: No such file or directory
> Program exited with code 0177.
>
> If I modify the makefile to force an absolute link, gdb can find the
> shared object.
>
> This is on Redhat Linux 6.2, egcs-2.91.66 compiler,
> gdb version gdb19991004
>
> If anyone has information about this as a known gdb problem I'd
> appreciate a pointer.
> thanks,
> Joanne
>
> --
> Joanne Bogart jrb@slac.stanford.edu
> SLAC, MS 71 (650) 926-3685 phone
> Stanford University (650) 926-2923 FAX
> P.O. Box 4349
> Stanford, CA 94309
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org