Hello,
I need ROOT with C++14 features, so I tried to build it from source (has not given (much) problems with older ROOT versions like v6.13). Now that we want to upgrade to the currently latest stable version (v6.18/04) the build fails with errors such as the following on OS X 10.12 (no problems on Ubuntu and CentOS):
[ 77%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingCallbacks.cxx.o
In file included from /Users/ahmad/bdm-build-third-party/root/core/metacling/src/TClingCallbacks.cxx:37:
In file included from /Users/ahmad/bdm-build-third-party/root/core/metacling/src/ClingRAII.h:13:
/Users/ahmad/bdm-build-third-party/root/interpreter/cling/include/cling/Utils/ParserStateRAII.h:32:29: error: 'TemplateIds' is a private member of 'clang::Parser'
decltype(clang::Parser::TemplateIds) OldTemplateIds;
^
/usr/local/opt/llvm/include/clang/Parse/Parser.h:254:43: note: implicitly declared private here
SmallVector<TemplateIdAnnotation *, 16> TemplateIds;
^
In file included from /Users/ahmad/bdm-build-third-party/root/core/metacling/src/TClingCallbacks.cxx:37:
/Users/ahmad/bdm-build-third-party/root/core/metacling/src/ClingRAII.h:60:29: error: no type named 'CleanupAndRestoreCacheRAII' in 'clang::Preprocessor'
clang::Preprocessor::CleanupAndRestoreCacheRAII fCleanupRAII;
~~~~~~~~~~~~~~~~~~~~~^
Building with the following options:
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
-DCMAKE_INSTALL_PREFIX=/Users/ahmad/bdm-build-third-party/root-install \
-Dcxx14=on \
../root/
Should clang be including headers from my system’s LLVM directory, or should it be using the headers that are shipped with ROOT? The errors above make me believe the latter…
Any ideas on how to fix this?
Ahmad
ROOT Version: 6.18/04
Platform: Mac OS 10.12
Compiler: LLVM Clang 8.0.1 (non-Apple version)