Why my ROOT 6 installation with cxx11 fail?

Hi,
Someone suggest me to use ROOT 6 so I install one, with

./configure --all

And my gcc version is new:

lis-MacBook-Pro:root li$ gcc --version gcc-5 (Homebrew gcc 5.3.0) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And in the configure, it said:

Checking whether c++11 mode is supported ... yes

But,

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_ftgl, builtin_freetype, builtin_glew, builtin_pcre, builtin_lzma, builtin_llvm, libcxx, cocoa, explicitlink, fink, gdml, genvector, http, krb5, ldap, memstat, minuit2, opengl, pythia8, python, roofit, rpath, search_usrlocal, shared, sqlite, table, tmva, unuran, vdt, xml.

My experience of ROOT 5 is that if it enable gcc11, cxx11 should be displayed here.

After installation, I checked,

lis-MacBook-Pro:root li$ ./bin/root-config --has-cxx11
no

Does anyone know what’s wrong with it?

Hi,

since you are on osx, I would suggest to use the native compiler. Therefore:

mkdir rootBuild
cd rootBuild
cmake path/to/root/sources
make -j N

For more information about the availbale CMAKE switches you can have a look to root.cern.ch/building-root

Cheers,
D

[quote=“dpiparo”]Hi,

since you are on osx, I would suggest to use the native compiler. Therefore:

mkdir rootBuild
cd rootBuild
cmake path/to/root/sources
make -j N

For more information about the availbale CMAKE switches you can have a look to root.cern.ch/building-root

Cheers,
D[/quote]

Hi Dpiparo,
Thanks and I tried:

Then,

And I find although I can use cxx11 now, I can’t use others, like:

lis-MacBook-Pro:root li$ ./bin/root-config --has-minuit2 no lis-MacBook-Pro:root li$ ./bin/root-config --has-cxx11 yes

minuit2 should be installed well, but it failed…( And in my previous installation, it installs well)

Best,
Li

cmake -Dall=“ON” -Dsoversion=“ON” path/to/root/sources

Hi Li,

great you managed. The post of Pepe contains a useful hint: I think you were mixing the options of the makefile system with the cmake ones.
Another little remark: ROOT6 is written in C++11. There is nothing special to do to enable that standard for the compilation neither for the interpretation of code at the prompt.

Cheers,
Danilo

Hi,
Thanks for your commands, because I don’t find them in root.cern.ch/building-root , neither in “cmake --help”.

Best,
Li

[quote=“dpiparo”]Hi Li,

great you managed. The post of Pepe contains a useful hint: I think you were mixing the options of the makefile system with the cmake ones.
Another little remark: ROOT6 is written in C++11. There is nothing special to do to enable that standard for the compilation neither for the interpretation of code at the prompt.

Cheers,
Danilo[/quote]

Hi Danilo,
Thanks for your explanation. But I don’t find the options in the link, root.cern.ch/building-root . Although there is “Basic CMake Usage”.

And as my first question, using “./configure” , I can’t enable cxx11.

Best,
Li

Hi Li,

I think you should use only CMake.
If you scroll down the page, you’ll see a huge table. It lists the options. The way in which you can enable them is

cmake -Doptionname1=ON -Doptionname2=ON path/to/sources
make -j N

So suppose you want to build with RooFit and http enabled and you want to turn on an extreme optimisation level of the code for more performance:

cmake -Droofit=ON -Dhttp=ON -DCMAKE_BUILD_TYPE=Optimized  path/to/sources

If you look at the default value of the cxx11 option, you’ll see it’s ON and it could not be otherwise as in ROOT we use already lots of new C++.

Cheers,
D

[quote=“dpiparo”]Hi Li,

I think you should use only CMake.
If you scroll down the page, you’ll see a huge table. It lists the options. The way in which you can enable them is

cmake -Doptionname1=ON -Doptionname2=ON path/to/sources
make -j N

So suppose you want to build with RooFit and http enabled and you want to turn on an extreme optimisation level of the code for more performance:

cmake -Droofit=ON -Dhttp=ON -DCMAKE_BUILD_TYPE=Optimized  path/to/sources

If you look at the default value of the cxx11 option, you’ll see it’s ON and it could not be otherwise as in ROOT we use already lots of new C++.

Cheers,
D[/quote]

Hi Danilo,

Thanks for your clear explanation. It seems that CMake is better than “./configure” for ROOT6.

Best,
Li

Hi Li,

I mark this as solved. Let us know if you encounter other issues.

D