Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Shared library problems
@ 2002-09-19  5:35 Robert Schweikert
  2002-09-19 10:46 ` Kevin Buettner
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Schweikert @ 2002-09-19  5:35 UTC (permalink / raw)
  To: gdb; +Cc: rjschwei

I am trying to debug code that has lost of shared libraries and I cannot
make gdb and/or the code find the libraries.

When I run the code and then attach gdb I get stuff like this

(gdb) attach 22736
Attaching to process 22736
0x4644747e in ?? ()

When I try to run the code from within gdb I get stull like this

Starting program: fullPath/myExecutable
fullPath/myExecutable: error while loading shared libraries:
libPyX11.so: cannot open shared object file: No such file or directory

But this is a lie.

(gdb) show env LD_LIBRARY_PATH
LD_LIBRARY_PATH =
/var/wdir/obj_storage/rjschwei/source/6-0/object/linux32/exec/lbr:/var/wdir/obj_storage/rjschwei/source/6-0/object/linux32/Python/Obj/lbr:

/var/wdir/obj_storage/rjschwei/source/6-0/object/linux32/External:/usr/6-0/object/linux32/exec/lbr:/usr/6-0/object/linux32/Python/Obj/lbr:

/usr/6-0/object/linux32/External:/usr/5-adb/object/linux32/exec/lbr:/usr/5-adb/object/linux32/External

And then

ls
/var/wdir/obj_storage/rjschwei/source/6-0/object/linux32/Python/Obj/lbr/libPyX11.so

/var/wdir/obj_storage/rjschwei/source/6-0/object/linux32/Python/Obj/lbr/libPyX11.so

So the library is in a directory that's on the LD_LIBRARY_PATH, the same
path is on PYTHONPATH and the environment is set the same when I attach
to the process.

Any help in getting this to work is greatly appreciated.

Robert



--
Robert Schweikert                   MAY THE SOURCE BE WITH YOU
(Robert.Schweikert@hks.com)                   LINUX




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-19  5:35 Shared library problems Robert Schweikert
@ 2002-09-19 10:46 ` Kevin Buettner
  0 siblings, 0 replies; 8+ messages in thread
From: Kevin Buettner @ 2002-09-19 10:46 UTC (permalink / raw)
  To: Robert Schweikert, gdb; +Cc: rjschwei

On Sep 19,  8:35am, Robert Schweikert wrote:

> I am trying to debug code that has lost of shared libraries and I cannot
> make gdb and/or the code find the libraries.

Which version of gdb are you using?  Which host and target?

Kevin


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-24  8:27       ` Robert Schweikert
@ 2002-09-24  8:30         ` Daniel Jacobowitz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-09-24  8:30 UTC (permalink / raw)
  To: Robert Schweikert; +Cc: kevinb, gdb

On Tue, Sep 24, 2002 at 11:27:59AM -0400, Robert Schweikert wrote:
> Daniel Jacobowitz wrote:
> 
> > On Tue, Sep 24, 2002 at 11:21:13AM -0400, Robert Schweikert wrote:
> > > Daniel Jacobowitz wrote:
> > >
> > > > On Mon, Sep 23, 2002 at 09:01:59PM -0400, Robert Schweikert wrote:
> > > > > Kevin,
> > > > >
> > > > > > Which version of gdb are you using?  Which host and target?
> > > > >
> > > > > Acording to the package id I am using 5.0-148. gdb produces the following
> > > > > output.
> > > > >
> > > > > -> gdb -v
> > > > > GNU gdb 20010316
> > > > >
> > > > > This is on Linux running on Intel IA32.
> > > >
> > > > Try a more recent version:
> > > >   http://sources.redhat.com/gdb
> > > >
> > > > That one's pretty old.  And we have no idea what your distributor did
> > > > with the 148 revisions of it...
> > >
> > > Daniel,
> > >
> > > I downloaded the latest source and built the 5.2.1 version but I end up with
> > > the same symptom.
> > >
> > > i.e. start gdb within the proper environment and try to run the app from there
> > > I end up with the problem that the app cannot find the shared libraries.
> > > Displaying LD_LIBRARY_PATH in gdb (show env LD_LIBRARY_PATH) shows that the
> > > path to the library that cannot be found is on the LD_LIBRARY_PATH.
> >
> > I assume I know what's going on, then.  Do your shell startup files
> > include a different setting of LD_LIBRARY_PATH?
> 
> Yes, they certainly do.
> 
> >
> >
> > Right now GDB spawns a copy of your shell to start the debugged
> > application.  We've been getting a lot of bad noises about this
> > behavior lately, so it may be reaching the end of its life span...
> 
> Is there a work around?

I can't really think of one.  Maybe include the necessary
LD_LIBRARY_PATH in your shell startup files - or better yet, don't
change LD_LIBRARY_PATH in said files if it is already set.  These may
or may not be feasible in your environment.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-24  8:25     ` Daniel Jacobowitz
@ 2002-09-24  8:27       ` Robert Schweikert
  2002-09-24  8:30         ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Schweikert @ 2002-09-24  8:27 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: kevinb, gdb

Daniel Jacobowitz wrote:

> On Tue, Sep 24, 2002 at 11:21:13AM -0400, Robert Schweikert wrote:
> > Daniel Jacobowitz wrote:
> >
> > > On Mon, Sep 23, 2002 at 09:01:59PM -0400, Robert Schweikert wrote:
> > > > Kevin,
> > > >
> > > > > Which version of gdb are you using?  Which host and target?
> > > >
> > > > Acording to the package id I am using 5.0-148. gdb produces the following
> > > > output.
> > > >
> > > > -> gdb -v
> > > > GNU gdb 20010316
> > > >
> > > > This is on Linux running on Intel IA32.
> > >
> > > Try a more recent version:
> > >   http://sources.redhat.com/gdb
> > >
> > > That one's pretty old.  And we have no idea what your distributor did
> > > with the 148 revisions of it...
> >
> > Daniel,
> >
> > I downloaded the latest source and built the 5.2.1 version but I end up with
> > the same symptom.
> >
> > i.e. start gdb within the proper environment and try to run the app from there
> > I end up with the problem that the app cannot find the shared libraries.
> > Displaying LD_LIBRARY_PATH in gdb (show env LD_LIBRARY_PATH) shows that the
> > path to the library that cannot be found is on the LD_LIBRARY_PATH.
>
> I assume I know what's going on, then.  Do your shell startup files
> include a different setting of LD_LIBRARY_PATH?

Yes, they certainly do.

>
>
> Right now GDB spawns a copy of your shell to start the debugged
> application.  We've been getting a lot of bad noises about this
> behavior lately, so it may be reaching the end of its life span...

Is there a work around?

Thanks,
Robert

>
>
> >
> > However, when I start the app and then attach I can actually see the function
> > names and where in the code I am. This is certainly an improvement over the
> > earlier version.
> >
> > Robert
> >
>

--
Robert Schweikert                   MAY THE SOURCE BE WITH YOU
(Robert.Schweikert@hks.com)                   LINUX




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-24  8:21   ` Robert Schweikert
@ 2002-09-24  8:25     ` Daniel Jacobowitz
  2002-09-24  8:27       ` Robert Schweikert
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-09-24  8:25 UTC (permalink / raw)
  To: Robert Schweikert; +Cc: kevinb, gdb

On Tue, Sep 24, 2002 at 11:21:13AM -0400, Robert Schweikert wrote:
> Daniel Jacobowitz wrote:
> 
> > On Mon, Sep 23, 2002 at 09:01:59PM -0400, Robert Schweikert wrote:
> > > Kevin,
> > >
> > > > Which version of gdb are you using?  Which host and target?
> > >
> > > Acording to the package id I am using 5.0-148. gdb produces the following
> > > output.
> > >
> > > -> gdb -v
> > > GNU gdb 20010316
> > >
> > > This is on Linux running on Intel IA32.
> >
> > Try a more recent version:
> >   http://sources.redhat.com/gdb
> >
> > That one's pretty old.  And we have no idea what your distributor did
> > with the 148 revisions of it...
> 
> Daniel,
> 
> I downloaded the latest source and built the 5.2.1 version but I end up with
> the same symptom.
> 
> i.e. start gdb within the proper environment and try to run the app from there
> I end up with the problem that the app cannot find the shared libraries.
> Displaying LD_LIBRARY_PATH in gdb (show env LD_LIBRARY_PATH) shows that the
> path to the library that cannot be found is on the LD_LIBRARY_PATH.

I assume I know what's going on, then.  Do your shell startup files
include a different setting of LD_LIBRARY_PATH?

Right now GDB spawns a copy of your shell to start the debugged
application.  We've been getting a lot of bad noises about this
behavior lately, so it may be reaching the end of its life span...

> 
> However, when I start the app and then attach I can actually see the function
> names and where in the code I am. This is certainly an improvement over the
> earlier version.
> 
> Robert
> 
> --
> Robert Schweikert                   MAY THE SOURCE BE WITH YOU
> (Robert.Schweikert@hks.com)                   LINUX
> 
> 
> 
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-23 18:29 ` Daniel Jacobowitz
@ 2002-09-24  8:21   ` Robert Schweikert
  2002-09-24  8:25     ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Schweikert @ 2002-09-24  8:21 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: kevinb, gdb

Daniel Jacobowitz wrote:

> On Mon, Sep 23, 2002 at 09:01:59PM -0400, Robert Schweikert wrote:
> > Kevin,
> >
> > > Which version of gdb are you using?  Which host and target?
> >
> > Acording to the package id I am using 5.0-148. gdb produces the following
> > output.
> >
> > -> gdb -v
> > GNU gdb 20010316
> >
> > This is on Linux running on Intel IA32.
>
> Try a more recent version:
>   http://sources.redhat.com/gdb
>
> That one's pretty old.  And we have no idea what your distributor did
> with the 148 revisions of it...

Daniel,

I downloaded the latest source and built the 5.2.1 version but I end up with
the same symptom.

i.e. start gdb within the proper environment and try to run the app from there
I end up with the problem that the app cannot find the shared libraries.
Displaying LD_LIBRARY_PATH in gdb (show env LD_LIBRARY_PATH) shows that the
path to the library that cannot be found is on the LD_LIBRARY_PATH.

However, when I start the app and then attach I can actually see the function
names and where in the code I am. This is certainly an improvement over the
earlier version.

Robert

--
Robert Schweikert                   MAY THE SOURCE BE WITH YOU
(Robert.Schweikert@hks.com)                   LINUX




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Shared library problems
  2002-09-23 18:02 Robert Schweikert
@ 2002-09-23 18:29 ` Daniel Jacobowitz
  2002-09-24  8:21   ` Robert Schweikert
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-09-23 18:29 UTC (permalink / raw)
  To: Robert Schweikert; +Cc: kevinb, gdb

On Mon, Sep 23, 2002 at 09:01:59PM -0400, Robert Schweikert wrote:
> Kevin,
> 
> > Which version of gdb are you using?  Which host and target?
> 
> Acording to the package id I am using 5.0-148. gdb produces the following
> output.
> 
> -> gdb -v
> GNU gdb 20010316
> 
> This is on Linux running on Intel IA32.

Try a more recent version:
  http://sources.redhat.com/gdb

That one's pretty old.  And we have no idea what your distributor did
with the 148 revisions of it...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Shared library problems
@ 2002-09-23 18:02 Robert Schweikert
  2002-09-23 18:29 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Schweikert @ 2002-09-23 18:02 UTC (permalink / raw)
  To: kevinb; +Cc: gdb

Kevin,

> Which version of gdb are you using?  Which host and target?

Acording to the package id I am using 5.0-148. gdb produces the following
output.

-> gdb -v
GNU gdb 20010316

This is on Linux running on Intel IA32.

Thanks,
Robert

Robert Schweikert                   MAY THE SOURCE BE WITH YOU
(Robert.Schweikert@hks.com)                   LINUX


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-24 15:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-19  5:35 Shared library problems Robert Schweikert
2002-09-19 10:46 ` Kevin Buettner
2002-09-23 18:02 Robert Schweikert
2002-09-23 18:29 ` Daniel Jacobowitz
2002-09-24  8:21   ` Robert Schweikert
2002-09-24  8:25     ` Daniel Jacobowitz
2002-09-24  8:27       ` Robert Schweikert
2002-09-24  8:30         ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox