Dear ROOTers,
On my MacBook Pro with OS X 10.7.5 and XCode 4.2.1 I tried to compile root_v5.34.05.source.tar.gz either with gcc or with clang:
First I tried to configure with:
./configure macosx64 --with-f77="/usr/bin/gfortran-4.2"
and realized that the default configure setting seems now to be clang and not gcc:
Configuring for macosx64
Checking for Fink/MacPorts directory ...
Checking for GNU Make version >= 3.80 ... ok
Checking for C compiler ... clang
Checking for C++ compiler ... clang++
Checking for linker (LD) ... clang++
Checking for F77 compiler ... /usr/bin/gfortran-4.2
Why is this the case?
Thus, in order to compile with gcc I tried to configure with:
./configure macosx64 --with-cxx="/usr/bin/g++-4.2" --with-f77="/usr/bin/gfortran-4.2"
This seems not to be sufficient since I still get:
Configuring for macosx64
Checking for Fink/MacPorts directory ...
Checking for GNU Make version >= 3.80 ... ok
Checking for C compiler ... clang
Checking for C++ compiler ... /usr/bin/g++-4.2
Checking for linker (LD) ... clang++
Checking for F77 compiler ... /usr/bin/gfortran-4.2
How do I have to set configure to avoid clang?
In any case when trying to compile root I get in both cases the same error:
clang++ -O2 -m64 -mmacosx-version-min=10.7 -o bin/rmkdepend build/rmkdepend/cppsetup.o build/rmkdepend/ifparser.o build/rmkdepend/include.o build/rmkdepend/main.o build/rmkdepend/parse.o build/rmkdepend/pr.o build/rmkdepend/mainroot.o
Running /Volumes/MitziData/ROOT/root/build/unix/compiledata.sh
Making include/compiledata.h
Running /Volumes/MitziData/ROOT/root/cint/ROOT/configcint.mk
Making cint/cint/inc/configcint.h
bin/rmkdepend -R -fcint/cint/src/g__cfunc.d -Y -w 1000 -- -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/Volumes/MitziData/ROOT/root/cint/cint/inc -I/Volumes/MitziData/ROOT/root/cint/cint/src -I/Volumes/MitziData/ROOT/root/cint/cint/src/dict -pthread -I. -- /Volumes/MitziData/ROOT/root/cint/cint/src/g__cfunc.c
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/Volumes/MitziData/ROOT/root/cint/cint/inc -I/Volumes/MitziData/ROOT/root/cint/cint/src -I/Volumes/MitziData/ROOT/root/cint/cint/src/dict -pthread -I. -o cint/cint/src/g__cfunc.o -c /Volumes/MitziData/ROOT/root/cint/cint/src/g__cfunc.c
In file included from /Volumes/MitziData/ROOT/root/cint/cint/src/g__cfunc.c:38:
In file included from /Volumes/MitziData/ROOT/root/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
What does this error mean?
What do I need to do to compile root_v5.34.05 successfully on my Mac for:
a, gcc
b, clang
Best regards,
Christian