Skip to content

Fix 1877#1905

Merged
oberstet merged 6 commits into
crossbario:masterfrom
oberstet:fix_1877
Jul 2, 2026
Merged

Fix 1877#1905
oberstet merged 6 commits into
crossbario:masterfrom
oberstet:fix_1877

Conversation

@oberstet

@oberstet oberstet commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

fixes #1877

oberstet added 4 commits July 2, 2026 00:01
Build musllinux (Alpine / musl libc) wheels so `pip`/`uv install autobahn` on
Alpine gets a prebuilt wheel instead of a failing source build (the
python-build-standalone interpreter uv downloads is clang-built, and its
sysconfig --rtlib=compiler-rt flag breaks Alpine's gcc). Building inside the
pypa musllinux container uses its gcc-built /opt/python, so NVX compiles and
auditwheel auto-tags musllinux_1_2.

- wheels-docker.yml: add a musllinux_1_2_x86_64 matrix entry. Since the pypa
  musllinux image ships no PyPy, build CPython only via a new `build_envs`
  matrix field (cpy311-314) instead of `just build-all` (which includes
  pypy311). The manylinux entry keeps building all.
- wheels-arm64.yml: add 4 CPython musllinux_1_2_aarch64 entries (cpy311-314),
  mirroring the manylinux CPython entries.

No build-script/recipe changes needed: build-arm64-wheel.sh only installs
curl/git if absent (preinstalled in the musllinux image), and auditwheel
auto-detects musl.

Verified locally on asgard1 (both arches: x86_64 native + aarch64 under QEMU,
pulling the pypa musllinux images): uv selects the musl /opt/python GIL
interpreter, NVX compiles under gcc with no --rtlib error, and the wheels are
correctly tagged, e.g. autobahn-26.7.1.dev1-cp314-cp314-musllinux_1_2_x86_64.whl
and ...-musllinux_1_2_aarch64.whl. Release wiring (release.yml + fileset targets
+ docs) follows in a second commit once the build jobs are green on CI.

Note: This work was completed with AI assistance (Claude Code).
…ssbario#1877)

The x86_64 musllinux build job failed in "Validate wheels integrity" with
"/usr/bin/python3: No module named pip". The build itself succeeded and produced
correctly-tagged wheels (cp311-cp314, GIL ABI, musllinux_1_2_x86_64); only the
validation tooling tripped.

Root cause: between steps, GitHub reconstructs PATH from $GITHUB_PATH and drops
the /opt/python entries added in "Setup Python environment", so `python3` falls
back to the container's system interpreter. On manylinux (AlmaLinux) that
interpreter bundles pip, so validation worked; on musllinux (Alpine) the system
python3 has no pip, so `python3 -m pip install ... twine` hard-failed. The
existing `ensurepip` fallback is a no-op on Alpine (built without ensurepip).

Fix: in the validation step, if `python3 -m pip` is unavailable, re-expose a
pypa /opt/python CPython (all bundle pip) on PATH before installing twine. This
is a no-op on manylinux (system python3 already has pip), so manylinux behavior
is unchanged; it only kicks in on musllinux.

Note: This work was completed with AI assistance (Claude Code).
@oberstet

oberstet commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

oh, nice, this looks good already!

  - autobahn-26.7.1.dev1-cp311-cp311-musllinux_1_2_aarch64.whl
    - cp311-cp311 → GIL ABI (not cp311t free-threaded) ✓
    - musllinux_1_2_aarch64 → correct musl platform tag for arm64 ✓
    - NVX ENABLED → native extension compiled under the container's gcc, no --rtlib breakage ✓
image

…ssbario#1877)

Second musllinux-only glitch in "Validate wheels integrity": after the pip fix,
twine ran and PASSED, but the next line failed with "bad substitution".

Root cause: the musllinux (Alpine) container ships no bash, so GitHub Actions
runs the step under busybox sh (ash). `TWINE_EXIT=${PIPESTATUS[0]}` uses a bash
array, which ash does not support -> "bad substitution". manylinux (AlmaLinux)
has bash, so it never hit this.

Fix: capture twine's exit status POSIX-style -- redirect output to a file inside
an if/else and read $? -- instead of `tee` + ${PIPESTATUS[0]}. Output is still
shown (cat) and the error-grep on the file is unchanged. Works identically under
bash (manylinux) and ash (musllinux).

Note: This work was completed with AI assistance (Claude Code).
@oberstet

oberstet commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

very good, phase 1 is done, artifacts produced:


artifacts-arm64-cpython-3.11-manylinux_2_28_aarch64-634621de1cdf6c17c6b4cba4e4627780f6d5aae6be319a695900ea08a3e360b4
	1.95 MB 	
sha256:7a8d86582b5638415d73f7366b1e45c21d55addf6392248b20e5cf090b3b2ab9
	
artifacts-arm64-cpython-3.11-musllinux_1_2_aarch64-d6be834ea17e3c26ec6681ceff301121ab5412ead626daf1a2c93c2e8756365a
	2.98 MB 	
sha256:0996499e6d10b878a464f939c7f8a882b774ea6a979168d3c573cc845c831c61
	
artifacts-arm64-cpython-3.12-manylinux_2_28_aarch64-9af3e32fb5e479fb43606738ec03048f848e647c9ba15aa24c8954cc911c50b1
	1.95 MB 	
sha256:ab989cd795e41a250707265737c1e8c4dd08d3bccb6ba1b6a71e5015cda5326d
	
artifacts-arm64-cpython-3.12-musllinux_1_2_aarch64-8fd7461626875560c8f8457fb845c7c32508f3e8e6ce5a5bddf23be92ea289ed
	2.98 MB 	
sha256:47146f84d49c2180a9147876efa5db8997b6256267dbb566af833008b3440a93
	
artifacts-arm64-cpython-3.13-manylinux_2_28_aarch64-4a494df9d8c4be2885d2e6e43eb185b542440a38bcf46133a19382816dd60b3d
	1.95 MB 	
sha256:b3504bd79aff04024e0b1ce132316804f9b29371165de231bb95691acd4250e0
	
artifacts-arm64-cpython-3.13-musllinux_1_2_aarch64-33bb5d033770baae73d4792163b42289145628c6abdc827213e2407fa7389c64
	2.98 MB 	
sha256:2a9a51f0b98f0f9b92cdc12b400f7eed5a6cc749d2d7a39ffe050c3f919f7650
	
artifacts-arm64-cpython-3.14-manylinux_2_28_aarch64-50fb43b951a514364295894410e15626082933bf67f50e2bfaed3522fed0bf73
	631 KB 	
sha256:40875fdd4f2e8389837ca4a592559efe156b38cc3c238350141dd34da27d6991
	
artifacts-arm64-cpython-3.14-musllinux_1_2_aarch64-b447fd46065e2ce0c8e2cf43cb66d94d3b2285b450c508f95666c701863dfd61
	631 KB 	
sha256:2c978ba283d74998ea6b28937547600a39282ebcd461e7f337e8cab2818927ba
	
artifacts-arm64-pypy-3.11-bookworm-manylinux_2_36_aarch64-6f40e26056fb37363a3a15b1f7bbff7b12f880d824f69be651983a5b995014de
	605 KB 	
sha256:49491af2f7605c50ff78e720a9c2128311d9f11f7c062c54219a6c7dd3bff1a5
	
artifacts-arm64-pypy-3.11-trixie-manylinux_2_38_aarch64-2b673da3b731b4bc6e3da84bfff047353c276fed4e11584f99b6cfc474e24035
	605 KB 	
sha256:059b7a30e9bba6a95f7319dd506d127ad216b25ff62cc3ae1f34cecc860d9a66
	

Phase 1 (build jobs) is green on CI; this wires the musllinux_1_2 wheels
(CPython 3.11-3.14, x86_64 + aarch64) through the release pipeline so they are
published alongside the manylinux wheels.

release.yml:
- Artifact discovery: +5 job outputs and +5 findArtifact() prefix lookups
  (x86_64 bundle `artifacts-musllinux_1_2_x86_64`; 4 per-interpreter aarch64
  `artifacts-arm64-cpython-3.NN-musllinux_1_2_aarch64`). findArtifact matches by
  prefix, so the runtime meta-checksum suffix on each artifact is handled.
- Downloads: +5 download-artifact-verified steps in each of the 3 release jobs
  (release-development, release-nightly, release-stable/PyPI) — x86_64 into
  wheelhouse/ (dist/ for PyPI), aarch64 into wheelhouse-arm64/ (dist/ for PyPI),
  reusing the existing bundle dirs. Each bundle carries its own CHECKSUMS.sha256;
  as with the existing 6 aarch64 bundles, the directory-level re-verify checks the
  surviving checksum file — the authoritative gate remains check-release-fileset.
- Fileset gates (x3): +8 targets each — cpyNN-linux-{x86_64,aarch64}-musllinux_1_2
  for NN in 11/12/13/14. The action's ABI-tag regex (`musllinux_1_2` vs the wheel
  platform tag) cleanly separates musllinux from manylinux, so a missing or
  mis-tagged musllinux wheel now fails the release in strict mode.

docs/wheels-inventory.rst: musllinux subsections for x86_64 and aarch64 (CPython
only; PyPy-on-musl noted as follow-up) + two musllinux_1_2 platform-tag entries.

docs/changelog.rst: 26.7.1 Build & CI/CD bullet for crossbario#1877.

Also tidy the build-metadata banners in wheels-docker.yml and wheels-arm64.yml so
musl builds no longer print "manylinux Build Information" / "Manylinux Tag"
(cosmetic; the wheels were always correctly tagged by auditwheel).

Note: This work was completed with AI assistance (Claude Code).
@oberstet oberstet merged commit e9eebbe into crossbario:master Jul 2, 2026
45 checks passed
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.

[ENHANCEMENT] Publish musllinux wheels (Alpine / musl libc)

1 participant