From ffb045832e66aa2334555a13cc853c4ee03f4516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Tue, 1 Sep 2026 03:03:04 +0200 Subject: [PATCH] fix(release): name Alpine's llvm-config by its prefix The musl image's LLVM version check invoked a bare `llvm-config`, which Alpine does not put on PATH -- its LLVM 22 lives under /usr/lib/llvm22 and only the versioned tools are installed. The check therefore failed during `docker build` with /bin/sh: line 0: llvm-config: not found before any Rust code was compiled, so the musl legs never got as far as exercising the fix they were added for (stage run 33443904901). The packages themselves install correctly; only the assertion was wrong. Name the prefix explicitly, and put /usr/lib/llvm22/bin on PATH so the rest of the LLVM tooling is reachable by plain name inside the image. --- scripts/linux-musl-llvm22.Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/linux-musl-llvm22.Dockerfile b/scripts/linux-musl-llvm22.Dockerfile index 3927276578..846bd5bcb8 100644 --- a/scripts/linux-musl-llvm22.Dockerfile +++ b/scripts/linux-musl-llvm22.Dockerfile @@ -24,13 +24,16 @@ RUN apk add --no-cache \ llvm22 llvm22-dev llvm22-static llvm22-libs \ libffi-dev openssl-dev zlib-dev zstd-dev xz-dev \ musl-dev pkgconf perl python3 \ - && llvm-config --version | grep -q '^22\.' \ - || { echo "alpine llvm is not 22.x ($(llvm-config --version))" >&2; exit 1; } + # Alpine installs LLVM 22 under /usr/lib/llvm22 and does NOT put its + # llvm-config on PATH (the bare name is unversioned and absent), so the + # check has to name the prefix explicitly. + && /usr/lib/llvm22/bin/llvm-config --version | grep -q '^22\.' \ + || { echo "alpine llvm is not 22.x ($(/usr/lib/llvm22/bin/llvm-config --version 2>&1))" >&2; exit 1; } ENV LLVM_SYS_221_PREFIX=/usr/lib/llvm22 ENV RUSTUP_HOME=/opt/rustup ENV CARGO_HOME=/opt/cargo -ENV PATH=/opt/cargo/bin:$PATH +ENV PATH=/opt/cargo/bin:/usr/lib/llvm22/bin:$PATH ARG RUST_TOOLCHAIN=nightly-2026-08-20 RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \