Rootcint problem on os X 10.4

I am trying to compile some code using rootcint under os X 10.4 but keep getting this error message. Has anyone seen this before?

I am running the fink version or root (v 4.04/02g root4 and root4-shlibs). I also tried with version 5.06/00 (compiled from source) and get the same error message. My compiler is (gcc version 4.0.0 (Apple Computer, Inc. build 5026)).

The same code compiles just fine under Debian sarge with the same version of ROOT and gcc 4.0 and gcc 3.4. It also works fine under FC 2 with gcc 3.2.

Your help would be much appreciated…
Thanks,
Pascal

rootcint -v -f out/root_dict.cpp -c -p -I../common/include -Iinclude -I. -D_OAWG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__extension__="" -D__attribute__\\\(X\\\)="" -D__const=const -D__restrict="" -D__signed=signed -D__volatile=volatile -D__BEGIN_DECLS= -D__END_DECLS= -D__THROW= include/VAArrayInfo.h include/VAConfigurationData.h include/VADataClasses.h include/VAParameterData.h include/VAPixelStatusData.h include/VAQStatsData.h include/VARelGainData.h include/VARootIO.h include/VARunHeader.h include/VATOffsetData.h include/VATime.h include/LinkDef.h Error: class,struct,union or type __builtin_va_list not defined FILE:/usr/include/ppc/_types.h LINE:90 Error: Symbol __darwin_size_tss_size is not defined in current scope FILE:/usr/include/sys/_types.h LINE:148 Error: Symbol __darwin_size_tuc_mcsize is not defined in current scope FILE:/usr/include/sys/_types.h LINE:172 Error: Symbol __darwin_size_tuc_mcsize is not defined in current scope FILE:/usr/include/sys/_types.h LINE:187 ...

what happens if you remove the -p option?

Thank you for the reply. I get a lot more errors, but the interesting bit is about the architecture not being supported.

Thanks

rootcint -v -f out/root_dict.cpp -c -I../common/include -Iinclude -I. -D_OAWG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__extension__="" -D__attribute__\\\(X\\\)="" -D__const=const -D__restrict="" -D__signed=signed -D__volatile=volatile -D__BEGIN_DECLS= -D__END_DECLS= -D__THROW= include/VAArrayInfo.h include/VAConfigurationData.h include/VADataClasses.h include/VAParameterData.h include/VAPixelStatusData.h include/VAQStatsData.h include/VARelGainData.h include/VARootIO.h include/VARunHeader.h include/VATOffsetData.h include/VATime.h include/LinkDef.h #error architecture not supported Error: class,struct,union or type __int64_t not defined FILE:/usr/include/sys/_types.h LINE:96 Error: class,struct,union or type __int32_t not defined FILE:/usr/include/sys/_types.h LINE:97 Error: class,struct,union or type __int32_t not defined FILE:/usr/include/sys/_types.h LINE:98 ...

Hi probably someone from the root team will give you more info I was not sure if -p is legal rootcint -h gives just -I and -D that’s why I asked

[quote]but the interesting bit is about the architecture not being supported. [/quote]This is normal since the CINT preprocessor does not (completely) set all the same macro as the compiler and /usr/include/sys/_types.h is apparently expecting some macro to be set to tell him the architecture.
So indeed your best bet is to use the option -p (which tells rootcint to use the compiler’s own pre-processor instead of CINT’s preprocessor).
For __builtin_va_list add-D__builtin_va_list=va_list
For [quote]Error: Symbol __darwin_size_tss_size is not defined in current scope FILE:/usr/include/sys/_types.h LINE:148[/quote]
you would need to look in the file _types.h to see what is happening at the line 148. Theoritically __darwin_size_t should have been defined a few line earlier … this is odd.

Cheers,
Philippe.

Hi Philippe,

Thanks for your reply. My original code was pretty complex, so tracing where the problem was coming from was not trivial. Instead, a friend of mine gave me a REALLY simple piece of code (attached as a tar file) that reproduces the problem with rootcint. The problem can be easily reproduced by including a system file (in this case, sys/time.h). If you try compiling the code you will get the same error I reported earlier. rootcint complains about something __builtin_va_list not being defined in the file
/usr/include/ppc/_types.h LINE:90. Looking at this file, I see:

#if (__GNUC__ > 2)
typedef __builtin_va_list       __darwin_va_list;       /* va_list */
#else
typedef char *                  __darwin_va_list;       /* va_list */
#endif

I can get rootcint to compile the code using the following kludge (see my header file): I just add:

#ifdef __CINT__
#undef __GNUC__
#endif

before I include the system file. I would be really nice if a ROOT expert who works on the OS X port could look into this. I am sure other people will run into the same problem eventually.

Thnaks,
Pascal
files.tar (10 KB)

Hello ROOT gurus,

It looks like there is a similar problem when compiling under os X 10.5. This time around the error message is:

Error: Too many '}' /usr/include/sys/_select.h:57: Error: Missing closing brace for the block opened around line 201. Error: Unexpected end of file (G__exec_statement()) /var/tmp/tmp.1.MI8HmW_cint.cxx:2:

As far as I can tell, there is nothing wrong with this header file. This file is included by sys/time.h. I need to work with time stamps so I need to include this system header file. Using the #undef GNUC trick that worked with Tiger doesn’t work here… If I force the code to exclude the header file causing the problem (by adding a #define SYS__SELECT_H statement before the #include statement) I can get rootcint to compile this simple code, but this doesn’t seem to be the best way to fix the problem… Maybe someone familiar with ROOT and Leopard can figure out what is causing the problem… Someone will eventually run into the same problem.

I used version 5.18 and the 5.19 trunk from 2 days ago and saw the same problem.

Thanks for your help!

[quote]by adding a #define SYS__SELECT_H statement before the #include statement) I can get rootcint to compile this simple code, but this doesn’t seem to be the best way to fix the problem.[/quote]This problably the best solution.
Another possible solution is to try the -p option:rootcint -f mydict.cxx -c -p myheader.h myheaderLinkDef.h

Cheers,
Philippe