Skip to content

zlib-ng: add build-zlib-ng.yml for riscv64 wheels - #1022

Merged
luhenry merged 2 commits into
mainfrom
zlib-ng
Sep 6, 2026
Merged

zlib-ng: add build-zlib-ng.yml for riscv64 wheels#1022
luhenry merged 2 commits into
mainfrom
zlib-ng

Conversation

@luhenry

@luhenry luhenry commented Sep 6, 2026

Copy link
Copy Markdown
Member

Drop-in replacement for the zlib/gzip stdlib modules, compiled against a vendored zlib-ng (statically linked). Upstream publishes no riscv64 wheel.

Mirrors upstream's ci.yml deploy job.

Differs from upstream

  • Nothing beyond the riscv64 image.

Testing

  • same as upstream

License: OK

Built and tested locally under QEMU (manylinux_2_39_riscv64 and musllinux_1_2_riscv64) on cp312: 197 passed, 2 skipped, including the RVV-accelerated code path.

zlib-ng's riscv_check_features() runtime-probes the V extension with an
inline vsetvli instruction; on the riscv64 CI hardware these wheels build
on, that probe itself raises SIGILL, crashing every process that touches
zlib_ng (zng_deflateInit2, hit at import time by all three test modules).

Patch setup.py to pass zlib-ng's own --without-rvv to configure on
riscv64, falling back to the portable C code paths. See the patch's
Upstream-Status note for why this can't be done via CMAKE_ARGS or a
CIBW_ENVIRONMENT knob (the Linux build path drives ./configure directly,
with no argument-passthrough hook).
@luhenry
luhenry merged commit af77ab6 into main Sep 6, 2026
13 checks passed
@luhenry
luhenry deleted the zlib-ng branch September 6, 2026 13:31
@luhenry luhenry linked an issue Sep 6, 2026 that may be closed by this pull request
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.

zlib-ng riscv64 support

1 participant