ROOT c++ version

Dear all,

I am building allpix2 on my MacBook, compiler is AppleClang

I got this error about the root compiled version:

– Performing Test CXX_FLAG_WORKS__Wdeprecated - Success
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto - Success
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene - Success
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual - Success
– Using Ccache: /usr/local/bin/ccache
– Performing Test SUPPORT_STD_CXX17
– Performing Test SUPPORT_STD_CXX17 - Success
– Looking for C++ include pthread.h
– Looking for C++ include pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Found Boost: /usr/local/lib/cmake/Boost-1.75.0/BoostConfig.cmake (found suitable version “1.75.0”, minimum required is “1.64.0”) found components: random
CMake Error at CMakeLists.txt:240 (MESSAGE):
ROOT was built with an unsupported C++ version, C++17 is required:
-std=c++11 -m64 -pipe -fsigned-char -fno-common -Qunused-arguments -pthread

Do you know what it is complaining about?
Thank in advance,


Hi all,

I maneged to solve this issue by compiling ROOT with c++17, now I have this other issue when I build allpix2:

[ 78%] Building CXX object tools/mesh_converter/CMakeFiles/mesh_converter.dir/MeshElement.cpp.o
[ 79%] Building CXX object tools/mesh_converter/CMakeFiles/mesh_converter.dir/MeshConverter.cpp.o
In file included from /Users/francescofollega/Documents/geant4_software/allpix-squared/tools/mesh_converter/MeshConverter.cpp:21:
In file included from /Users/francescofollega/Documents/geant4_software/allpix-squared/src/core/module/ThreadPool.hpp:295:
/Users/francescofollega/Documents/geant4_software/allpix-squared/src/core/module/ThreadPool.tpp:19:51: warning: ISO C++ requires the name after ‘::~’ to be found in the same scope as the name before ‘::~’ [-Wdtor-name]
template ThreadPool::SafeQueue::~SafeQueue() { invalidate(); }
In file included from /Users/francescofollega/Documents/geant4_software/allpix-squared/tools/mesh_converter/MeshConverter.cpp:24:
/Users/francescofollega/Documents/geant4_software/allpix-squared/src/tools/ROOT.h:28:10: fatal error: ‘TH1.h’ file not found
#include <TH1.h>
1 warning and 1 error generated.
make[2]: *** [tools/mesh_converter/CMakeFiles/mesh_converter.dir/MeshConverter.cpp.o] Error 1
make[1]: *** [tools/mesh_converter/CMakeFiles/mesh_converter.dir/all] Error 2
make: *** [all] Error 2

Do you know what is causing the crash?


Hi @ffollega

Yes, we do require C++17 for the latest version, and this entails a ROOT version compiled against the same standard - but this you have found out already.

Your second error likely stems from the fact that your compiled ROOT (make) but did not install it (make install) but sourced it from its build directory. This doesn’t work since some paths are only properly populated at install time.


Dear @simonspa,

thanks for your answer. Your advises solved my problem!