Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Problem with LD_LIBRARY_PATH and gdb 4.18
@ 1999-09-01 20:49 Matt Welsh
  1999-09-01 22:55 ` Kevin Buettner
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Welsh @ 1999-09-01 20:49 UTC (permalink / raw)
  To: gdb

I'm using gdb 4.18 (although 4.16 exhibits the same problem) on a Linux x86
machine with glibc 2.1.1 (Red Hat 6.0). gdb fails to run any binaries which
require shared libraries not on the usual search path for ld.so, i.e. any
libraries located by LD_LIBRARY_PATH.

Setting LD_LIBRARY_PATH or gdb 'set solib-search-path' has no effect. Here
is what I see:

> enclave1:~/src/ninja/test/mdw% echo $LD_LIBRARY_PATH
> /home/cs/mdw/lib:/usr/local/ninja/gcc-2.95.1/lib
> enclave1:~/src/ninja/test/mdw% gdb TestT
> GNU gdb 4.18
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (gdb) run   
> Starting program: /disks/now/grad/mdw/src/ninja/test/mdw/TestT 
> /disks/now/grad/mdw/src/ninja/test/mdw/TestT: error in loading shared libraries: libgcj.so.0: cannot open shared object file: No such file or directory
>
> Program exited with code 0177.

In this case, libgcj.so.0 is found in the LD_LIBRARY_PATH. I can run the
program just fine directly from the shell, but not from within gdb.

I can 'attach' to the running process from gdb, however, in some cases I 
wish to test the code as it's starting, so this is not good enough.

If I set LD_LIBRARY_PATH and run 'strace TestT' from within gdb, it's
obvious that ld.so is not looking for the library in any directories on the
LD_LIBRARY_PATH. Is it possible that gdb is not passing along the value of
this environment variable?

Thanks much,
Matt Welsh, mdw@cs.berkeley.edu


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

end of thread, other threads:[~1999-09-01 23:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <19990901230402.A19637@cygnus.com>
1999-09-01 23:30 ` Problem with LD_LIBRARY_PATH and gdb 4.18 Matt Welsh
1999-09-01 20:49 Matt Welsh
1999-09-01 22:55 ` Kevin Buettner

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