Use clang to compile Root

Hi

I have seen that clang is mentioned in the configure file, so i tried to compile Root using clang. This ends in some error when compiling cint.

clang++ -O2 -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -o core/metautils/src/RConversionRuleParser.o -c core/metautils/src/RConversionRuleParser.cxx
In file included from cint/cint/src/dict/libstrm.cxx:14:
In file included from cint/cint/src/dict/libstrm.h:39:
cint/cint/lib/stream/stdiostr.h:27:10: fatal error: ‘stdiostream.h’ file not found
#include <stdiostream.h>

Is it already possible to compile Root using clang or is it not recommended in the moment?

Ciao

Florian

Hi

I found the problem. Since i am using a trunk version of llvm and clang the version info generated by

clang -v
clang version 2.0 (trunk 102694)
Target: x86_64-unknown-linux-gnu
Thread model: posix

obviously is different then expected. This results in senseless info stored in CLANG_MAJOR and CLANG_MINOR. Beside that there is only support for CLANG_MAJOR == 1 in cint/cint/Module.mk

Ciao

Florian

Hi Florian,

I’ve fixed this now, and added support for Clang v2. Note that the build will not run to the end. In the case where the compilation fails, just rebuild the failing file with g++ and continue. All the outstanding bugs you will encounter have already been reported by me on the llvm bugzilla and I expect most of them to be fixed sooner than later.

Cheers, Fons.