Strange dictionary error with 6.14/08 on macOS Mojave

Hi,

I’m trying to understand a build error in the ATLAS analysis software, but I’m having the hardest time with it. :frowning:

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. :confused: 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


Ahh, I left an -std=c++14 in the last line. We don’t use that by default. I just wanted to see if adding it would make any difference. But it didn’t…

Let me tag some experts here… @Danilo, @Axel, I’m really lost with this one. :frowning:

I found that after setting up the “right environment”, I am able to execute the genreflex command by hand in the terminal successfully. That works without a hitch. But as soon as I put the call into a script, and execute the script, I get this sort of failure.

Of course my first idea was that the SIP may have been made “smarter” recently. In the past I could get around it by simply copying /usr/bin/bash into my build directory, and calling it from there to execute scripts as part of the build. And in fact, if I print the value of DYLD_LIBRARY_PATH from inside my script, it looks as I would expect it to look.

I’ll continue to experiment, but I’m quite lost for the moment…

Edit:

:man_facepalming: Fudge. Apparently I’ve been all wrong all along. It’s not genreflex throwing a tantrum. It’s the compiler call before it, with which the script is trying to generate a .d file. (I’ve been experimenting lately with trying to teach Ninja how to take changes in “dictionary headers” into account correctly during incremental builds.) Apparently the code I wrote and only properly tested with GCC before, does not work with Clang.

I guess, back to the drawing board… :frowning:

Hi Attila,

I don’t have access to Mac OS Mojave, but I am not sure that genreflex can digest -std=c++11/c++14 as an input option. @axel can you help here perhaps?

p.s. ops, our posts ran into each other.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.