Hi,
I’m trying to understand a build error in the ATLAS analysis software, but I’m having the hardest time with it.
For our “standalone” analysis releases we build ROOT, and all other externals needed by the analysis release, ourselves. And then build our own software on top of all of these externals.
What I found is that since we switched to ROOT version 6.14/08, I get very strange dictionary building errors on macOS Mojave. Ones that I don’t get on any Linux flavour that we use for these builds. As an example, one of our dictionary generation calls produces this output:
> sh ./Control/AthToolSupport/AsgTools/CMakeFiles/makeAsgToolsDictReflexDict.sh
clang: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgTool.h:15:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.h:100:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.icc:11:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TEvent.h:19:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/Rtypes.h:23:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/RtypesCore.h:23:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/ROOT/RConfig.h:48:4: error:
"ROOT requires support for C++11 or higher."
# error "ROOT requires support for C++11 or higher."
^
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/ROOT/RConfig.h:50:5: error:
"Pass `-std=c++11` as compiler argument."
# error "Pass `-std=c++11` as compiler argument."
^
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgTool.h:15:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.h:100:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.h:160:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.icc:19:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.h:61:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TClass.h:23:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TDictionary.h:44:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TNamed.h:26:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TString.h:29:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/ROOT/TypeTraits.hxx:33:98: error:
too many arguments provided to function-like macro invocation
template <typename T> constexpr auto HasCallOp(int /*goodOverload*/) -> decltype(&T::operator(), true) { return true; }
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:821:11: note:
macro 'decltype' defined here
# define decltype(__x) __decltype(__x)
^
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgTool.h:15:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.h:100:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.h:160:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.icc:19:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.h:61:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TClass.h:23:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TDictionary.h:44:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TNamed.h:26:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TString.h:29:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/ROOT/TypeTraits.hxx:218:55: error:
too many arguments provided to function-like macro invocation
-> decltype(static_cast<Begin_t<V>>(&V::begin), static_cast<End_t<V>>(&V::end), true)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:821:11: note:
macro 'decltype' defined here
# define decltype(__x) __decltype(__x)
^
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgTool.h:15:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.h:100:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.h:160:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.icc:19:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.h:61:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TClass.h:25:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TObjArray.h:25:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TSeqCollection.h:25:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TCollection.h:295:62: error:
too many arguments provided to function-like macro invocation
static_assert(std::is_base_of<TObject, Containee>::value, "Containee type must inherit from TObject");
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:805:12: note:
macro 'static_assert' defined here
# define static_assert(__b, __m) _Static_assert(__b, __m)
^
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgTool.h:15:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.h:100:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/SgTEvent.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.h:160:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/TStore.icc:19:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.h:61:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess/xAODRootAccess/tools/TCDVHolderT.icc:12:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TClass.h:25:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TObjArray.h:25:
In file included from /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TSeqCollection.h:25:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include/TCollection.h:337:62: error:
too many arguments provided to function-like macro invocation
static_assert(std::is_base_of<TObject, Containee>::value, "Containee type must inherit from TObject");
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:805:12: note:
macro 'static_assert' defined here
# define static_assert(__b, __m) _Static_assert(__b, __m)
^
6 errors generated.
For some reason it seems that genreflex
is trying to interpret the header that we gave to it, in c++03 mode. But I’m not aware that we would need to tell genreflex
what c++ standard we want to use. I always assumed that it would use the standard that ROOT itself was built with.
Does anybody have an idea what could be going wrong? In the past I observed some weird compilation errors when my build decided to pick up some headers from various “frameworks” during the build. (Instead of from POSIX headers.) But I checked for that a lot, all include directories given to the genreflex
command are from “standard” paths.
Any help/ideas would be much appreciated…
Cheers,
Attila
P.S. For completeness, the script in question calls genreflex
like this:
/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/bin/genreflex /Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/AsgToolsDict.h -o AsgToolsDictReflexDict.cxx --noIncludePaths --rootmap=AsgToolsDict.dsomap --rootmap-lib=libAsgToolsDict.so --library=libAsgToolsDict.so --select="/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools/selection.xml" -std=c++14 -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/doc/RootCore/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools/AsgTools" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/doc/RootCore/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthToolSupport/AsgTools" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccessInterfaces" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccessInterfaces" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/xAODRootAccess" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthContainers" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthContainers" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthContainersInterfaces" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthLinksSA" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/AthLinksSA" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/CxxUtils" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Control/CxxUtils" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Event/xAOD/xAODCore" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Event/xAOD/xAODCore" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/build/install/AnalysisBaseExternals/21.2.61/InstallArea/x86_64-mac1014-clang100-opt/include" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Event/xAOD/xAODEventFormat" -I"/Users/krasznaa/ATLAS/sw/projects/volatile/externals/athena/Event/xAOD/xAODEventFormat" -DHAVE_PRETTY_FUNCTION -DHAVE_64_BITS -D__IDENTIFIER_64BIT__ -DATLAS -DROOTCORE -DXAOD_STANDALONE -DXAOD_ANALYSIS -DROOTCORE_RELEASE_SERIES=25 -DPACKAGE_VERSION=\"AsgTools-00-00-00\" -DPACKAGE_VERSION_UQ=AsgTools-00-00-00 -DEIGEN_DONT_VECTORIZE
ROOT Version: 6.14/08
Platform: x86_64-mac1014-clang100-opt
Compiler: Apple Clang 10.0