When trying to compile ROOT 5.34/00 after downloading it via svn I get the following error message:
clang -O2 -m64 -pipe -W -Wall -fsigned-char -fno-common -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/Applications/root5_34_00/cint/cint/inc -I/Applications/root5_34_00/cint/cint/src -I/Applications/root5_34_00/cint/cint/src/dict -pthread -I. -o cint/cint/src/g__cfunc.o -c /Applications/root5_34_00/cint/cint/src/g__cfunc.c
In file included from /Applications/root5_34_00/cint/cint/src/g__cfunc.c:38:
In file included from /Applications/root5_34_00/cint/cint/src/common.h:43:
In file included from include/G__ci.h:1621:
include/G__ci_fproto.h:19:19: error: token is not a valid binary operator in a
preprocessor subexpression if __has_warning("-Wreturn-type-c-linkage")
1 error generated.
make: *** [cint/cint/src/g__cfunc.o] Error 1
Any ideas on what the problem could be?
I am running 10.7.4 with clang --version:
Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
Thread model: posix
and have XQuartz 2.7.2.
I see the exact same error message on the same kind of system but with clang version 3.0.
A solution would be appreciated.
I got it.
You will need clang 3.1.
To get it, upgrade your Xcode to the latest version 4.3.2. Within it go to preferences->downloads and update your command line tools.
Clang version 3.1 accepts the latest grammar and also the -std=c++11 flag. With this update root version 5.34 as well as the trunk compile quite nicely.
Thanks for the post, darn I have been so busy that I haven’t been keeping up with the Xcode updates.