public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* FW: fatal: libstdc++.so.6: open failed
@ 2005-10-13 16:04 Kirk Hagberg
  2005-10-14 15:28 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Kirk Hagberg @ 2005-10-13 16:04 UTC (permalink / raw)
  To: gdb

I'm running:

GCC 3.4.3         (Solaris, compiled in 64-bit)
GDB 6.3            (Solaris, compiled in 64-bit)

I compile a simple C program:

#include <stdio.h>

int main(void)
{
        int a=77;
        printf("long size=%d, a=%d\n",sizeof(long),a);
        return 0;
}

In both 32-bit and 64-bit, with gcc and g++.  They execute fine on the command line.  Although when the g++ compiled files are run in GDB, I get the following message:

$ g++ -g -m32 longsize.c -olongsize32cpp
$ gdb longsize32cpp
GNU gdb 6.3
Copyright 2004 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 "sparc-sun-solaris2.8"...
(gdb) r
Starting program: /tmp/longsize32cpp 
ld.so.1: /tmp/longsize32cpp: fatal: libstdc++.so.6: open failed: No such file or directory

Program terminated with signal SIGKILL, Killed.
The program no longer exists.

libstdc++.so.6 is in the LD_LIBRARY_PATH.


Any assistance would be great!  Thanks!


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

* Re: FW: fatal: libstdc++.so.6: open failed
  2005-10-13 16:04 FW: fatal: libstdc++.so.6: open failed Kirk Hagberg
@ 2005-10-14 15:28 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-10-14 15:28 UTC (permalink / raw)
  To: Kirk Hagberg; +Cc: gdb

On Thu, Oct 13, 2005 at 11:04:16AM -0500, Kirk Hagberg wrote:
> $ g++ -g -m32 longsize.c -olongsize32cpp
> $ gdb longsize32cpp
> GNU gdb 6.3
> Copyright 2004 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 "sparc-sun-solaris2.8"...
> (gdb) r
> Starting program: /tmp/longsize32cpp 
> ld.so.1: /tmp/longsize32cpp: fatal: libstdc++.so.6: open failed: No such file or directory
> 
> Program terminated with signal SIGKILL, Killed.
> The program no longer exists.
> 
> libstdc++.so.6 is in the LD_LIBRARY_PATH.

GDB runs a shell in order to start your program.  The shell is probably
reloading its startup files; so your shell startup files are probably
clobbering LD_LIBRARY_PATH.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

end of thread, other threads:[~2005-10-14 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-13 16:04 FW: fatal: libstdc++.so.6: open failed Kirk Hagberg
2005-10-14 15:28 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).