Conversation
Mirrors upstream's cibuildwheel + scikit-build-core recipe as-is (no CIBW_ENVIRONMENT/CIBW_TEST_COMMAND overrides): pyproject.toml already sets SKBUILD_CMAKE_ARGS (FETCH_ZLIB_NG=ON among others) and the unittest-based test-command, so cibuildwheel picks both up unmodified from the checkout. zlib-ng (fetched via CMake FetchContent at build time) has confirmed riscv64 RVV dispatch support from the in-flight python-zlib-ng port. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
CMakeLists.txt's find_package(nanobind 2.4.0 CONFIG REQUIRED) rejects nanobind 3.x as a version mismatch, but pyproject.toml's build-system.requires carries no upper bound. nanobind 3.x requires Python >=3.10, so this reproduces on any architecture building cp310+ - it just never surfaced on upstream's own py3.9 leg. Constrain both the top-level and isolated build envs via CIBW_BEFORE_ALL + PIP_CONSTRAINT/PIP_BUILD_CONSTRAINT rather than disabling isolation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
cibuildwheel parses CIBW_ENVIRONMENT with bashlex; the unquoted semicolon-separated CMake arg list was read as multiple shell statements instead of one assignment, so cibuildwheel rejected the whole option as malformed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
stb_sprintf.h's stbsp__uintptr allowlist has no riscv64 entry, so it falls back to a 32-bit unsigned int on a 64-bit-pointer platform; every (stbsp__uintptr)ptr alignment check then narrows a pointer to 32 bits, which GCC 14 rejects as a hard error rather than a warning. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
CMakeLists.txt enables CMAKE_INTERPROCEDURAL_OPTIMIZATION for Release builds by default, and already turns it off for the bundled zlib-ng because "IPO has been reported to mess it up leading to illegal-instruction crash" on some platforms. gemmi's own code hits that same crash on riscv64: the wheel builds and installs fine, but the very first unittest dies with SIGILL. Disable LTO globally rather than only where upstream anticipated the problem. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
Disabling project-wide LTO did not fix the riscv64 SIGILL (identical crash, same test, same instruction pointer class) - so that was the wrong culprit. The crash is in test_align.py's very first test, which is also the first to read a real file through zlib (a .pdb.gz), pointing at the fetched zlib-ng's RVV-accelerated chunkset/inflate kernels instead. Pass -DWITH_RVV=OFF to fall back to zlib-ng's portable C implementation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Az13NcXsVZzzxXmaxxUEy7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gemmi0.7.5Compiles gemmi's C++ macromolecular-crystallography library and its nanobind Python bindings. Upstream publishes no riscv64 wheel.
Mirrors upstream's
wheels2.yml.Differs from upstream
Testing
License: OK