I compiled ROOT6 with the options “cmake -Dunuran=ON -Droofit=ON -Dmathmore=ON -Dcxx11=ON -Dhttp=ON -DCMAKE_BUILD_TYPE=Release”, with gcc version 4.8.5 (on redhat).
When I launch the root shell, I can use lambdas and all the c++11 stuff, but when I use rootcling to compile the dictionary for my library, the c++11 features are not available anymore. For example, I get the error
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/bits/stl_vector.h:1075:7: note: candidate function not viable: no known conversion from '__normal_iterator<const_pointer, [...]>' to
'__normal_iterator<pointer, [...]>' for 1st argument
erase(iterator __position);
The same code compiled fine on an another machine where root was compiled with the same flags. Any ideas on how to solve this problem?
I recompiled root again, and obtained the same errors. Are there some logs that I can check to see if the configuration of root is correct? Or maybe some commands to launch?
I compiled ROOT6 with the options “cmake -Dunuran=ON -Droofit=ON -Dmathmore=ON -Dcxx11=ON -Dhttp=ON -DCMAKE_BUILD_TYPE=Release”, with gcc version 4.8.5 (on redhat).
In particular, I see this in the output:
-- Found GCC. Major version 4, minor version 8
-- Performing Test CXX_SUPPORTS_OLD_ABI
-- Performing Test CXX_SUPPORTS_OLD_ABI - Success
-- Performing Test HAS_CXX11
-- Performing Test HAS_CXX11 - Success
Looks like it’s a gcc bug. I actually use a lot of c++11 features but it looks like only this thing with std::vector::erase arises. I will try with gcc 4.9 today.