Repository navigation
Build Linux natives on ubuntu-24.04 to fix SIGILL on older CPUs - #188
Closed
Dominik-O22 wants to merge 1 commit into
Closed
Dominik-O22 wants to merge 1 commit into
Dominik-O22 wants to merge 1 commit into
Conversation
ubuntu-latest moved to Ubuntu 26.04, which targets x86-64-v3 on amd64 and RVA23 on riscv64. Since 1.13.0 the amd64 and riscv64 libraries use AVX2, BMI2 and RVV instructions and crash with SIGILL on CPUs without them. On riscv64 -march=rv64gc is not enough: the libgcc linked into the library is built for RVA23 too. Pin the Linux natives job to ubuntu-24.04, the toolchain 1.12.1 used, and check the assembled libraries for instructions above x86-64 and RV64GC. Fixes yawkat#186 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Note 🤖 Claude Opus 5.5 responding on behalf of Dominik-O22 Closing in favor of #187. Its latest commit does the same things: it builds on ubuntu-24.04 and checks that |
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.
Since 1.13.0 the linux/amd64 and linux/riscv64 natives crash with SIGILL on CPUs that older releases supported (#186). The cause is the
ubuntu-latestmove to Ubuntu 26.04, which targets x86-64-v3 on amd64 and RVA23 on riscv64.riscv64 is not in the issue, but 1.14.0 has the same problem there:
%ymmoperandsTag_RISCV_archrv64gcv,zvbb,zicond, ...)Adding
-march=rv64gcon 26.04 is not enough. RV64GC has no byte-swap instruction, so GCC calls__bswapdi2from libgcc, and Ubuntu 26.04's libgcc is built for RVA23. Its__bswapdi2usesrev8.This PR builds the Linux natives on
ubuntu-24.04, the toolchain 1.12.1 used, like #178 did for macOS. It also adds a step to the assemble job that fails if the amd64 library has AVX, BMI1/2, LZCNT or MOVBE instructions, or if the riscv64 library'sTag_RISCV_archlists anything beyond RV64GC. The linker merges that tag from every input, including libgcc and the crt objects, so the check also catches the libgcc case above.I checked the new step against:
ubuntu:24.04container with this workflow's flags: passes, and the riscv64 library has no V, Zb* or Zicond instructionsubuntu:26.04container with-march=x86-64and-march=rv64gc: amd64 passes, riscv64 fails because of libgccppc64le, s390x and aarch64 gained no instructions beyond their 1.12.1 baselines, and the darwin/x86_64 library has no AVX.
I could not run this workflow itself on my fork because Actions is off for forks there.
Created with Claude Opus 5.5 in Claude Code.