Compiling ROOT6 with clang

Dear ROOTers,

I had problems compiling the beta of ROOT6 on my SLC6.5 machine, see my previous post:

But now that the version of ROOT6 has been released, I tried again from scratch.

ROOT6 as downloaded from the Download page (I had not the same luck with git clone) nicely and smoothly compiles with gcc 4.8.2 from the RedHat devtools2.1 repositories. I can already start playing with that.

However I would like to try clang as compiler, and my problem is that clang 3.4 coming from the SLC6 repositories ignores the “activation” of the devtoolset, as demonstrated from:

$ clang -v
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.4
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.4.7
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/4.4.7 

I can suggest clang the gcc library to use with:

$ clang -v --gcc-toolchain=/opt/rh/devtoolset-2/root/usr/
clang version 3.4 (tags/RELEASE_34/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
Found candidate GCC installation: /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2
Selected GCC installation: /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2

However I do not know how to pass this information to the ROOT6 ./configure, because the corresponding option seems not to do the job:

$./configure --all --with-clang --with-gcc-toolchain=/opt/rh/devtoolset-2/root/usr/
Checking for source directory ... /tmp/matteo/Downloads2/root
Configuring for linuxx8664gcc
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 ... gfortran
configure: no alternative gcc compiler specified, incompatible with --with-gcc-toolchain option

Do you have any suggestion?

Hi!

This should be fixed by commit 9302bf6 - thanks for reporting! (And apologies this took that long…)

Cheers, Axel.