Skip to content

Commit 0685103

Browse files
committed
Improve PyPy ARM64 QEMU stability with modern QEMU 8.x and JIT workarounds
Two critical improvements for PyPy ARM64 wheel builds on QEMU emulation: 1. Install modern QEMU 8.x using tonistiigi/binfmt - Added step BEFORE docker/setup-buildx-action - QEMU 8.x is much more stable for PyPy JIT - Uses 'docker run --rm --privileged tonistiigi/binfmt --install all' 2. PyPy QEMU stability workarounds in both Dockerfiles - ENV PYPY_DISABLE_JIT=1 # Disable JIT compiler - ENV PYPY_GC_NTHREADS=1 # Single-threaded GC - ENV PYPY_FORCE_CPU_COUNT=1 # Force single CPU Why these changes: - PyPy's JIT compiler can be unstable under QEMU ARM64 emulation - Modern QEMU 8.x has much better ARM64 support than older versions - Single-threaded execution avoids race conditions in QEMU - Disabling JIT trades performance for stability (acceptable for CI) Files modified: - .github/workflows/wheels-arm64.yml: Add QEMU 8.x install step - docker/Dockerfile.pypy-bookworm-manylinux-arm64: Add PyPy ENV vars - docker/Dockerfile.pypy-trixie-manylinux-arm64: Add PyPy ENV vars This should resolve the recurring PyPy ARM64 build failures on GitHub Actions runners with QEMU emulation.
1 parent e3115f0 commit 0685103

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/wheels-arm64.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ jobs:
101101
# QEMU + Docker Buildx Setup
102102
# ============================================================
103103

104+
- name: Install modern QEMU (tonistiigi/binfmt)
105+
run: |
106+
echo "==> Installing modern QEMU 8.x via tonistiigi/binfmt"
107+
echo "This provides much better stability for PyPy on ARM64 emulation"
108+
docker run --rm --privileged tonistiigi/binfmt --install all
109+
echo "✅ Modern QEMU installed"
110+
104111
- name: Set up QEMU for ARM64 emulation
105112
uses: docker/setup-qemu-action@v3
106113
with:

docker/Dockerfile.pypy-bookworm-manylinux-arm64

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ LABEL maintainer="The Crossbar.io Project <support@crossbario.com>"
66
LABEL manylinux.tag="manylinux_2_36_aarch64"
77
LABEL glibc.version="2.36"
88

9+
# PyPy QEMU stability workarounds
10+
# Disable JIT compiler and force single-threaded execution for stable QEMU emulation
11+
ENV PYPY_DISABLE_JIT=1
12+
ENV PYPY_GC_NTHREADS=1
13+
ENV PYPY_FORCE_CPU_COUNT=1
14+
915
# Install build essentials for wheel compilation
1016
RUN apt-get update && apt-get install -y --no-install-recommends \
1117
build-essential \

docker/Dockerfile.pypy-trixie-manylinux-arm64

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ LABEL maintainer="The Crossbar.io Project <support@crossbario.com>"
66
LABEL manylinux.tag="manylinux_2_38_aarch64"
77
LABEL glibc.version="2.38"
88

9+
# PyPy QEMU stability workarounds
10+
# Disable JIT compiler and force single-threaded execution for stable QEMU emulation
11+
ENV PYPY_DISABLE_JIT=1
12+
ENV PYPY_GC_NTHREADS=1
13+
ENV PYPY_FORCE_CPU_COUNT=1
14+
915
# Install build essentials for wheel compilation
1016
RUN apt-get update && apt-get install -y --no-install-recommends \
1117
build-essential \

0 commit comments

Comments
 (0)