Repository navigation
ci: hold llama.cpp builds at Rust 1.99; Cargo 1.100's build-dir layout breaks them - #482
Merged
Merged
Conversation
…t breaks them Rust 1.100.0 stabilised Cargo's new build-dir layout, which puts build-script output one directory deeper (build/<crate>/<hash>/out instead of build/<crate>-<hash>/out). llama-cpp-sys-2's build.rs, up to the latest 0.1.161, finds the target dir by walking three levels up from OUT_DIR, so it now lands on target/release/build and panics hard-linking its shared libs into a deps/ directory that is not there (build.rs:1431, NotFound). Only builds that produce shared libs take that path: the Windows release and the x64 vulkan/cuda Docker images (dynamic-backends), which is why v3.7.0 failed there and vulkan aarch64 passed. The packaging behind those builds assumes the old layout as well (the Dockerfile globs build/llama-cpp-sys-2-*/out, release.yml takes the DLLs from where build.rs used to link them), and Cargo has no switch back, so the toolchain is held at 1.99 for these builds rather than patched around: - Dockerfile: ARG RUST_VERSION=1.99 for the shared rust:<v>-trixie stage - release.yml: rust_toolchain per matrix leg, 1.99 for Windows, stable for macOS; clippy named explicitly, since a pinned toolchain is a fresh --profile minimal install - Dev-Build-Environment-Setup: Windows llamacpp builds use cargo +1.99 Docs-Reviewed: Help-Docker-GPU.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HaMMvthhWBNXkrgY4AzYiH
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.
What broke
The v3.7.0 release failed on every build that compiles llama.cpp as shared libraries: Windows x64, Docker vulkan x64 and Docker cuda x64 (run 43443281904). All three panic in the same place:
Why
Rust 1.100.0 (released 2026-11-12, picked up through
stable/rust:1-trixie) stabilised Cargo's new build-dir layout: build-script output moved frombuild/<crate>-<hash>/outtobuild/<crate>/<hash>/out. llama-cpp-sys-2'sget_cargo_target_dir()walks a fixed three levels up fromOUT_DIR, so it now lands ontarget/release/buildand panics hard-linking its shared libs intotarget/release/build/deps, which does not exist. Onlydynamic-backends/shared-lib builds take that path, which is why vulkan aarch64 (statically linked) passed. v3.6.0 built on 1.99 with the same pinned 0.1.156.build/llama-cpp-sys-2-*/out/{lib,lib64,backends}, and release.yml takesllama.dll/ggml*.dllfromtarget/release, where build.rs used to link them.Change
Hold the toolchain at 1.99 for these builds, with the reason and the unpin checklist next to each pin:
server-rs/Dockerfile:ARG RUST_VERSION=1.99, used by the sharedrust:${RUST_VERSION}-trixiestage.release.yml:rust_toolchainper matrix leg ('1.99'for Windows,stablefor macOS). Also namescomponents: clippy, because the action installs with--profile minimaland a pinned version is a fresh install.Dev-Build-Environment-Setup.md: Windowsllamacppbuilds usecargo +1.99, since local builds hit the same panic.server-rs/README.md(and its generated wiki page): builder image named.Trade-off: PR CI stays on stable, so code that needs Rust 1.100 would pass PR checks and only fail on the Windows release leg. The workspace builds on 1.99.1 today.
Testing
check-docs.pyand the pre-commit hooks pass; release.yml parses with the intended matrix values.docker-images.yml(Dockerfile changed), which builds the vulkan/cuda x64 images on 1.99.Docs-Reviewed: Help-Docker-GPU.md (still accurate; the toolchain is not a build arg users set)
🤖 Generated with Claude Code
https://claude.ai/code/session_01HaMMvthhWBNXkrgY4AzYiH