Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

The Python publish workflow fails for Linux aarch64 builds because the ring crate (used by rustls for TLS) fails to cross-compile from x86_64 to aarch64. The error:

error: #error "ARM assembler must define __ARM_ARCH"

Solution

Instead of cross-compiling on x86_64, use GitHub's native ARM runner (ubuntu-24.04-arm) for aarch64 builds. This produces native builds and avoids the cross-compilation issues with the ring crate's assembly code.

Changes

  • Modified the Linux build matrix to use different runners per architecture
  • x86_64: ubuntu-latest (unchanged)
  • aarch64: ubuntu-24.04-arm (native ARM runner)

Testing

After merging, trigger the publish workflow with workflow_dispatch to TestPyPI to verify the fix works.

The ring crate fails to cross-compile on x86_64 for aarch64 targets
due to missing __ARM_ARCH definition in the cross-compilation toolchain.

Using GitHub's native ARM runner (ubuntu-24.04-arm) instead of cross-compiling
avoids this issue and produces native aarch64 wheels.
@joshrotenberg joshrotenberg merged commit e33b1bd into main Jan 23, 2026
26 checks passed
@joshrotenberg joshrotenberg deleted the fix/python-linux-cross-compile branch January 23, 2026 20:40
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.

2 participants