Compile error building ROOT from source with c++17

Hullo,

I’ve been trying to build ROOT from source on my mac laptop today, with c++17 activated. After checking out the code (to a directory called ROOT) and creating a build directory at the same level, I did a cmake-configure with:

cmake -DCMAKE_CXX_STANDARD=17 ../ROOT/

That succeeds and gives me:

System          Darwin-19.6.0
Processor       4 core Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz (x86_64)
Build type      Release
Install path    /usr/local
Compiler        AppleClang 12.0.0.12000032
Compiler flags:
C                -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread -O3 -DNDEBUG
C++              -std=c++17 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -O3 -DNDEBUG
Linker flags:
Executable       -mmacosx-version-min=10.15
Module          
Shared          

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_freetype builtin_ftgl builtin_glew builtin_llvm builtin_nlohmannjson builtin_openui5 builtin_vdt builtin_xxhash clad cocoa dataframe davix exceptions fftw3 fitsio gdml http imt libcxx mathmore mlp minuit2 opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd

But when I attempt to compile I repeatedly get stuck at the following:

In file included from <module-includes>:2:
./include/ROOT/RStringView.hxx:25:10: fatal error: could not build module 'std'
#include <string_view>
 ~~~~~~~~^
Error: Error loading the default rootcling header files.
make[2]: *** [core/G__Core.cxx] Error 1

I know this is related to me enabling c++17 because if I don’t include that cmake option then the compilation succeeds fine. But I thought c++17 was supported … does anyone know what I’m doing wrong here?

Many thanks in advance!
Will


_ROOT Version:6.26.00
_Platform: macOS (x86 10.15)
_Compiler: AppleClang 12.0.0.12000032


Hi @will_cern ,
needless to say this should not happen :slight_smile: Does this also happen if you start the cmake configuration and the build from a completely empty build directory and with no other ROOT installation available in your environment?

Cheers,
Enrico

Just tried again with an empty directory and also after having done a brew uninstall of my installation of root (which I would have been surprised if was getting in the way, I certainly hadn’t done a source of thisroot.sh in the terminal), but same errors :frowning:

After much googling I’ve finally found a solution. Seems like there’s some weird issue with system headers clashing with things, which can be, confusingly, solved by editing /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath to replace #include <math.h> with #include "math.h" … I’m too tired to figure out why this works for me but I’m just happy to move on at this point!

Thanks for confirming I wasn’t doing anything stupid with my cmake configure though!

Very weird, I wonder if @Axel or @vvassilev have seen this before. Glad you found a workaround!

Enrico

I’d bet that

isn’t the first error message. And no, I have never seen this, nor did I ever see this being reported…

Your bet was right, here’s the first error in fact:

[ 72%] Generating G__Core.cxx, ../lib/Core.pcm
While building module 'Core':
While building module 'std' imported from input_line_1:1:
In file included from <module-includes>:31:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex.h:28:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ccomplex:20:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/complex:245:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:317:9: error: missing '#include "/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h"'; declaration of 'signbit' must be imported
      from module 'std.depr.math_h' before it is required
using ::signbit;

I’m coming back to this one because I suspect that my “hack” of cmath in this directory has caused me subsequent grief because I think it ends up using math.h from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h instead of the math.h in the same directory as cmath.

So the real mystery here is why does #include <math.h> fail to find the header in the same location?

This is the “grief” I am talking about, which I’m wondering if its connected to my issues here:

root [0] std::isnan(4)
ROOT_prompt_0:1:6: error: expected unqualified-id
std::isnan(4)
     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
    ^

Or is this coming from something else?

to add some further debugging – the original failure, in the dictionary generation of Core, seems to depend on whether -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include appears in the rootcling_stage1 command call or not. If its included, things fail. If I copy the command (from a VERBOSE=1 call to build) then the dictionary generation succeeds if I remove that include.

At this point I’m worried that this version of macOS just isn’t going to work??

That’s weird because we do have a nightly build of ROOT v6.26 on Mac 10.15 and it looks fine, here (requires CERN credentials). @vvassilev any ideas?

@will_cern, can you paste the entire rootcling invocation? We might be misordering the include paths…

So I’ll get the full command for you ASAP but wanted to remark on a difference I spotted between the build CI linked above and my local setup. I noticed that on the CI in the CMakeCache.txt (Sign in to CERN) there is:

CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk

But on my local build I have:

CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

Today I tried a fresh build but where I set this cache variable to MacOSX11.1.sdk instead (note that on my machine I seem to have both directories), and the build succeeded. But there are other things I am building in my project (numpy is one of them) and that then failed if I changed this cache variable.

So I’m at least wondering if this difference explains why the CI works and mine doesn’t

here’s the rootcling command from the VERBOSE=1 build:

cd /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/core && /usr/local/Cellar/cmake/3.18.1/bin/cmake -E env LD_LIBRARY_PATH=/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/lib: /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -cxxmodule -s /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/lib/libCore.so -excludePath /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT -excludePath /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/ginclude -excludePath /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/externals -excludePath /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/builtins -writeEmptyRootPCM -m _Builtin_intrinsics -mByproduct _Builtin_intrinsics -mByproduct ROOT_Foundation_Stage1_NoRTTI -mByproduct ROOT_Foundation_C -mByproduct ROOT_Rtypes -D__STDC_NO_COMPLEX__ -D__COMPLEX_H__ -D_COMPLEX_H -D__CLANG_STDATOMIC_H -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include -I/usr/local/include -I/usr/local/include -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/ginclude -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/cont/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/gui/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/meta/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clib/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/rint/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/zip/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/thread/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/textinput/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clingutils/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/v7/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/v7/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/unix/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/macosx/inc -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/builtins/pcre/PCRE-prefix/src/PCRE-build -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/xxhash -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/lz4 -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/zstd ROOT/TErrorDefaultHandler.hxx ROOT/TSequentialExecutor.hxx ROOT/StringConv.hxx Buttons.h Bytes.h Byteswap.h KeySymbols.h MessageTypes.h Riostream.h Rtypes.h TApplication.h TAtt3D.h TAttAxis.h TAttBBox2D.h TAttBBox.h TAttFill.h TAttLine.h TAttMarker.h TAttPad.h TAttText.h TBase64.h TBenchmark.h TBuffer3D.h TBuffer3DTypes.h TBuffer.h TColor.h TColorGradient.h TDatime.h TDirectory.h TEnv.h TException.h TExec.h TFileCollection.h TFileInfo.h TFolder.h TInetAddress.h TMacro.h TMathBase.h TMD5.h TMemberInspector.h TMessageHandler.h TNamed.h TNotifyLink.h TObject.h TObjString.h TParameter.h TPluginManager.h TPoint.h TPRegexp.h TProcessID.h TProcessUUID.h TQClass.h TQCommand.h TQConnection.h TQObject.h TRedirectOutputGuard.h TRefCnt.h TRef.h TRegexp.h TRemoteObject.h TROOT.h TRootIOCtor.h TStopwatch.h TStorage.h TString.h TStringLong.h TStyle.h TSysEvtHandler.h TSystemDirectory.h TSystemFile.h TSystem.h TTask.h TThreadSlots.h TTime.h TTimer.h TTimeStamp.h TUri.h TUrl.h TUUID.h TVersionCheck.h TVirtualAuth.h TVirtualFFT.h TVirtualGL.h TVirtualMonitoring.h TVirtualMutex.h TVirtualPadEditor.h TVirtualPad.h TVirtualPadPainter.h TVirtualPerfStats.h TVirtualPS.h TVirtualQConnection.h TVirtualRWMutex.h TVirtualTableInterface.h TVirtualViewer3D.h TVirtualX.h ROOT/RDirectoryEntry.hxx ROOT/RIndexIter.hxx strlcpy.h snprintf.h strtok.h ROOT/TSeq.hxx TArrayC.h TArrayD.h TArrayF.h TArray.h TArrayI.h TArrayL64.h TArrayL.h TArrayS.h TBits.h TBtree.h TClassTable.h TClonesArray.h TCollection.h TCollectionProxyInfo.h TExMap.h THashList.h THashTable.h TIterator.h TList.h TMap.h TObjArray.h TObjectTable.h TOrdCollection.h TRefArray.h TRefTable.h TSeqCollection.h TSortedList.h TVirtualCollectionProxy.h ESTLType.h RStringView.h TClassEdit.h TError.h ROOT/RIntegerSequence.hxx ROOT/RLogger.hxx ROOT/RMakeUnique.hxx ROOT/RNotFn.hxx ROOT/RSpan.hxx ROOT/RStringView.hxx ROOT/span.hxx ROOT/TypeTraits.hxx TMacOSXSystem.h TUnixSystem.h root_std_complex.h GuiTypes.h TApplicationImp.h TBrowser.h TBrowserImp.h TCanvasImp.h TClassMenuItem.h TContextMenu.h TContextMenuImp.h TControlBarImp.h TGuiFactory.h TInspectorImp.h TObjectSpy.h TToggleGroup.h TToggle.h TBaseClass.h TClassGenerator.h TClass.h TClassRef.h TClassStreamer.h TDataMember.h TDataType.h TDictAttributeMap.h TDictionary.h TEnumConstant.h TEnum.h TFileMergeInfo.h TFunction.h TFunctionTemplate.h TGenericClassInfo.h TGlobal.h TInterpreter.h TInterpreterValue.h TIsAProxy.h TListOfDataMembers.h TListOfEnums.h TListOfEnumsWithLock.h TListOfFunctions.h TListOfFunctionTemplates.h TMemberStreamer.h TMethodArg.h TMethodCall.h TMethod.h TProtoClass.h TRealData.h TSchemaHelper.h TSchemaRule.h TSchemaRuleSet.h TStatusBitsChecker.h TStreamerElement.h TStreamer.h TVirtualIsAProxy.h TVirtualRefProxy.h TVirtualStreamerInfo.h TVirtualArray.h TVirtualObject.h Getline.h /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/inc/LinkDef.h

Thanks, forgot to ask to run that command again but change the argument -v2 to -v4 and paste the output.

Adding library paths from 'LD_LIBRARY_PATH':
Adding library paths from 'DYLD_LIBRARY_PATH':
Adding library paths from 'DYLD_FALLBACK_LIBRARY_PATH':
cling version ROOT_0.9~dev
Looking for C++ headers in "/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1"
Found:
 /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1
clang version 9.0.1 (https://github.com/root-project/root.git 3b796f86a30e274053669931a24d77a3d36c8f18)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/core/rootcling_stage1/src
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//Library/Frameworks"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include"
#include "..." search starts here:
 .
#include <...> search starts here:
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include
 /usr/local/include
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/ginclude
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/cont/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/gui/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/meta/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clib/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/rint/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/zip/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/thread/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/textinput/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clingutils/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/v7/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/v7/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/unix/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/macosx/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/builtins/pcre/PCRE-prefix/src/PCRE-build
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/xxhash
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/lz4
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/zstd
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc
 /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc/cling/lib/clang/9.0.1/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks (framework directory)
End of search list.
Loading '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/module.modulemap'
Loading '/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/module.modulemap'
'/usr/local/include/module.modulemap' does not exist. Mounting '/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc/cling/vc.modulemap' as '/usr/local/include/module.modulemap'
modulemap.overlay.yaml
{
 'version': 0,
 'roots': [
{ 'name': '/usr/local/include', 'type': 'directory',
'contents': [
   { 'name': 'vc.modulemap', 'type': 'file',
  'external-contents': '/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc/cling/vc.modulemap'
}
 ]
 }]
 }
 ]
 }
Adding runtime include paths:
  ""
Added include paths:
Setting up system headers with clang:
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//Library/Frameworks"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include"
#include "..." search starts here:
 .
#include <...> search starts here:
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include
 /usr/local/include
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/ginclude
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/cont/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/gui/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/meta/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clib/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/rint/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/zip/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/thread/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/textinput/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/clingutils/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/base/v7/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/foundation/v7/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/unix/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/core/macosx/inc
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/builtins/pcre/PCRE-prefix/src/PCRE-build
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/xxhash
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/lz4
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT/builtins/zstd
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc
 /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1
 /Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/etc/cling/lib/clang/9.0.1/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//System/Library/Frameworks (framework directory)
End of search list.
clang -cc1 version 9.0.1 based upon LLVM 9.0.1 default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk//Library/Frameworks"
ignoring duplicate directory "/usr/local/include"
ignoring duplicate directory "/Users/cym53897/CLionProjects/StatAnalysis/cmake-build-debug3/src/ROOT-build/include"

there’s some more but it seems like duplicates of the above … lmk if you need …

some progress:

Looking at the contents of my /Library/Developer/CommandLineTools/SDKs directory showed:

MacOSX.sdk -> MacOSX11.1.sdk
MacOSX10.15.sdk
MacOSX11.1.sdk

I don’t really understand why I have 11.1 sdk there when I’m still on 10.15 … but googling around it might be the latter versions of the command-line-tools for 10.15 did include this. But I noted that the symlink points at 11.1. If I replace that symlink with one pointing to 10.15 then the rootcling works. It also looks as if the other things I am compiling continue to work too (but I may have spoken too soon … still waiting for things to finish compiling).

At this time I can confirm that changing that symlink over has allowed everything to compile and so far ROOT is behaving completely as I would expect it to. It’s still not clear why the symlink was pointing at MacOSX11.1.sdk or even why that’s there in the first place - but I do find it interesting the CI job is using it (and I guess its possible the CI machine doesn’t even have a MacOSX10.15.sdk dir? … but it seems I need it to get other things to compile).

Would be curious to know what others still on macOS 10.15 see in their SDKs directory?..

I had exactly the same problem. In /Library/Developer/CommandLineTools/SDKs I had the two SDKs for 10.15 and 11.1 and the link pointing to MacOSX11.1.sdk. With this setup I ran into the same problems reported here. Already some time ago I had a similar problem which I finally fixed by modifying the flags for the Makefiles.

After changing the link to point to MacOSX10.15.sdk the compilation of ROOT works again as expected. I did not yet test if the change also fix my other compilation problem but I expect so.

Thanks for sharing your results here.

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