This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: c++/1246: Cannot map library libstdc++.so.5
- From: whippet at smart dot net
- To: chastain at sourceware dot org
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 26 Jan 2005 03:38:00 -0000
- Subject: Re: c++/1246: Cannot map library libstdc++.so.5
- Reply-to: whippet at smart dot net
The following reply was made to PR c++/1246; it has been noted by GNATS.
From: whippet@smart.net
To: gdb-gnats@sources.redhat.com, chastain@sourceware.org,
hnguyen@genome.broad.mit.edu, gdb-prs@sources.redhat.com
Cc:
Subject: Re: c++/1246: Cannot map library libstdc++.so.5
Date: Tue, 25 Jan 2005 22:35:16 -0500
http://sources.redhat.com/cgi-bin/gnatsweb.pl
for what it is worth, I have experienced a similar problem as what was
described ... I believe the advice given was not quite complete. The
problem is, that when GDB runs your program, it executes a shell, with
concomitant execution of start up files. If my default shell is a
c-shell, this will execute my .cshrc ... if the .cshrc sets my
LD_LIBRARY_PATH, and this path is used to find the libstdc++.so.5 (often
the case on non-LINUX installations), then the value of the environment
variable that you see when you print the LD_LIBRARY_PATH inside GDB may not
be the value that GDB uses when it runs your program ... GDB checks this
inferior environments LD_LIBRARY_PATH which may not be the same as the
environment that GDB runs in itself.
The advice that the system libs were installed incorrectly is suspect. The
problem is, if your program relies on LD_LIBRARY_PATH or PATH to find
.so's, then the start up files for your default shell have to correctly set
these ... setting them manually and then using GDB will not work. This is
a side affect to GDB invoking a shell to run your program in.
eric