From 71801261a460dfb265a68168cd8cacfc8230928e Mon Sep 17 00:00:00 2001 From: DatCaptainHorse Date: Fri, 2 Oct 2026 16:09:45 +0300 Subject: [PATCH] fix: get Rust from rustup in the builder stage The distribution's rust package is built against the distribution's LLVM, and when the two repositories this image draws from disagree about llvm-libs, rustc itself fails to start with a symbol-lookup error, before any of our code is involved and in every stage that builds Rust. rustup's toolchain links nothing of the distribution's, so `rustup default stable` replaces the package. Co-Authored-By: Claude Sonnet 5.5 --- build/Containerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/Containerfile b/build/Containerfile index 680810df..45537e2e 100644 --- a/build/Containerfile +++ b/build/Containerfile @@ -58,13 +58,22 @@ RUN pacman -S --noconfirm --needed \ expat zlib-ng-compat zstd libxml2 lm_sensors \ llvm clang libclc spirv-tools spirv-llvm-translator glslang shader-slang \ elfutils libva libdrm directx-headers \ - rust rust-bindgen cbindgen \ + rustup rust-bindgen cbindgen \ curl openssl \ pixman libxkbcommon \ vulkan-headers vulkan-icd-loader \ pipewire shaderc opus \ libinput \ && pacman -Scc --noconfirm + +# **Rust comes from rustup, never from the distribution's `rust` package.** That +# package is built against the distribution's LLVM, and when the two repositories +# this image draws from disagree about it, `rustc` itself fails to start with a +# symbol-lookup error — before any of our code is involved, and in every stage +# that builds Rust. A toolchain of its own cannot be broken by a library it does +# not link. +RUN rustup default stable + WORKDIR /build ENV ARTIFACTS=/artifacts ENV RUSTFLAGS="-C link-arg=-fuse-ld=mold"