Install ROOT on mac M2

Hello experts,

I’m installing ROOT on a new macbook, and the compilation works smoothly to the last minute until I see this PyMVA error. :sweat_smile:

Python3 is already installed:

(base) jonathan@Jonathans-MacBook-Air build %  python3
Python 3.10.6 (main, Sep 18 2022, 13:05:03) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

The entire error message see below.

Best,
Wenbo

[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/SamplingDistribution.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/SequentialProposal.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/SimpleInterval.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/SimpleLikelihoodRatioTestStat.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/SPlot.cxx.o
[100%] Linking CXX shared library ../../lib/libPyMVA.so
ld: warning: ignoring file /Users/jonathan/opt/anaconda3/lib/libpython3.9.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_PyBytes_AsString", referenced from:
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
      TMVA::PyMethodBase::PyStringAsString(_object*) in PyMethodBase.cxx.o
  "_PyCapsule_GetPointer", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyCapsule_Type", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyDict_Contains", referenced from:
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchGemm(_object*) in RModelParser_PyTorch.cxx.o
  "_PyDict_GetItemString", referenced from:
      TMVA::MethodPyAdaBoost::Train() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Train() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::SetupKerasModel(bool) in MethodPyKeras.cxx.o
      TMVA::MethodPyKeras::GetKerasBackend() in MethodPyKeras.cxx.o
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
      TMVA::MethodPyKeras::GetMvaValues(long long, long long, bool) in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Train() in MethodPyRandomForest.cxx.o
      ...
  "_PyDict_New", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >, std::__1::vector<TMVA::Experimental::SOFIE::ETensorType, std::__1::allocator<TMVA::Experimental::SOFIE::ETensorType> >) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::PyMethodBase(TString const&, TMVA::Types::EMVA, TString const&, TMVA::DataSetInfo&, TString const&) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyMethodBase(TMVA::Types::EMVA, TMVA::DataSetInfo&, TString const&) in PyMethodBase.cxx.o
  "_PyDict_SetItemString", referenced from:
      TMVA::MethodPyAdaBoost::ProcessOptions() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::Train() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::ReadModelFromFile() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::ProcessOptions() in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::Train() in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::ReadModelFromFile() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::SetupKerasModel(bool) in MethodPyKeras.cxx.o
      ...
  "_PyErr_Format", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyErr_Print", referenced from:
      TMVA::PyMethodBase::PyRunString(TString, TString, int) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyRunString(TString, _object*, _object*) in PyMethodBase.cxx.o
  "_PyErr_SetString", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyExc_AttributeError", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyExc_RuntimeError", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyFloat_AsDouble", referenced from:
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchGemm(_object*) in RModelParser_PyTorch.cxx.o
  "_PyGILState_Ensure", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyGILState_Release", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyImport_AddModule", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >, std::__1::vector<TMVA::Experimental::SOFIE::ETensorType, std::__1::allocator<TMVA::Experimental::SOFIE::ETensorType> >) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyImport_Import", referenced from:
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyImport_ImportModule", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyList_GetItem", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasPermute(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasReLU(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasSelu(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasSigmoid(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasDense(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::AddKerasLayer(TMVA::Experimental::SOFIE::RModel&, _object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      ...
  "_PyList_SetItem", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::AddKerasLayer(TMVA::Experimental::SOFIE::RModel&, _object*) in RModelParser_Keras.cxx.o
  "_PyList_Size", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchTranspose(_object*) in RModelParser_PyTorch.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >, std::__1::vector<TMVA::Experimental::SOFIE::ETensorType, std::__1::allocator<TMVA::Experimental::SOFIE::ETensorType> >) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::GetDataFromList(_object*) in PyMethodBase.cxx.o
  "_PyLong_AsLong", referenced from:
      TMVA::MethodPyKeras::SetupKerasModel(bool) in MethodPyKeras.cxx.o
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
      TMVA::MethodPyTorch::ProcessOptions() in MethodPyTorch.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasPermute(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchGemm(_object*) in RModelParser_PyTorch.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchConv(_object*) in RModelParser_PyTorch.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchTranspose(_object*) in RModelParser_PyTorch.cxx.o
      ...
  "_PyLong_FromLong", referenced from:
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
      TMVA::MethodPyTorch::Train() in MethodPyTorch.cxx.o
  "_PyModule_GetDict", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >, std::__1::vector<TMVA::Experimental::SOFIE::ETensorType, std::__1::allocator<TMVA::Experimental::SOFIE::ETensorType> >) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_PyObject_CallFunctionObjArgs", referenced from:
      TMVA::MethodPyTorch::GetMvaValues(long long, long long, bool) in MethodPyTorch.cxx.o
  "_PyObject_CallMethod", referenced from:
      TMVA::MethodPyAdaBoost::GetMvaValues(long long, long long, bool) in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::GetMvaValue(double*, double*) in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::GetMulticlassValues() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::GetMvaValues(long long, long long, bool) in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::GetMvaValue(double*, double*) in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::GetMulticlassValues() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::GetMvaValues(long long, long long, bool) in MethodPyKeras.cxx.o
      ...
  "_PyObject_CallObject", referenced from:
      TMVA::PyMethodBase::Eval(TString) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::Serialize(TString, _object*) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::UnSerialize(TString, _object**) in PyMethodBase.cxx.o
  "_PyObject_GetAttrString", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::CreateRanking() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::CreateRanking() in MethodPyGTB.cxx.o
      TMVA::MethodPyKeras::Init() in MethodPyKeras.cxx.o
      TMVA::MethodPyRandomForest::Init() in MethodPyRandomForest.cxx.o
      TMVA::MethodPyRandomForest::CreateRanking() in MethodPyRandomForest.cxx.o
      ...
  "_PyObject_Repr", referenced from:
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
  "_PyRun_SimpleFileExFlags", referenced from:
      TMVA::MethodPyTorch::SetupPyTorchModel(bool) in MethodPyTorch.cxx.o
  "_PyRun_StringFlags", referenced from:
      TMVA::MethodPyKeras::SetupKerasModel(bool) in MethodPyKeras.cxx.o
      TMVA::MethodPyTorch::ProcessOptions() in MethodPyTorch.cxx.o
      TMVA::MethodPyTorch::Init() in MethodPyTorch.cxx.o
      TMVA::PyMethodBase::PyRunString(TString, TString, int) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyRunString(TString, _object*, _object*) in PyMethodBase.cxx.o
  "_PyTuple_GetItem", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasPermute(_object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::PyMethodBase::GetDataFromTuple(_object*) in PyMethodBase.cxx.o
  "_PyTuple_Size", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::MakeKerasPermute(_object*) in RModelParser_Keras.cxx.o
      TMVA::PyMethodBase::GetDataFromTuple(_object*) in PyMethodBase.cxx.o
  "_PyUnicode_AsEncodedString", referenced from:
      TMVA::MethodPyKeras::Train() in MethodPyKeras.cxx.o
  "_PyUnicode_AsUTF8String", referenced from:
      TMVA::PyMethodBase::PyStringAsString(_object*) in PyMethodBase.cxx.o
  "_PyUnicode_FromString", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::INTERNAL::AddKerasLayer(TMVA::Experimental::SOFIE::RModel&, _object*) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::INTERNAL::MakePyTorchGemm(_object*) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_Py_BuildValue", referenced from:
      TMVA::PyMethodBase::Eval(TString) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::Serialize(TString, _object*) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::UnSerialize(TString, _object**) in PyMethodBase.cxx.o
  "_Py_Finalize", referenced from:
      TMVA::PyMethodBase::PyFinalize() in PyMethodBase.cxx.o
  "_Py_GetProgramName", referenced from:
      TMVA::PyMethodBase::Py_GetProgramName() in PyMethodBase.cxx.o
  "_Py_Initialize", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
      TMVA::Experimental::SOFIE::PyTorch::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >, std::__1::vector<TMVA::Experimental::SOFIE::ETensorType, std::__1::allocator<TMVA::Experimental::SOFIE::ETensorType> >) in RModelParser_PyTorch.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
  "_Py_IsInitialized", referenced from:
      TMVA::PyMethodBase::PyMethodBase(TString const&, TMVA::Types::EMVA, TString const&, TMVA::DataSetInfo&, TString const&) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyIsInitialized() in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyInitialize() in PyMethodBase.cxx.o
      TMVA::PyMethodBase::PyMethodBase(TMVA::Types::EMVA, TMVA::DataSetInfo&, TString const&) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::Eval(TString) in PyMethodBase.cxx.o
      TMVA::PyMethodBase::Serialize(TString, _object*) in PyMethodBase.cxx.o
  "_Py_SetProgramName", referenced from:
      TMVA::PyMethodBase::PySetProgramName(TString) in PyMethodBase.cxx.o
  "__Py_Dealloc", referenced from:
      TMVA::MethodPyAdaBoost::Init() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::GetMvaValues(long long, long long, bool) in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::GetMvaValue(double*, double*) in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyAdaBoost::CreateRanking() in MethodPyAdaBoost.cxx.o
      TMVA::MethodPyGTB::Init() in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::GetMvaValues(long long, long long, bool) in MethodPyGTB.cxx.o
      TMVA::MethodPyGTB::GetMvaValue(double*, double*) in MethodPyGTB.cxx.o
      ...
  "__Py_NoneStruct", referenced from:
      TMVA::Experimental::SOFIE::PyKeras::Parse(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in RModelParser_Keras.cxx.o
  "__Py_TrueStruct", referenced from:
      TMVA::MethodPyKeras::GetKerasBackend() in MethodPyKeras.cxx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libPyMVA.so] Error 1
make[1]: *** [tmva/pymva/CMakeFiles/PyMVA.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/ToyMCImportanceSampler.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/ToyMCSampler.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/ToyMCStudy.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/UniformProposal.cxx.o
[100%] Building CXX object roofit/roostats/CMakeFiles/RooStats.dir/src/UpperLimitMCSModule.cxx.o
[100%] Linking CXX shared library ../../lib/libRooStats.so
[100%] Built target RooStats
make: *** [all] Error 2
(base) jonathan@Jonathans-MacBook-Air build %  python3
Python 3.10.6 (main, Sep 18 2022, 13:05:03) [Clang 14.0.0 (clang-1400.0.29.102)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

HI @wenboma!

Are you planning to use TMVA, the package inside ROOT for machine learning? Since this is quite specialized, most users don’t use it. If that also applies to you, you should consider just not building TMVA. You can disable it by passing the -Dtmva=OFF flag to CMake (see building ROOT from source).

If this is not an acceptable solution for you, let us know.

Cheers,
Jonas

Dear @jonas ,

We plan to use the BDT of TMVA. Now we managed to install ROOT on other personal laptops for students. But it is quite appreciated we could get straightforward solutions for the M2 chip.

Best,
Wenbo

Hi, I think the problem is with your Python installation, look at this line:

ld: warning: ignoring file /Users/jonathan/opt/anaconda3/lib/libpython3.9.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

It seems to me like you enabled some anaconda environment that was not built for the M2, and ROOT is picking that one up. And what confuses me is that in the example where you showed that Python is already installed, it shows Python 3.10 and not Python 3.9 like in the error message.

Can you try to remove/disable that anaconda environment with Python 3.9?