Help on compile root on new arm MacBook


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.22.02
_Platform: arm-based MacBook , macOS 11.0.1
_Compiler: Apple clang 12.0


Log:

Scanning dependencies of target G__Core
[ 81%] Generating G__Core.cxx, …/lib/libCore.rootmap
error: unknown target triple ‘unknown-apple-macosx10.16.0’, please use -triple or -arch
Could not determine compiler target.
Compiler instance could not be created.
0 rootcling_stage1 0x0000000105f327ec llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 52
1 rootcling_stage1 0x0000000105f32d08 SignalHandler(int) + 400
2 libsystem_platform.dylib 0x00000001a1ff8c44 _sigtramp + 56
3 rootcling_stage1 0x0000000104618ff4 RootClingMain(int, char**, bool, bool) + 9088
4 rootcling_stage1 0x00000001046264c8 ROOT_rootcling_Driver + 512
5 rootcling_stage1 0x00000001045b91b8 main + 68
6 libdyld.dylib 0x00000001a1fccf54 start + 4
Stack dump:
0. Program arguments: /Users/fermi/dev/root/build/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -s /Users/fermi/dev/root/build/lib/libCore.so -excludePath /Users/fermi/dev/root/root-6.18.04 -excludePath /Users/fermi/dev/root/build -rml libCore.so -rmf /Users/fermi/dev/root/build/lib/libCore.rootmap -I/Users/fermi/dev/root/root-6.18.04 -I/Users/fermi/dev/root/build/etc/cling/ -I/Users/fermi/dev/root/build/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include -I/Users/fermi/dev/root/root-6.18.04/core/base/inc -I/Users/fermi/dev/root/root-6.18.04/core/clib/inc -I/Users/fermi/dev/root/root-6.18.04/core/cont/inc -I/Users/fermi/dev/root/root-6.18.04/core/foundation/inc -I/Users/fermi/dev/root/root-6.18.04/core/macosx/inc -I/Users/fermi/dev/root/root-6.18.04/core/unix/inc -I/Users/fermi/dev/root/root-6.18.04/core/winnt/inc -I/Users/fermi/dev/root/root-6.18.04/core/clingutils/inc -I/Users/fermi/dev/root/root-6.18.04/core/meta/inc -I/Users/fermi/dev/root/root-6.18.04/core/textinput/inc -I/Users/fermi/dev/root/root-6.18.04/core -writeEmptyRootPCM -DSYSTEM_TYPE_macosx ROOT/StringConv.hxx ROOT/TExecutor.hxx ROOT/TSequentialExecutor.hxx Buttons.h Bytes.h Byteswap.h Gtypes.h GuiTypes.h KeySymbols.h MessageTypes.h Riostream.h Rtypes.h TApplication.h TApplicationImp.h TAtt3D.h TAttAxis.h TAttBBox2D.h TAttBBox.h TAttFill.h TAttLine.h TAttMarker.h TAttPad.h TAttText.h TBase64.h TBenchmark.h TBrowser.h TBrowserImp.h TBuffer3D.h TBuffer3DTypes.h TBuffer.h TCanvasImp.h TColorGradient.h TColor.h TContextMenu.h TContextMenuImp.h TControlBarImp.h TDatime.h TDirectory.h TEnv.h TError.h TException.h TExec.h TFileCollection.h TFileInfo.h TFolder.h TGuiFactory.h TInetAddress.h TInspectorImp.h TMacro.h TMathBase.h TMD5.h TMemberInspector.h TMessageHandler.h TNamed.h TNotifyLink.h TObject.h TObjectSpy.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 strlcpy.h snprintf.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 ROOT/RIntegerSequence.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 TClingRuntime.h TBaseClass.h TClassGenerator.h TClass.h TClassMenuItem.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 TToggleGroup.h TToggle.h TVirtualIsAProxy.h TVirtualRefProxy.h TVirtualStreamerInfo.h Getline.h /Users/fermi/dev/root/root-6.18.04/core/base/inc/LinkDef.h
Segmentation fault
make[2]: *** [core/G__Core.cxx] Error 1
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
make: *** [all] Error 2

Hi,

Can you please build 6.22.06 https://github.com/root-project/root/releases/tag/v6-22-06 (which has a fix for https://github.com/root-project/root/issues/6839)?

Thanks!

https://root.cern/download/?C=M;O=A;P=*[mM][aA][cC]*-11*

1 Like

The x86_64 version works well via rosseta2. The arm version of 6.23 is unable to work under macOS 11.0.1 because of the SDK of 11.1. Is 11.1 a public beta version of macOS?

It’s built successfully! And the hsimple.C runs 10 times faster than my 2012 MBP 13inch!!! That’s awesome.

PS. imt, xrootd, tbb have to be disabled.

1 Like

@shenyp09 super cool! Can you please share with us why imt, xrootd, tbb should be disabled? If there is something broken, please feel free to open GH issue: https://github.com/root-project/root/issues

Thanks a lot!

tbb: (enabling imt will sequentially enables tbb)
TBB-build-err.log.txt (4.0 KB)
CMake Error at /Users/fermi/dev/root/build/TBB-prefix/src/TBB-stamp/TBB-build-Release.cmake:49 (message):
Command failed: 2
‘make’ ‘compiler=clang’ ‘cpp0x=1’ ‘CXXFLAGS= -mno-rtm -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk’ ‘CPLUS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++’ ‘CONLY=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc’ ‘LDFLAGS= -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk’
See also
/Users/fermi/dev/root/build/TBB-prefix/src/TBB-stamp/TBB-build-*.log
make[2]: *** [TBB-prefix/src/TBB-stamp/TBB-build] Error 1
make[1]: *** [CMakeFiles/TBB.dir/all] Error 2
make: *** [all] Error 2

xrootd:
In file included from input_line_16:34:
/Users/fermi/dev/root/build/include/TMPWorkerTree.h:15:2: fatal error: module file ‘/Users/fermi/dev/root/build/lib/std.pcm’ is out of date and needs
to be rebuilt: signature mismatch
#include “TMPWorker.h”
^
/Users/fermi/dev/root/build/include/TMPWorkerTree.h:15:2: note: imported by module ‘MultiProc’ in
‘/Users/fermi/dev/root/build/lib/MultiProc.pcm’
Error: /Users/fermi/dev/root/build/bin/rootcling: compilation failure (/Users/fermi/dev/root/build/lib/libTreePlayer3ecc4b37e4_dictUmbrella.h)
make[2]: *** [tree/treeplayer/G__TreePlayer.cxx] Error 1
make[1]: *** [tree/treeplayer/CMakeFiles/G__TreePlayer.dir/all] Error 2
make: *** [all] Error 2

Thanks for reporting!

Looks like TBB is really broken on ARM Mac (cc: @Axel the error does not look not very good: unknown/unsupported architecture name for: -arch armv4t).

About second failure can you please just delete all *.pcm files here /Users/fermi/dev/root/build/lib/ and rebuild from scratch?

You have to disable TBB for now. There are two ingredients here:

  • Intel says there are no plans to support their stinkin’ chips.
  • There’s a patch out there that enables support.

We will need to patch our tbb sources (CMake external voodoo post-unpack, pre-build patch step) to add support. I didn’t find the time yet, maybe @oshadura can help?

Axel.

1 Like

@Axel, the same problem, I will add it as GH issue and try to fix as soon as I will have time.

1 Like

It works to delete all *.pcm and rebuild to support xrootd.

BTW: a lot of ld warnings like below are reported. I’m not sure whether I should concern about these warnings or not.

ld: warning: direct access in function 'TEveVSD::SetBranchAddresses()' from file 'CMakeFiles/Eve.dir/src/TEveVSD.cxx.o' to global weak symbol 'typeinfo for TEveRecTrackT<float>' from file 'CMakeFiles/Eve.dir/src/TEveVSDStructs.cxx.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

@shenyp09 thanks for the report! I will ping in case @linev, maybe it will be interesting for him to see…

It is rather information for @matevz. Could it be, that on Mac11 float and Float_t can be different?
While in the code and in the dictionary TEveRecTrackT<Float_t> is used.

Hhmmh, why are those typeinfos weak symbols? There are several explicit template instantiation in TEveVSD and TEveVector cxx files.

I have the same issue. How did you turn off TBB? Please reply asap…

I’ve tried ROOT version >= 6.22.06 with ttb, imt, xrootd disabled (-Dimt=OFF -Dtbb=OFF -Dbuiltin_xrootd=OFF) but no luck to build it successfully.

Could you share your command of building ROOT on ARM MacBook? Thank you very much!

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