Skip to content

Add support for aarch64 musl#569

Merged
zanieb merged 18 commits intomainfrom
zb/aarch64-musl
Aug 28, 2025
Merged

Add support for aarch64 musl#569
zanieb merged 18 commits intomainfrom
zb/aarch64-musl

Conversation

@zanieb
Copy link
Copy Markdown
Member

@zanieb zanieb commented Mar 19, 2025

Closes #87

Does not include the +static variant as I was having a hard time getting the bzip2 build passing. I'll open a new issue to track that.

Related #484

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented Mar 19, 2025

The failure is

m4> checking for gcc... /usr/bin/x86_64-linux-musl-gcc
m4> checking whether the C compiler works...
m4> no

which is unsurprising

@jakeybrown92
Copy link
Copy Markdown

Do we know when is likely to be released? currently blocking running on latest arm64 on mac and inside our arm64 runner builds

docker run -it --platform=linux/arm64 ghcr.io/astral-sh/uv:python3.10-alpine uv python install 3.12
error: No download found for request: cpython-3.12-linux-aarch64-musl

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented May 7, 2025

@jakeybrown92 not anytime soon, it's non-trivial as mentioned several times (e.g., #87 (comment)).

@jakeybrown92
Copy link
Copy Markdown

@zanieb fair enough.. I thought you meant the fix was non trivial. So there isn't currently any workaround when using alpine on latest arm64?

@zanieb
Copy link
Copy Markdown
Member Author

zanieb commented May 7, 2025

I would use the Python versions from the distribution instead of the uv managed ones for now.

@jakeybrown92
Copy link
Copy Markdown

@zanieb okay thanks. We're currently doing that but just wanted to explore UV, but don't really want to change OS. No worries. Appreciate the replies

@zanieb zanieb force-pushed the zb/aarch64-musl branch 2 times, most recently from 898522a to 7275200 Compare August 20, 2025 17:09
@zanieb zanieb removed the libc:musl label Aug 20, 2025
Comment thread cpython-unix/build.py
extra_host_cflags = []
extra_host_ldflags = []

# Add compiler-rt for aarch64-musl to resolve missing builtins
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Honestly I don't understand why we need to be explicit about this.

Without this, the bzip2 and openssl builds fail with missing symbols (it's possible more do too, I didn't play whackamole for long).

Copy link
Copy Markdown
Collaborator

@geofft geofft left a comment

Choose a reason for hiding this comment

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

This seems fine with me if you think it's in a state to ship. We can throw "learn how compiler-rt works" onto the todo list...

@zanieb zanieb force-pushed the zb/aarch64-musl branch 5 times, most recently from 5dfed3c to cfc67e0 Compare August 27, 2025 21:57
@zanieb zanieb removed platform:linux Specific to the Linux platform arch:aarch64 libc:musl labels Aug 27, 2025
@zanieb zanieb marked this pull request as ready for review August 28, 2025 12:53
@zanieb zanieb merged commit fd9784e into main Aug 28, 2025
120 checks passed
@zanieb zanieb deleted the zb/aarch64-musl branch August 28, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

musl-based aarch64 build

3 participants