Please read tips for efficient and successful posting and posting code
ROOT Version: 6.24.06
Platform: macos BigSur M1
_Compiler:_XCODE12
Hi guys,
i’m trying to compile root for apple m1 including pyroot libraries.
what i do is this.
git clone --branch v6-24-06 https://github.com/root-project/root.git root-src
mkdir root-build root-install && cd root-build
cmake -DCMAKE_INSTALL_PREFIX=../root-install -Dbuiltin_tbb=OFF -Dimt=OFF -DPYTHON3_EXECUTABLE=/usr/local/bin/python3 ../root-src | tee build.txt
cmake --build . -- install -j6 | tee install.txt
when I finished the compilation I run python3 and do the import of the ROOT library
but it outputs this
roany@Air-di-Roany root-build % python3
Python 3.8.9 (v3.8.9:a743f8192b, Apr 2 2021, 08:12:53)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "/Users/roany/root-install/lib/cppyy/__init__.py", line 60, in <module>
importlib.import_module(libcppyy_mod_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 657, in _load_unlocked
File "<frozen importlib._bootstrap>", line 556, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1101, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dlopen(/Users/roany/root-install/lib/libcppyy3_8.so, 2): no suitable image found. Did find:
/Users/roany/root-install/lib/libcppyy3_8.so: mach-o, but wrong architecture
/Users/roany/root-install/lib/libcppyy3_8.so: mach-o, but wrong architecture
/Users/roany/root-install/lib/libcppyy3_8.so: mach-o, but wrong architecture
/Users/roany/root-install/lib/libcppyy3_8.so: mach-o, but wrong architecture
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/roany/root-install/lib/ROOT/__init__.py", line 22, in <module>
import cppyy
File "/Users/roany/root-install/lib/cppyy/__init__.py", line 62, in <module>
raise ImportError(
ImportError: Failed to import libcppyy3_8. Please check that ROOT has been built for Python 3.8
what am i doing wrong?
the build log file:
build.txt (14.7 KB)
the install log file:
install.txt (1.2 MB)