I’m using Ubuntu 14.04 with ROOT 5.34/30. Issue occurs for both g++4.8 and clang 3.4.
The makefile for a package I’m building adds the path to a library’s include files. On my system, these are in the standard location of /usr/include.
This adds -I/usr/include to the ‘rootcint’ invocation, after which I get this message:
#error "You need a ISO C conforming compiler to use the glibc headers"
Error: Missing one of '
\/' expected at or after line 97.
Error: Unexpected end of file (G__fgetstream():2) /usr/include/sys/cdefs.h:419:
Error: Symbol extern"C"{#define __need_size_t#define __need_NULL#include<stddef is not defined in current scope /usr/include/stdio.h:44:
Error: Failed to evaluate extern"C"{#define __need_size_t#define __need_NULL#include<stddef.h>#include<bits/types
Error: Failed to evaluate extern"C"{#define __need_size_t#define __need_NULL#include<stddef.h>#include<bits/types.h>#define __need_FILE#define __need___FILE#endif#if!defined __FILE_defined&&defined __need_FILE struct _IO_FILE
Error: Symbol __BEGIN_NAMESPACE_STD typedef struct _IO_FILE FILE is not defined in current scope /usr/include/stdio.h:48:
Error: Missing one of '{' expected at or after line 90.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/stdio.h:948:
Error: Missing one of '{' expected at or after line 518.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/string.h:647:
Error: Missing one of '{' expected at or after line 71.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/assert.h:123:
Error: Symbol div_t is not defined in current scope /usr/include/stdlib.h:101:
Error: Symbol lldiv_t is not defined in current scope /usr/include/stdlib.h:121:
Error: Missing one of '{' expected at or after line 466.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/stdlib.h:971:
Error: Missing whitespace at or after line 489.
Error: Unexpected end of file (G__fgetspace():2) /usr/include/math.h:492:
Report: Unrecognized string '__END_DECLS' ignored /usr/include/math.h:493:
Warning: Error occurred during reading source files
Warning: Error occurred during dictionary source generation
/usr/include is obviously the culprit, but it seems that this is something that it should be possible to avoid - given that we get files from there anyway, manually specifying it shouldn’t be fatal.
Do we need to manually add logic to the makefile builder to explicitly avoid this folder?