gh-130478: Fixed HACL compilation failure on macOS Silicon#134188
gh-130478: Fixed HACL compilation failure on macOS Silicon#134188picnixz merged 7 commits intopython:mainfrom
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit b05d183 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134188%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
Don't forget to update the configure script (my bad, the build bots will need to be run twice because of your next commit) |
configure updated |
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit e89919d 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134188%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
Until the build bots are done, please do NOT commit anything to this branch (in particular, don't hit the "Update branch" button) |
|
@naizhao I forgot about this PR, can you merge main into it so that I rerun the bots to check that everything's fine? (and don't forget to regen-configure) |
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 5054d4b 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134188%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
(Failures on WASM are known) |
(cherry picked from commit ac75110) Co-authored-by: Sam Ng <hongsheng@gmail.com>
|
GH-135009 is a backport of this pull request to the 3.14 branch. |
…34188) (python#135009) pythongh-130478: fix HACL* build for macOS Silicon (pythonGH-134188) (cherry picked from commit ac75110) Co-authored-by: Sam Ng <hongsheng@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Fix: Prevent HACL compilation failure on macOS Silicon when not building universal binaries (#130478)
Problem:
In Python 3.14.0b1, compiling on macOS Silicon without the
--enable-universalsdkflag resulted in a compilation error: "unknown type name 'Lib_IntVector_Intrinsics_vec256'". This occurred because the previous fix for a similar issue (#123748, #130366, #129043) in theconfigureandconfigure.acscripts relied on the$UNIVERSAL_ARCHSvariable for conditional checks. However,$UNIVERSAL_ARCHSis only set to "universal2" when--enable-universalsdkis explicitly provided. When this flag is absent (as is the case when only targeting the native arm64 architecture),$UNIVERSAL_ARCHSdefaults to "32-bit", causing the conditional logic to fail and the necessary definitions for HACL not to be included.Solution:
This PR modifies the
configureandconfigure.acscripts to use the$build_cpuand$build_vendorvariables instead of$UNIVERSAL_ARCHSfor determining the target architecture. This approach ensures that the necessary HACL definitions are included when building on macOS with an arm64 architecture, even when--enable-universalsdkis not specified.The PR provides a quick fix based on
$build_cpuand$build_vendor. While functional, this PR aims for a more robust and maintainable solution by directly checking for the "aarch64" architecture in$build_cpu.Testing:
This fix has been tested successfully on macOS Silicon (arm64) when building Python 3.14.0b1 without the
--enable-universalsdkflag. The compilation now completes without the "unknown type name 'Lib_IntVector_Intrinsics_vec256'" error.