GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99108: Disable HACL SIMD code on older versions of Android by mhsmith · Pull Request #124304 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Sep 21, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The build is currently failing on Android x86-64:

/home/buildbot/android-sdk/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang -c -I../../../Modules/_hacl -I../../../Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -fno-strict-overflow
 -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/home/buildbot/git/python/cpython/cross-build/x86_64-linux-android/prefix/include  -I/home/buildbot/git/python/cpython/cross-build/x86_64-linux-android/prefix/include  -s
td=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I../../../Include/internal -I../../../Include/internal/mimalloc -IObjects -IIncl
ude -IPython -I. -I../../../Include   -fPIC -fPIC -DLINUX_NO_EXPLICIT_BZERO -msse -msse2 -msse3 -msse4.1 -msse4.2 -DHACL_CAN_COMPILE_VEC128 -o Modules/_hacl/Hacl_Hash_Blake2s_Simd128.o ../../../Modules/_hacl/Hacl_Hash_Blake2s_Sim
d128.c
../../../Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c:589:40: error: call to undeclared library function 'aligned_alloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    (Lib_IntVector_Intrinsics_vec128 *)KRML_ALIGNED_MALLOC(16,
                                       ^
../../../Modules/_hacl/include/krml/internal/target.h:133:39: note: expanded from macro 'KRML_ALIGNED_MALLOC'
#    define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y)

This is because aligned_alloc was only added to Android in API level 28, while we're building against level 21. So this PR disables the SIMD code completely when building against older Android versions.

  • Issue: Replace built-in hashlib with verified implementations from HACL* #99108

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mhsmith
Disable HACL SIMD code on older versions of Android
198a0b9
@mhsmith
mhsmith requested review from corona10 and erlend-aasland as code owners September 21, 2024 18:15
@bedevere-app bedevere-app Bot added the awaiting review label Sep 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 21, 2024
Replace built-in hashlib with verified implementations from HACL* #99108
Closed
@mhsmith mhsmith added the skip news label Sep 21, 2024
@mhsmith

mhsmith commented Sep 21, 2024

Copy link
Copy Markdown
Member Author

!buildbot android

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Sep 21, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @mhsmith for commit 198a0b9 🤖

The command will test the builders whose names match following regular expression: android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith mhsmith mentioned this pull request Sep 21, 2024
PEP 738: Mark as Final python/peps#3982
Merged
6 tasks done
@mhsmith

mhsmith commented Sep 21, 2024

Copy link
Copy Markdown
Member Author

The x86-64 builder wasn't ready earlier, but it's passed now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith mhsmith mentioned this pull request Sep 23, 2024
PEP 11: Add Android python/peps#3989
Merged
2 of 4 tasks
freakboy3742
freakboy3742 approved these changes Sep 23, 2024
View reviewed changes

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gpshead reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Sep 23, 2024
@freakboy3742
freakboy3742 merged commit 41e7992 into python:main Sep 23, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@freakboy3742 freakboy3742 freakboy3742 approved these changes
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mhsmith @bedevere-bot @freakboy3742
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.