Hi, I’ve been trying to do this yesterday and today but it does not compile. I’m using the latest branch and xcode but macOS 14. I had to add -Dbuiltin_glew=ON
to get cmake to configure, and I tried with c++ 17 and 20.
Device: Macbook Pro M2
CPU: M2 Pro
OS: MacOS Sonoma 14.7
Compiler: Clang 16
Branch: origin/v6-32-00-patches
Commit: e1be3aa
Cmake command: cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_CXX_STANDARD=20 -Dbuiltin_glew=ON ../source
Build command: cmake --build . --target install -- -j10
Root Build Configuration:
-- ROOT Configuration
System: Darwin-23.6.0
ROOT Platform: macosx
ROOT Architecture: macosxarm64
Processor: 10 core Apple M2 Pro (arm64)
Build type: Release
Install path: /Users/user/Code/ROOT/install
Compiler: AppleClang 16.0.0.16000026
C++ standard: 20
Compiler flags:
- C: -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread
- C (built type specific): -O3 -DNDEBUG
- C++: -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++
- C++ (built type specific): -O3 -DNDEBUG
Linker flags:
- Executable: -mmacosx-version-min=14.7
- Module:
- Shared:
-- Enabled support for: asimage builtin_afterimage builtin_clang builtin_cling builtin_davix builtin_freetype builtin_glew builtin_llvm builtin_openui5 builtin_vdt clad cocoa dataframe davix fitsio gdml http imt libcxx opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd
Error message:
[ 76%] Built target MetaCling
/Users/user/Code/ROOT/build/etc/cling/std_darwin.modulemap:61:10: error: header 'coroutine' not found
header "coroutine"
^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include <new>
^
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
Warning in cling::IncrementalParser::CheckABICompatibility():
Possible C++ standard library mismatch, compiled with _LIBCPP_ABI_VERSION '1'
Extraction of runtime standard library version was: ''
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/user/Code/ROOT/build/etc/cling/std_darwin.modulemap:61:10: error: header 'coroutine' not found
header "coroutine"
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/DynamicExprInfo.h:13:10: note: submodule of top-level module 'std' implicitly imported here
#include <string>
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/DynamicExprInfo.h:40:7: error: use of undeclared identifier 'std'
std::string m_Result;
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/user/Code/ROOT/build/etc/cling/std_darwin.modulemap:61:10: error: header 'coroutine' not found
header "coroutine"
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/DynamicLookupLifetimeHandler.h:12:10: note: submodule of top-level module 'std' implicitly imported here
#include <string>
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/DynamicLookupLifetimeHandler.h:56:7: error: use of undeclared identifier 'std'
std::string m_Type;
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/user/Code/ROOT/build/etc/cling/std_darwin.modulemap:61:10: error: header 'coroutine' not found
header "coroutine"
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/Value.h:15:10: note: submodule of top-level module 'std' implicitly imported here
#include <cstdint> // for uintptr_t
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/Value.h:152:23: error: use of undeclared identifier 'uintptr_t'
return (T) (uintptr_t) V.getAs<void*>();
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/Value.h:166:24: error: use of undeclared identifier 'uintptr_t'
return (T*) (uintptr_t) V.getAs<void*>();
^
/Users/user/Code/ROOT/build/etc/cling/Interpreter/Value.h:313:25: error: use of undeclared identifier 'uintptr_t'
return (void*)getAs<uintptr_t>();
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
In file included from <module-includes>:1:
/Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra'
#include "cling/Interpreter/Visibility.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 rootcling_stage1 0x0000000103a8a604 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 rootcling_stage1 0x0000000103a89548 llvm::sys::RunSignalHandlers() + 80
2 rootcling_stage1 0x0000000103a8ab58 SignalHandler(int) + 344
3 libsystem_platform.dylib 0x00000001839c2584 _sigtramp + 56
4 rootcling_stage1 0x0000000101341900 clang::Parser::ParseCompoundStatementBody(bool) + 316
5 rootcling_stage1 0x0000000101341900 clang::Parser::ParseCompoundStatementBody(bool) + 316
6 rootcling_stage1 0x000000010133a0a8 clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 2072
7 rootcling_stage1 0x0000000101339690 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 288
8 rootcling_stage1 0x00000001012c05b8 clang::Parser::ParseTopLevelStmtDecl() + 88
9 rootcling_stage1 0x0000000101358c2c clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 2176
10 rootcling_stage1 0x00000001012cb17c clang::Parser::ParseInnerNamespace(llvm::SmallVector<clang::Parser::InnerNamespaceInfo, 4u> const&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 244
11 rootcling_stage1 0x00000001012ca7f0 clang::Parser::ParseNamespace(clang::DeclaratorContext, clang::SourceLocation&, clang::SourceLocation) + 4252
12 rootcling_stage1 0x00000001012b21d0 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, clang::SourceLocation*) + 1060
13 rootcling_stage1 0x00000001013585a4 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 504
14 rootcling_stage1 0x0000000101357180 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 1452
15 rootcling_stage1 0x000000010129f524 clang::ParseAST(clang::Sema&, bool, bool) + 592
16 rootcling_stage1 0x00000001010f62ac clang::FrontendAction::Execute() + 108
17 rootcling_stage1 0x000000010108d744 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 804
18 rootcling_stage1 0x0000000101094ecc void llvm::function_ref<void ()>::callback_fn<compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, llvm::StringRef, clang::FrontendInputFile, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (clang::CompilerInstance&)>, llvm::function_ref<void (clang::CompilerInstance&)>)::$_1>(long) + 56
19 rootcling_stage1 0x00000001039d0b60 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 140
20 rootcling_stage1 0x00000001010930dc compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, llvm::StringRef, clang::FrontendInputFile, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (clang::CompilerInstance&)>, llvm::function_ref<void (clang::CompilerInstance&)>) + 2892
21 rootcling_stage1 0x00000001010942b0 compileModuleAndReadASTImpl(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, llvm::StringRef) + 1820
22 rootcling_stage1 0x0000000101090064 compileModuleAndReadAST(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, llvm::StringRef) + 1284
23 rootcling_stage1 0x000000010108f840 clang::CompilerInstance::findOrCompileModuleAndReadAST(llvm::StringRef, clang::SourceLocation, clang::SourceLocation, bool) + 2112
24 rootcling_stage1 0x00000001010902b4 clang::CompilerInstance::loadModule(clang::SourceLocation, llvm::ArrayRef<std::__1::pair<clang::IdentifierInfo*, clang::SourceLocation>>, clang::Module::NameVisibilityKind, bool) + 516
25 rootcling_stage1 0x0000000102026804 clang::Preprocessor::HandleHeaderIncludeOrImport(clang::SourceLocation, clang::Token&, clang::Token&, clang::SourceLocation, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) + 3868
26 rootcling_stage1 0x0000000102020e5c clang::Preprocessor::HandleIncludeDirective(clang::SourceLocation, clang::Token&, clang::detail::SearchDirIteratorImpl<true>, clang::FileEntry const*) + 144
27 rootcling_stage1 0x0000000102021664 clang::Preprocessor::HandleDirective(clang::Token&) + 1604
28 rootcling_stage1 0x0000000101ff90c0 clang::Lexer::LexTokenInternal(clang::Token&, bool) + 5604
29 rootcling_stage1 0x00000001020538e4 clang::Preprocessor::Lex(clang::Token&) + 104
30 rootcling_stage1 0x0000000101356c3c clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) + 104
31 rootcling_stage1 0x0000000100cae430 cling::IncrementalParser::ParseInternal(llvm::StringRef) + 1376
32 rootcling_stage1 0x0000000100caf86c cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) + 60
33 rootcling_stage1 0x0000000100cb63f8 cling::Interpreter::declare(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, cling::Transaction**) + 216
34 rootcling_stage1 0x0000000100cb58e0 cling::Interpreter::Initialize(bool, bool, llvm::SmallVectorImpl<llvm::StringRef>&) + 2156
35 rootcling_stage1 0x0000000100cb4aa4 cling::Interpreter::Interpreter(int, char const* const*, char const*, std::__1::vector<std::__1::shared_ptr<clang::ModuleFileExtension>, std::__1::allocator<std::__1::shared_ptr<clang::ModuleFileExtension>>> const&, void*, bool, cling::Interpreter const*) + 2472
36 rootcling_stage1 0x0000000100bbbbbc RootClingMain(int, char**, bool) + 12720
37 rootcling_stage1 0x0000000100bc9678 ROOT_rootcling_Driver + 796
38 rootcling_stage1 0x0000000100b669dc main + 64
39 dyld 0x0000000183607154 start + 2476
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /Users/user/Code/ROOT/build/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -cxxmodule -s /Users/user/Code/ROOT/build/lib/libCore.so -excludePath /Users/user/Code/ROOT/source -excludePath /Users/user/Code/ROOT/build/ginclude -excludePath /Users/user/Code/ROOT/build/externals -excludePath /Users/user/Code/ROOT/build/builtins -writeEmptyRootPCM -mByproduct Darwin -m _Builtin_intrinsics -mByproduct _Builtin_intrinsics -mByproduct ROOT_Foundation_Stage1_NoRTTI -mByproduct ROOT_Foundation_C -mByproduct ROOT_Rtypes -DR__ARC4_STDLIB -D__STDC_NO_COMPLEX__ -D__COMPLEX_H__ -D_COMPLEX_H -D__CLANG_STDATOMIC_H -compilerI/Library/Developer/CommandLineTools/usr/include/c++/v1 -compilerI/Library/Developer/CommandLineTools/usr/lib/clang/16/include -compilerI/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include -compilerI/Library/Developer/CommandLineTools/usr/include -compilerI/Library/Developer/CommandLineTools/usr/lib/clang/16/include -compilerI/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include -compilerI/Library/Developer/CommandLineTools/usr/include -I/Users/user/Code/ROOT/build/include -I/opt/homebrew/include -I/Users/user/Code/ROOT/build/ginclude -I/Users/user/Code/ROOT/source/core/base/inc -I/Users/user/Code/ROOT/source/core/base/v7/inc -I/Users/user/Code/ROOT/source/core/clib/inc -I/Users/user/Code/ROOT/source/core/clingutils/inc -I/Users/user/Code/ROOT/source/core/clingutils/res -I/Users/user/Code/ROOT/source/core/cont/inc -I/Users/user/Code/ROOT/source/core/foundation/inc -I/Users/user/Code/ROOT/source/core/foundation/v7/inc -I/Users/user/Code/ROOT/source/core/foundation/res -I/Users/user/Code/ROOT/source/core/gui/inc -I/Users/user/Code/ROOT/source/core/meta/inc -I/Users/user/Code/ROOT/source/core/rint/inc -I/Users/user/Code/ROOT/source/core/textinput/inc -I/Users/user/Code/ROOT/source/core/textinput/src -I/Users/user/Code/ROOT/source/core/thread/inc -I/Users/user/Code/ROOT/source/core/zip/inc -I/Users/user/Code/ROOT/source/core/lzma/inc -I/opt/homebrew/include -I/Users/user/Code/ROOT/source/core/lz4/inc -I/Users/user/Code/ROOT/source/core/zstd/inc -I/Users/user/Code/ROOT/source/core/macosx/inc -I/Users/user/Code/ROOT/source/core/unix/inc -I/Users/user/Code/ROOT/source/core/unix/../clib/res -I/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include ROOT/TErrorDefaultHandler.hxx ROOT/TExecutorCRTP.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 TVirtualMapFile.h TVirtualMutex.h TVirtualPadEditor.h TVirtualPad.h TVirtualPadPainter.h TVirtualPerfStats.h TVirtualPS.h TVirtualQConnection.h TVirtualRWMutex.h TVirtualTableInterface.h TVirtualViewer3D.h TVirtualX.h ROOT/RFloat16.hxx ROOT/RDirectoryEntry.hxx ROOT/RIndexIter.hxx strlcpy.h snprintf.h strtok.h root_std_complex.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 ThreadLocalStorage.h ROOT/RLogger.hxx ROOT/RNotFn.hxx ROOT/RRangeCast.hxx ROOT/RSpan.hxx ROOT/RStringView.hxx ROOT/StringUtils.hxx ROOT/span.hxx ROOT/TypeTraits.hxx ROOT/RError.hxx 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 TMacOSXSystem.h TUnixSystem.h /Users/user/Code/ROOT/source/core/base/inc/LinkDef.h
1. /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimePrintValue.h:319:5: current parser token 'using'
2. /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimePrintValue.h:33:1: parsing namespace 'cling'
3. /Users/user/Code/ROOT/build/etc/cling/Interpreter/RuntimePrintValue.h:318:3: in compound statement ('{}')
Segmentation fault
make[2]: *** [core/G__Core.cxx] Error 1
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....