* GDB Can't Find My Shared Libraries
@ 2007-03-21 15:46 Don Mies
2007-03-21 15:59 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Don Mies @ 2007-03-21 15:46 UTC (permalink / raw)
To: gdb
I'm having a lot of trouble with gdb not finding my shared libraries.
When I
invoke gdb with the executable it appears to load it but when I try to
run the
program I get a message similar to the following:
/devl/obj/main/LX86/xxx: error while loading shared
libraries: libgorph.so: cannot open shared object file: No such file
or directory
However, all of the libraries needed are in my LD_LIBRARY_PATH and I can
execute an "ldd" command on the same executable that I started gdb with
and it
reports all of the libraries found and in their proper places.
I've done this on several different installation of Redhat Linux with
the same
results on each platform. For example, here is the configuration of one
of the
systems:
% gdb --version
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
% uname -a
Linux anand 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
i686 i386 GNU/Linux
% cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
I don't have a .gdbrc file but I do have a .dbxrc file (from when I debug on
Sun systems).
Can anyone tell me what is wrong here or how to give gdb the proper shared
library paths?
Thanks,
Don
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB Can't Find My Shared Libraries
2007-03-21 15:46 GDB Can't Find My Shared Libraries Don Mies
@ 2007-03-21 15:59 ` Daniel Jacobowitz
2007-03-21 16:20 ` Don Mies
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-03-21 15:59 UTC (permalink / raw)
To: Don Mies; +Cc: gdb
On Wed, Mar 21, 2007 at 08:46:40AM -0700, Don Mies wrote:
> I'm having a lot of trouble with gdb not finding my shared libraries. When I
> invoke gdb with the executable it appears to load it but when I try to run the
> program I get a message similar to the following:
> /devl/obj/main/LX86/xxx: error while loading shared
> libraries: libgorph.so: cannot open shared object file: No such file or
> directory
> However, all of the libraries needed are in my LD_LIBRARY_PATH and I can
> execute an "ldd" command on the same executable that I started gdb with and it
> reports all of the libraries found and in their proper places.
99% of the time, this symptom means that your shell startup files are
clobbering LD_LIBRARY_PATH. GDB runs the program by invoking a
subshell to handle command line processing. I recommend checking that.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB Can't Find My Shared Libraries
2007-03-21 15:59 ` Daniel Jacobowitz
@ 2007-03-21 16:20 ` Don Mies
0 siblings, 0 replies; 3+ messages in thread
From: Don Mies @ 2007-03-21 16:20 UTC (permalink / raw)
To: gdb; +Cc: Daniel Jacobowitz
Daniel,
That was it. Thank you very much!
Daniel Jacobowitz wrote:
> On Wed, Mar 21, 2007 at 08:46:40AM -0700, Don Mies wrote:
>
>
>> I'm having a lot of trouble with gdb not finding my shared libraries...
> 99% of the time, this symptom means that your shell startup files are
> clobbering LD_LIBRARY_PATH. GDB runs the program by invoking a
> subshell to handle command line processing. I recommend checking that.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-21 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 15:46 GDB Can't Find My Shared Libraries Don Mies
2007-03-21 15:59 ` Daniel Jacobowitz
2007-03-21 16:20 ` Don Mies
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox