Genreflex and gcc4.2

While compiling GaudiKernel with gcc4.2, I’m getting errors from genreflex when making the dictionaries:

/mnt/ext2/dbay/NuWa-0.2.0/…/external/root/5.18.00/debian_x86_gcc42_dbg/root/bin/genreflex /mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel/dict/dictionary.h -o …/x86_64-gcc42-dbg/dict/GaudiKernel/dictionary_dict.cpp
–select=/mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel/dict/dictionary.xml --gccxmlpath=/mnt/ext2/dbay/NuWa-0.2.0/…/external/gccxml/0.7.0_20070615/debian_x86_gcc42/bin --rootmap=GaudiKernelDict.rootmap --rootmap-lib=libGaudiKernelDict -D_GNU_SOURCE -I"/mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel" -I"/mnt/ext2/dbay/NuWa-0.2.0/gaudi/InstallArea/include" -I"/mnt/ext2/dbay/NuWa-0.2.0/…/external/root/5.18.00/debian_x86_gcc42_dbg/root/include" -I"WIN32" -I"/mnt/ext2/dbay/NuWa-0.2.0/…/external/Boost/1.34.1/debian_x86_gcc42/include/boost-1_34_1" -I"/mnt/ext2/dbay/NuWa-0.2.0/…/external/Boost/1.34.1/debian_x86_gcc42" -I"/mnt/ext2/dbay/NuWa-0.2.0/DybSettings/DybSettings/src" -I"/mnt/ext2/dbay/NuWa-0.2.0/DybSettings/DybSetup/src"
In file included from /usr/include/c++/4.2/cstdlib:50,
from /mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel/dict/dictionary.h:2:
/usr/include/c++/4.2/x86_64-linux-gnu/bits/c++config.h:149: error: syntax error
before __attribute__' In file included from /usr/include/c++/4.2/cstdlib:51, from /mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel/dict/dictionary.h:2: /usr/include/c++/4.2/cstddef:53: error: syntax error beforeattribute
/usr/include/c++/4.2/cstddef:58: error: syntax error before }' token In file included from /mnt/ext2/dbay/NuWa-0.2.0/gaudi_v19r7/GaudiKernel/dict/dictionary.h:2: /usr/include/c++/4.2/cstdlib:104: error: syntax error beforeattribute
/usr/include/c++/4.2/cstdlib:148: error: syntax error before }' token /usr/include/c++/4.2/cstdlib:161: error: syntax error beforeattribute
/usr/include/c++/4.2/cstdlib:201: error: syntax error before }' token /usr/include/c++/4.2/cstdlib:203: error: syntax error beforeattribute
/usr/include/c++/4.2/cstdlib:208: error: syntax error before ::' token /usr/include/c++/4.2/cstdlib:209: error: syntax error before::’ token
/usr/include/c++/4.2/cstdlib:211: error: syntax error before ::' token /usr/include/c++/4.2/cstdlib:212: error: syntax error before::’ token
/usr/include/c++/4.2/cstdlib:213: error: syntax error before ::' token /usr/include/c++/4.2/cstdlib:215: error: syntax error before::’ token
/usr/include/c++/4.2/cstdlib:216: error: syntax error before ::' token /usr/include/c++/4.2/cstdlib:217: error: syntax error before::’ token
/usr/include/c++/4.2/cstdlib:218: error: syntax error before ::' token /usr/include/c++/4.2/cstdlib:219: error: syntax error before::’ token

This uses gccxml 0.7.0_20070615 compiled with gcc4.2 (also tried gcc4.1 and gcc 3.4 to no avail). I’ve tried using a newer version of gccxml (0.9.0), but while it gets past this point it fails later on.

Are there any known solutions or workarounds to this?

                              cheers,   Charles.

Hi Charles,
when you say

you meant “also tried GCCXML 0.7.0 compiled with GCC 4.1 and 3.4 to no avail”, right? Generating and building the dictionary with GCC 3.4 should work just fine.

GCC >= 4.2 is only supported since GCCXML 0.9. But genreflex has not been updated to support 0.9; there are some incompatibilities in the GCCXML output. I expected the adaption of genreflex to GCCXML 0.9 to happen in April; I still expect it to happen by June. We’ll see. For now you’ll have to use GCC <= 4.1.

Cheers, Axel.

Let me try to be clearerr:

I’ve built the full system with gcc4.1 (gccxml, root, Gaudi) and it works fine.

The problem is with gcc4.2. With everything else built with gcc4.2, I’ve tried building gccxml 0.7.0 with 3.4, 4.1, and 4.2, and in each case get the error message I listed above.

                            cheers,  Charles.

Hi Charles,

OK, then my comments were relevant: genreflex does not support GCC >= 4.1 because it currently only supports GCCXML <= 0.7. As I said this will change by June.

Cheers, Axel.