Repository navigation
Conversation
luhenry
added a commit
that referenced
this pull request
Nov 2, 2026
All 4 interpreters failed the same way - the packmol binary itself crashed immediately with no output at all: assert result.returncode == 0 AssertionError: assert -11 == 0 + where -11 = CompletedProcess(args=['packmol'], ...).returncode A SIGSEGV with completely empty stdout/stderr (not even packmol's own startup banner) on every interpreter points at the compiled binary itself, not at the Python/cibuildwheel layer around it. Drop the Makefile's -O3 -funroll-loops override to plain -O2, no unrolling - this is the standard mitigation for a binary that only breaks under aggressive optimization on a comparatively undertested architecture. Not verified against a specific miscompiled routine (no stack trace to work from, nothing printed before the crash); if -O2 still crashes, the next step would be -O1/-O0 to bisect further.
The bundled packmol executable is non-PIE, linked at riscv64's 0x10000. auditwheel's patchelf --set-rpath (for the grafted libgfortran) prepends a segment below that base, which the kernel cannot map, so packmol died with SIGSEGV at exec with no output, independent of -O level. Pass -Wl,-Ttext-segment=0x200000 through the Makefile's FLAGS (also used for the link) and restore upstream's -O3 -funroll-loops (minus -march=native). Also select the cibuildwheel target, job name and artifact name by matrix.platform: the musllinux rows of the setup matrix were rebuilding the manylinux wheel under the same artifact name.
-Wl,-Ttext-segment=0x200000 fixed the manylinux wheel, but every musllinux wheel still died with SIGSEGV and no output. musllinux's Alpine gcc is --enable-default-pie, and ld turns a PIE link with a non-zero text segment into an ET_EXEC that still carries PIE relocations (FLAGS_1 PIE, R_RISCV_RELATIVE). The unrepaired binary runs, but once auditwheel's patchelf --set-rpath rewrites that ET_EXEC (shifting the file and moving .dynamic into a new low segment), it crashes in startup right after the RELRO mprotect. Link PIE explicitly on both platforms instead (-fPIE -pie through FLAGS, which is also the link line). An ET_DYN gets its new segment appended, so nothing lands below vm.mmap_min_addr on manylinux either.
The build matrix and docs/packages/packmol.yaml cover musllinux, but the publish artifact-pattern only matched *-manylinux_riscv64 artifacts, so update_doc.py reported every musllinux file as missing.
luhenry
marked this pull request as ready for review
November 9, 2026 06:36
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.
packmol21.2.3Compiles the Packmol Fortran executable with gfortran (via a hatchling build hook running the upstream Makefile) and ships it inside the wheel behind a
packmolconsole script. Upstream publishes no riscv64 wheel, only manylinux/musllinux x86_64/aarch64, macOS and Windows.Mirrors upstream's
build-wheels.yaml.Differs from upstream
FLAGSoverridden without-march=native- GCC rejects it on riscv64, and it ties the binary to the build hostTesting
License: Wheel bundles the image's libgfortran (GPL-3.0 with the GCC Runtime Library Exception), with its gcc sources published as gpl-sources.tar; packmol itself is MIT.
Not built locally; CI pending.