[GCC-XML] ANNOUNCEMENT: Internal parser upgraded to GCC 4.2

Brad King brad.king at kitware.com
Wed Oct 31 17:44:46 EDT 2007


Roman Yakovenko wrote:
> I try to build GCC-XML and fail.

Well, I did try it on all supported platforms and it works for me :)

> The first error was in GCC/gcc/options.c file
> 
> /* This file is auto-generated by opts.sh.  */
> 
> #include "config.h/"
> #include "system.h/"
> #include "coretypes.h/"
> 
> Obviously such files don't exist. The quick and dirty fix is trivial -
> remove '/' from the file names.
> 
> I guess opts.sh should be tweaked.

Strange.  There is no opts.sh.  I think that is an old comment even in
upstream GCC.  The file is created by "optc-gen.awk" and is executed
with the argument

  -v header_name="config.h system.h coretypes.h tm.h"

(among other arguments) by a build rule in GCC/gcc/CMakeLists.txt.  The
include file list is generated in the awk script by this code:

n_headers = split(header_name, headers, " ")
for (i = 1; i <= n_headers; i++)
	print "#include " quote headers[i] quote

Somehow the splitting is adding slashes to the file names.

On what platform are you building?  What version of CMake are you using?
 What CMake generator are you using?  Can you find the call to
optc-gen.awk in the native build system generated by CMake?  Does it
have the slashes on the header_name argument?

> P.S. From 197 tests pygccxml has only 14 failed. I am investigating
> the result now.

Great, thanks.

-Brad



More information about the gccxml mailing list