Python 3.14 MacOS x86_64 build errors
Reporting a bug
I am not quite sure if this is already captured in https://github.com/numba/llvmlite/issues/1281.
We are receiving errors during the build of SHAP on Python 3.14 on MacOS with x86_64 architecture. We are using the beta release llvmlite==0.46.0b1 currently and receiving an error:
Traceback (most recent call last):
File "/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/ffi.py", line 141, in __getattr__
return self._fntab[name]
~~~~~~~~~~~^^^^^^
KeyError: 'LLVMPY_AddSymbol'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/ffi.py", line 122, in _load_lib
self._lib_handle = ctypes.CDLL(str(lib_path))
~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ctypes/__init__.py", line 462, in __init__
self._handle = _dlopen(self._name, mode)
~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: dlopen(/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/libllvmlite.dylib, 0x0006): tried: '/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/libllvmlite.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/libllvmlite.dylib' (no such file), '/private/var/folders/6c/pzd640_546q6_yfn24r65c_40000gn/T/cibw-run-8yjbefzk/cp314-macosx_x86_64/venv-test-x86_64/lib/python3.14/site-packages/llvmlite/binding/libllvmlite.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
during invocation of numba. See the complete pipeline here.
I checked on pypi and found this wheel: llvmlite-0.46.0b1-cp314-cp314-macosx_11_0_universal2.whl (37.3 MB view details) which suggest that they should work on x86_64 and arm64, but seems like they only work on arm64, or I am missing something?
- [ ] I have tried using the latest released version of llvmlite (most recent is visible in the change log (https://github.com/numba/llvmlite/blob/main/CHANGE_LOG).
- [ ] I have included a self contained code sample to reproduce the problem. i.e. it's possible to run as 'python bug.py'.
Hi @CloseChoice ,
Thanks for the report. To clarify, there is no macOS x86_64 support planned for llvmlite wheels going forward. We had macOS x86_64 deprecation PR merged after 0.45.1 release (see PR https://github.com/numba/llvmlite/pull/1298), which is therefore the last version that provides a macOS x86_64 wheel. (more context about planned deprecation is here- https://github.com/numba/numba/issues/10187)
About the universal2 wheel shipped for 0.46.0b1 release: that tag was unintentional. During the 0.46.0b1 wheel build, we changed the build environment (from using conda-based Python to GitHub Actions system Python). As a secondary effect of that change, and since GHA python was universal2, it ignored the arch spec and the macOS wheel was emitted with a universal2 tag on osx-arm64 wheel build. (see https://github.com/numba/llvmlite/issues/1319). It has been corrected now with https://github.com/numba/numba/pull/10274, which will correctly create macosx_11_0_arm64 tag.
Also, Numba and llvmlite now follow a formal tiered support policy, which defines the platforms we support for both wheels and conda packages. The rendered documentation is here: https://numba.readthedocs.io/en/latest/reference/support_tiers.html
Under the current policy, macOS x86_64 is not a Tier-1 supported target.
Again, apologies for the confusion caused by the 0.46.0b1 wheel. If you need macOS x86_64, please use llvmlite 0.45.1 wheel, which is the final release supporting that platform.
I hope this answer helps.
@swap357 thanks for the swift and exhaustive reply. That works for me and is good enough. I suppose llvmlite==0.45.1 does not support Python 3.14 though? Probably not a big deal, since more recent Apple silicon is running on arm64 anyways, so I think this is good enough, thanks.