From 1d6fc873e58155535483587a7f660e8c590d36af Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 22:41:34 +0000 Subject: [PATCH 1/2] ci: install qemu on Ubuntu 26.04 runners; fix the rustdoc link error Two failures in CI that no code change caused. 1. neon-simd/parity-qemu (and the four qemu jobs in simd-matrix): the ubuntu-latest image is now Ubuntu 26.04, where `qemu-user-static` is a virtual package with no installation candidate, so `apt-get install` exits 100 before anything is built (PR #408, a docs-only change, went red this way). New scripts/install-qemu-user.sh installs `qemu-user-static` where it still exists, else `qemu-user` plus links for the `qemu--static` names the parity scripts call. Every qemu step calls it. Both branches were run on Ubuntu 24.04 (QEMU_INSTALL_FORCE_PLAIN=1 takes the 26.04 branch), and scripts/neon-parity.sh passes through the linked plain qemu-aarch64. 2. docs/nightly has been red on master since at least 2026-10-29: `table[0]` in a doc comment in src/simd_stride.rs was read as an intra-doc link (rustdoc -D warnings). It is now in backticks; `cargo +nightly doc --no-deps --features approx,serde,rayon` with RUSTDOCFLAGS=-D warnings builds. CLAUDE.md's install instruction is corrected in place. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XAqKMQJzQD5KvNm8BtbsWG --- .github/workflows/ci.yaml | 2 +- .github/workflows/simd-matrix.yaml | 8 ++++---- CLAUDE.md | 21 +++++++++++++++------ scripts/install-qemu-user.sh | 30 ++++++++++++++++++++++++++++++ src/simd_stride.rs | 2 +- 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100755 scripts/install-qemu-user.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2778596..0ebf2ed6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -187,7 +187,7 @@ jobs: # pinned toolchain too (dtolnay installs for `stable`, which may differ). - run: rustup target add aarch64-unknown-linux-gnu - name: install aarch64 cross toolchain + qemu-user - run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user-static + run: scripts/install-qemu-user.sh gcc-aarch64-linux-gnu - name: NEON SIMD parity (cross-build + qemu run) run: ./scripts/neon-parity.sh diff --git a/.github/workflows/simd-matrix.yaml b/.github/workflows/simd-matrix.yaml index 4d9a5ac8..490dad98 100644 --- a/.github/workflows/simd-matrix.yaml +++ b/.github/workflows/simd-matrix.yaml @@ -236,7 +236,7 @@ jobs: with: key: cpu-guard-library - name: install qemu-user - run: sudo apt-get update && sudo apt-get install -y qemu-user-static + run: scripts/install-qemu-user.sh - name: library warns, executable exits 132 (qemu -cpu Haswell) run: bash scripts/cpu-guard-library-probe.sh @@ -261,7 +261,7 @@ jobs: with: key: avx - name: install qemu-user - run: sudo apt-get update && sudo apt-get install -y qemu-user-static + run: scripts/install-qemu-user.sh - name: masking parity (sandybridge build, qemu -cpu SandyBridge) run: bash scripts/masking-parity.sh avx-qemu - name: no AVX2 instruction in the parity binary @@ -306,7 +306,7 @@ jobs: with: key: v2 - name: install qemu-user - run: sudo apt-get update && sudo apt-get install -y qemu-user-static + run: scripts/install-qemu-user.sh - name: masking parity (x86-64-v2 build, qemu -cpu Nehalem) run: bash scripts/masking-parity.sh v2-qemu - name: no AVX instruction in the parity binary @@ -349,7 +349,7 @@ jobs: with: key: aarch64 - name: install aarch64 cross toolchain + qemu-user - run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user-static + run: scripts/install-qemu-user.sh gcc-aarch64-linux-gnu - name: masking parity (neon, qemu) run: bash scripts/masking-parity.sh neon-qemu - name: codegen witness (neon) diff --git a/CLAUDE.md b/CLAUDE.md index 9fa9f49d..13094ba3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -273,14 +273,23 @@ available here" and is in fact a **missing linker**, then a missing interpreter, in two separate steps: ```sh -sudo apt-get update -sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user-static +scripts/install-qemu-user.sh gcc-aarch64-linux-gnu ``` -`qemu-user` alone is NOT enough: the script invokes `qemu-aarch64-static`, -and the dynamic `qemu-aarch64` from `qemu-user` leaves a second, differently -worded failure (`command not found`) that looks like a fresh problem rather -than the same one. Install `qemu-user-static`. +The scripts invoke `qemu-aarch64-static` / `qemu-x86_64-static`, so plain +`qemu-user` alone leaves a second, differently worded failure +(`command not found`) that looks like a fresh problem rather than the same one. + +> ⊘ **CORRECTED 2026-11-05.** This read *"Install `qemu-user-static`"* with +> `sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user-static`. Ubuntu 26.04 +> (the GitHub `ubuntu-latest` image since early November) dropped that package: +> it is now virtual with no installation candidate and `apt-get install` exits +> 100, which turned `neon-simd/parity-qemu` red on PR #408 before anything was +> built. `scripts/install-qemu-user.sh` installs `qemu-user-static` where it +> still exists, else `qemu-user` plus links for the `-static` names; every CI +> qemu step calls it. Both branches were run on Ubuntu 24.04 +> (`QEMU_INSTALL_FORCE_PLAIN=1` takes the 26.04 branch), and +> `scripts/neon-parity.sh` passed through the linked plain `qemu-aarch64`. **And `native` is the HOST arm — it names no tier at all.** diff --git a/scripts/install-qemu-user.sh b/scripts/install-qemu-user.sh new file mode 100755 index 00000000..1ca8221f --- /dev/null +++ b/scripts/install-qemu-user.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Install the qemu user-mode emulators so `qemu-aarch64-static` and +# `qemu-x86_64-static` resolve on every Ubuntu runner image. +# +# Ubuntu 26.04 dropped the `qemu-user-static` package (it is now a virtual +# package with no installation candidate, and `apt-get install` exits 100). +# There, `qemu-user` carries the emulators under their plain names, so this +# script links the `-static` names the parity scripts call. On images that +# still ship `qemu-user-static` it installs that, as before. +# +# Usage: scripts/install-qemu-user.sh [extra apt packages...] +# Set QEMU_INSTALL_FORCE_PLAIN=1 to take the `qemu-user` path on any image. +set -euo pipefail + +sudo apt-get update +if [ "${QEMU_INSTALL_FORCE_PLAIN:-0}" != 1 ] \ + && apt-cache show qemu-user-static 2>/dev/null | grep -q '^Filename:'; then + sudo apt-get install -y "$@" qemu-user-static +else + sudo apt-get install -y "$@" qemu-user +fi + +for arch in aarch64 x86_64; do + if [ "${QEMU_INSTALL_FORCE_PLAIN:-0}" = 1 ] || ! command -v "qemu-$arch-static" >/dev/null; then + real=$(command -v "qemu-$arch") || { echo "qemu-$arch is not installed" >&2; exit 1; } + sudo ln -sf "$real" "/usr/local/bin/qemu-$arch-static" + fi + echo "qemu-$arch-static -> $(readlink -f "$(command -v "qemu-$arch-static")")" + "qemu-$arch-static" --version | head -1 +done diff --git a/src/simd_stride.rs b/src/simd_stride.rs index 210b65ec..df41aba6 100644 --- a/src/simd_stride.rs +++ b/src/simd_stride.rs @@ -70,7 +70,7 @@ pub fn lut_u8(values: &[u8], table: &[u8; 256], out: &mut [u8]) { /// authorization or alpha-claim from these bits. /// /// # Panics -/// If table[0] != 0 or input/output slices are too short. +/// If `table[0] != 0` or input/output slices are too short. /// /// # Examples /// ``` From aa11797c2b4ec26daa04a9960d11b2b88448af2e Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 5 Nov 2026 22:44:38 +0000 Subject: [PATCH 2/2] ci: run the AVX and v2 emulation arms on ubuntu-24.04 The qemu install fix works on the new image (qemu 10.2.1, both -static names resolve), and it exposed a second effect of the same image change. realization/avx failed with "Fatal glibc error: CPU does not support x86-64-v3": ubuntu-latest is now Ubuntu 26.04 amd64v3, whose glibc requires x86-64-v3, so no host-linked binary starts under `qemu -cpu SandyBridge` or `-cpu Nehalem`. Those two arms exist to run on exactly such CPUs. They are pinned to ubuntu-24.04 with the reason inline; moving them back needs a static (musl) build of the parity binary and the lib test binary. Every other job stays on ubuntu-latest; the cpu-guard job emulates Haswell (x86-64-v3) and is unaffected. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XAqKMQJzQD5KvNm8BtbsWG --- .github/workflows/simd-matrix.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/simd-matrix.yaml b/.github/workflows/simd-matrix.yaml index 490dad98..cc02a942 100644 --- a/.github/workflows/simd-matrix.yaml +++ b/.github/workflows/simd-matrix.yaml @@ -250,7 +250,12 @@ jobs: # AVX2 for this target, so any `vp*` on a ymm register other than the # AVX1 `vptest` came from an intrinsic that escaped its gate), and the # SIMD unit tests under emulation. - runs-on: ubuntu-latest + # Pinned to 24.04: the ubuntu-latest image (Ubuntu 26.04, amd64v3) ships a + # glibc built for x86-64-v3, so no host-linked binary starts on an emulated + # pre-AVX2 CPU ("Fatal glibc error: CPU does not support x86-64-v3"). This + # arm's whole point is running on such a CPU. Move it off 24.04 only with a + # static (musl) build of both binaries it runs. + runs-on: ubuntu-24.04 name: realization/avx × x86_64 steps: - uses: actions/checkout@v4 @@ -295,7 +300,12 @@ jobs: # Nehalem`, so any AVX instruction on the executed path faults. Three # rungs, as for `avx`: parity, an assembly witness that the parity binary # has no AVX encoding at all, and the SIMD unit tests under emulation. - runs-on: ubuntu-latest + # Pinned to 24.04: the ubuntu-latest image (Ubuntu 26.04, amd64v3) ships a + # glibc built for x86-64-v3, so no host-linked binary starts on an emulated + # pre-AVX2 CPU ("Fatal glibc error: CPU does not support x86-64-v3"). This + # arm's whole point is running on such a CPU. Move it off 24.04 only with a + # static (musl) build of both binaries it runs. + runs-on: ubuntu-24.04 name: realization/v2 × x86_64 steps: - uses: actions/checkout@v4