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

Roman Yakovenko roman.yakovenko at gmail.com
Wed Oct 31 17:54:22 EDT 2007


On 10/31/07, Brad King <brad.king at kitware.com> wrote:
> 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?
uname -a
Linux umka 2.6.22-14-386 #1 Sun Oct 14 22:36:54 GMT 2007 i686 GNU/Linux

Ubuntu 7.10

>What version of CMake are you using?

2.4.7

>  What CMake generator are you using?

I didn't specified one, so I guess default to Linux - make files

> 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?
>

Yes, it is:

GCC/gcc/options.c: /home/roman/gccxml-0.9-cvs/GCC/gcc/opt-functions.awk
GCC/gcc/options.c: /home/roman/gccxml-0.9-cvs/GCC/gcc/optc-gen.awk
GCC/gcc/options.c: GCC/gcc/optionlist
	$(CMAKE_COMMAND) -E cmake_progress_report
/home/roman/gccxml-0.9-build/CMakeFiles $(CMAKE_PROGRESS_226)
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold
"Generating options.c"
	cd /home/roman/gccxml-0.9-build/GCC/gcc && /usr/bin/awk -f
/home/roman/gccxml-0.9-cvs/GCC/gcc/opt-functions.awk -f
/home/roman/gccxml-0.9-cvs/GCC/gcc/optc-gen.awk -v
header_name="config.h\ system.h\ coretypes.h\ tm.h" < optionlist >
options.c


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

You are welcome. I will continue tomorrow


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the gccxml mailing list