public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling only libstdc++-v3 (with debugging symbols)
@ 2011-10-19 12:50 Delcypher
  2011-10-19 13:23 ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: Delcypher @ 2011-10-19 12:50 UTC (permalink / raw)
  To: gcc-help

Hi I'm trying to compile libstdc++-v3 with debugging symbols and I'm a
little stuck. I'm trying to follow the documentation
`/libstdc++-v3/doc/html/manual/setup.html' and I'm not finding it very
clear what I'm supposed to do if I want to ONLY build libstdc++-v3 and
NOTHING else.

So far I have

1. Downloaded the entire source tree of the gcc project via svn

$ svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc-root

2. The documentation seems to strongly recommend that my code is NOT
compiled in the source directory so I did the following.

$ mkdir gcc-build
$ cd gcc-build

3. Now here's where I get confused the documentation says "When
configuring libstdc++, you'll have to configure the entire gccsrcdir
directory."

Isn't that going to build everything though? I don't want to do that.
Surely I want to run

$ ../gcc-root/libstdc++-v3/configure --enable-libstdcxx-debug
--prefix=$HOME/local

and NOT (as the documentation suggests)

$ ../gcc-root/configure --enable-languages=c++
--enable-libstdcxx-debug --prefix=$HOME/local

anyway I ran `../gcc-root/libstdc++-v3/configure
--enable-libstdcxx-debug --prefix=$HOME/local'. All the checks passed
a make file was generated in my current directory (gcc-build).

$ ls
config.h  config.log  config.status  doc  include  libsupc++  libtool
Makefile  po  python  scripts  src  stamp-h1  testsuite

4. I tried running make
$ make

and the build fails. The output is shown here http://pastebin.com/p4iD7h4i

The reason I'm trying to do this is so I can build programs on my
system and debug the standard library objects. For example when in gdb
if I try to do the following
gdb) call cout.good()
Couldn't find method std::ostream:;good

I presume this error message is because my version of libstdc++ has no
debugging symbols. I did try compiling with `-D_GLIBCXX_DEBUG' and for
someone reason that I can't explain that made some standard library
objects I declared in the stack accessible via gdb (e.g. if I had an
ifstream object called inputFile) despite the fact my version of
libstdc++ has no debugging symbols at all!

gdb) call inputFile.good()
$1 = true

Without that compiler flag I can't seem to call any of the methods on
standard library objects my code creates.

What am I doing wrong?

Thanks.

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

end of thread, other threads:[~2011-10-20  0:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-19 12:50 Compiling only libstdc++-v3 (with debugging symbols) Delcypher
2011-10-19 13:23 ` Ian Lance Taylor
     [not found]   ` <CANNJ_ziT2JqSoRGF9hv3E9QU+PB-AEACwz-8eZkQCqz28LSHcw@mail.gmail.com>
2011-10-19 15:04     ` Delcypher
2011-10-19 16:48       ` Jonathan Wakely
2011-10-19 16:50         ` Jonathan Wakely
2011-10-19 19:53           ` Delcypher
2011-10-19 20:12             ` Jeffrey Walton
2011-10-19 22:20               ` Jonathan Wakely
2011-10-19 22:25                 ` Delcypher
2011-10-19 23:49                   ` Jonathan Wakely
2011-10-20  0:02                   ` Ian Lance Taylor
2011-10-19 22:13             ` Jonathan Wakely

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).