[GCC-XML]building gccxml

Brad King brad.king at kitware.com
Mon Feb 11 21:00:01 EST 2002


Juan,

> I've just downloaded the patched gccxml.tar.gz from kitware's ftp site.
> After doing ./configure; make bootstrap, the build failed with this message:
[snip]
> What could be wrong here?
I've never seen that particular error.  I'm not sure GCC officially
supports an in-source build, though.  You can try an out-of-source build
like this:

cd /path/to/gccxml/source
cd ..
mkdir gccxml-build
cd gccxml-build
../gccxml/configure
make bootstrap

This assumes you want to build the whole compiler just to get GCC-XML.  
You also don't need to bootstrap the compiler to get the extension.  
Bootstrapping is a way to be sure a valid compiler is generated.  If you
won't use it to build anything, then you don't need to bootstrap.  
Personally, I use a standalone GCC-XML executable, and a separate
installation of GCC without the patch.

The standard GCC-XML install instructions to build it without the whole
compiler are here:

  http://public.kitware.com/GCC_XML/HTML/Install.html

If you want to be truly minimalistic, here are special instructions to
build exaclty the executable you need:

  http://public.kitware.com/GCC_XML/HTML/direct_build.html

Once you get it built, be sure to read the instructions to run GCC-XML on
the web page.  This tool does not have a normal "gccxml input.cxx" syntax
to run it.  Since gccxml tries to make the C++ source code think it is
another compiler (even a windows compiler), full preprocessor definitions
must be specified on the command line.  This can often be simplified with
a shell script wrapping the real executable with the proper options.

By the way, if you are planning to write a parser for the output, you may
wish to get the version from CVS.  I'm implementing a totally new output
format that is much more efficient both in size and in complexity of the
parser required.  The format generated from the CVS version of gccxml is
not backward compatible, and may be rapidly changing without notice over
the next few weeks.  If you look at it, I'd be interested in feedback.

-Brad




More information about the gccxml mailing list