Reproducing rustc release CI build locally
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I'm trying to locally reproduce the dist-x86_64-linux release that is built by CI, following the info here:
https://rustc-dev-guide.rust-lang.org/tests/ci.html
My OS: Ubuntu 22.04
I try to do the following to run the build in the corresponding Docker container:
git clone git@github.com:rust-lang/rust.git rust-v1.92.0 --branch 1.92.0
cd rust-v1.92.0
git submodule update --init --recursive
./src/ci/docker/run.sh dist-x86_64-linux
The error from the last command is below. This seems to happen due to the fact that the dist-x86_64-linux target uses CentOS 7 in its Dockerfile. Thus, it installs git version 1.8.3.1, which leads to this command failing in the container:
git rev-list --author-date-order --author=bors@rust-lang.org -n1 HEAD
I'm not sure how the CI builds avoid this issue.
Command failed. Attempt 5/5:
Finished `dev` profile [unoptimized] target(s) in 0.04s
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
limiting output:
--max-count=<n>
--max-age=<epoch>
--min-age=<epoch>
--sparse
--no-merges
--min-parents=<n>
--no-min-parents
--max-parents=<n>
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--unpacked
--header | --pretty
--abbrev=<n> | --no-abbrev
--abbrev-commit
--left-right
special purpose:
--bisect
--bisect-vars
--bisect-all
thread 'main' (1861) panicked at src/bootstrap/src/core/config/config.rs:2242:14:
called `Result::unwrap()` on an `Err` value: "command did not execute successfully: cd \"/checkout\" && \"git\" \"rev-list\" \"--author-date-order\" \"--author=bors@rust-lang.org\" \"-n1\" \"HEAD\"\nexpected success, got: exit status: 129\n"
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/std/src/panicking.rs:698:5
1: core::panicking::panic_fmt
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/core/src/panicking.rs:75:14
2: core::result::unwrap_failed
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/core/src/result.rs:1855:5
3: core::result::Result<T,E>::unwrap
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/core/src/result.rs:1226:23
4: bootstrap::core::config::config::check_path_modifications_::{{closure}}
at /checkout/src/bootstrap/src/core/config/config.rs:2242:14
5: std::collections::hash::map::Entry<K,V>::or_insert_with
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/std/src/collections/hash/map.rs:2373:43
6: bootstrap::core::config::config::check_path_modifications_
at /checkout/src/bootstrap/src/core/config/config.rs:2235:10
7: bootstrap::core::config::config::has_changes_from_upstream
at /checkout/src/bootstrap/src/core/config/config.rs:2317:11
8: bootstrap::core::config::config::parse_download_ci_llvm::{{closure}}
at /checkout/src/bootstrap/src/core/config/config.rs:2276:27
9: bootstrap::core::config::config::parse_download_ci_llvm
at /checkout/src/bootstrap/src/core/config/config.rs:2305:59
10: bootstrap::core::config::config::Config::parse_inner
at /checkout/src/bootstrap/src/core/config/config.rs:957:28
11: bootstrap::core::config::config::Config::parse
at /checkout/src/bootstrap/src/core/config/config.rs:344:9
12: bootstrap::main
at /checkout/src/bootstrap/src/bin/main.rs:39:18
13: core::ops::function::FnOnce::call_once
at /rustc/f8297e351a40c1439a467bbbb6879088047f50b3/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Building bootstrap
Build completed unsuccessfully in 0:00:00
make: *** [prepare] Error 1
The command has failed after 5 attempts.
local time: Thu Jan 8 00:17:31 UTC 2026
network time: Thu, 08 Jan 2026 00:17:31 GMT
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/ci/docker/run.sh and the dist-x86_64-linux container setup, then inspect the bootstrap path at src/bootstrap/src/core/config/config.rs:2235-2242. Reproduce the command in the issue and compare the container's Git behavior with the CI environment. Done means the release build can be reproduced locally without the reported git rev-list failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, git, rust
- Domain
- build-system, ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100