Hello,
I have some problems with pyROOT after installing MacOS Sequoia 15.1 with XCode 16.1
I regret upgrading.
I was using conda to manage both root and python3.11, however after the upgrade (and even after reinstalling) importing ROOT in python yields:
Python 3.11.10 | packaged by conda-forge | (main, Oct 16 2024, 01:26:25) [Clang 17.0.6 ] on Darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
In module 'Darwin':
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/OSByteOrder.h:14:1:** **error:** **'_OSSwapInt16' has different definitions in different modules; definition in**
**module 'Darwin.libkern.OSByteOrder' first difference is return type is**
**'uint16_t' (aka 'unsigned short')**
uint16_t
**^~~~~~~~**
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/_OSByteOrder.h:49:1: note:** but in 'DarwinFoundation.OSByteOrder' found different return type '__uint16_t'
(aka 'unsigned short')
__uint16_t
**^~~~~~~~~~**
In module 'Darwin':
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/OSByteOrder.h:24:1:** **error:** **'_OSSwapInt32' has different definitions in different modules; definition in**
**module 'Darwin.libkern.OSByteOrder' first difference is return type is**
**'uint32_t' (aka 'unsigned int')**
uint32_t
**^~~~~~~~**
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/_OSByteOrder.h:59:1: note:** but in 'DarwinFoundation.OSByteOrder' found different return type '__uint32_t'
(aka 'unsigned int')
__uint32_t
**^~~~~~~~~~**
In module 'Darwin':
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/OSByteOrder.h:40:1:** **error:** **'_OSSwapInt64' has different definitions in different modules; definition in**
**module 'Darwin.libkern.OSByteOrder' first difference is return type is**
**'uint64_t' (aka 'unsigned long long')**
uint64_t
**^~~~~~~~**
**/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/arm/_OSByteOrder.h:75:1: note:** but in 'DarwinFoundation.OSByteOrder' found different return type '__uint64_t'
(aka 'unsigned long long')
__uint64_t
**^~~~~~~~~~**
I then tried to download a precompiled binary for version 6.34.00 and root works, however when I try to import it in python3.11 (installed via brew) I get a segmentation fault:
python3.11
Python 3.11.10 (main, Sep 7 2024, 01:03:31) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import root
>>>
>>>
>>>
>>> import ROOT
*** Break *** segmentation violation
[/Users/giumtt/root/lib/libcppyy_backend.so] (anonymous namespace)::TExceptionHandlerImp::HandleException(int) (no debug info)
[/Users/giumtt/root/lib/libCore.so] TUnixSystem::DispatchSignals(ESignals) (no debug info)
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] type_traverse (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] type_traverse (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_collect_main (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_collect_with_callback (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_alloc (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyList_New (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_enter_block (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PySymtable_Build (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyAST_Compile (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_CompileStringObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_compile (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyVectorcall_Call (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin___import__ (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] run_eval_code_obj (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] run_mod (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyRun_InteractiveOneObjectEx (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_InteractiveLoopObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_AnyFileObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyRun_AnyFileExFlags (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] pymain_run_stdin (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_RunMain (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_BytesMain (no debug info)
[/usr/lib/dyld] start (no debug info)
*** Break *** segmentation violation
[/Users/giumtt/root/lib/libcppyy_backend.so] (anonymous namespace)::TExceptionHandlerImp::HandleException(int) (no debug info)
[/Users/giumtt/root/lib/libCore.so] TUnixSystem::DispatchSignals(ESignals) (no debug info)
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] type_traverse (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] type_traverse (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_collect_main (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_collect_with_callback (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] gc_alloc (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyList_New (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_enter_block (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] symtable_visit_stmt (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PySymtable_Build (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyAST_Compile (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_CompileStringObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_compile (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyVectorcall_Call (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin___import__ (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] run_eval_code_obj (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] run_mod (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyRun_InteractiveOneObjectEx (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_InteractiveLoopObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_AnyFileObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] PyRun_AnyFileExFlags (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] pymain_run_stdin (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_RunMain (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.10/Frameworks/Python.framework/Versions/3.11/Python] Py_BytesMain (no debug info)
[/usr/lib/dyld] start (no debug info)
Is there an easy way to have ROOT working with python? Am I doing something wrong?
I really hope there’s someone out there which knows the answer, I’ve been struggling for hours. Thanks in advance for your help!
ROOT Version: 6.30 (conda) / 6.34 (from binary file)
Platform: macOS 15.1.1 Sequoia