GH-130478: Fixed HACL compilation failure on macOS Silicon#134177
Closed
naizhao wants to merge 0 commit intopython:mainfrom
Closed
GH-130478: Fixed HACL compilation failure on macOS Silicon#134177naizhao wants to merge 0 commit intopython:mainfrom
naizhao wants to merge 0 commit 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 |
picnixz
reviewed
May 18, 2025
configure.ac
Outdated
| # isn't great, so it's disabled on ARM64. | ||
| AC_MSG_CHECKING([for HACL* SIMD128 implementation]) | ||
| if test "$UNIVERSAL_ARCHS" == "universal2"; then | ||
| if [[ "$build_cpu" == "aarch64" && "$build_vendor" == "apple" ]]; then |
Member
There was a problem hiding this comment.
Please keep the "UNIVERSAL_ARCHS" test as well and use test instead of [[ as it's more portable.
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Related Issue: