-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Milestone
Description
I am trying to build the official tarball on Linux and it fails with the following error:
Finished `dev` profile [unoptimized] target(s) in 0.70s
fatal: --local can only be used inside a git repository
fatal: not a git repository (or any of the parent directories): .git
thread 'main' panicked at src/core/config/config.rs:2908:89:
called `Result::unwrap()` on an `Err` value: "command did not execute successfully: cd \"/home/builder/Tmpdir/rustc-1.84.0-src\" && \"git\" \"rev-list\" \"--author=bors@rust-lang.org\" \"-n1\" \"--first-parent\" \"HEAD\"\nexpected success, got: exit status: 128\n"
stack backtrace:
0: 0x556f85b3c316 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::ha954892228d36427
1: 0x556f85b64203 - core::fmt::write::h57d13a959b226250
2: 0x556f85b181df - std::io::Write::write_fmt::h14c9ac269063afe6
3: 0x556f85b3c1b3 - std::sys::backtrace::BacktraceLock::print::hf969c1fd7e824e94
4: 0x556f85b290ad - std::panicking::default_hook::{{closure}}::h45647cb6a8d1ea15
5: 0x556f85b28ec2 - std::panicking::default_hook::h2dcc389a6edb8d15
6: 0x556f85b29533 - std::panicking::rust_panic_with_hook::h243558d255d6afd1
7: 0x556f85b3c6da - std::panicking::begin_panic_handler::{{closure}}::h17209e01ce2aa329
8: 0x556f85b3c519 - std::sys::backtrace::__rust_end_short_backtrace::hbeff08fd2d23fd72
9: 0x556f85b2914c - rust_begin_unwind
10: 0x556f84e06220 - core::panicking::panic_fmt::h600b93cf9acabfc7
11: 0x556f84e06bb6 - core::result::unwrap_failed::hd0f0a7f7f80f29eb
12: 0x556f84e5abdd - core::result::Result<T,E>::unwrap::hdcce4d4cbb4ca39f
at /home/builder/Tmpdir/rustc-1.83.0-src/library/core/src/result.rs:1104:23
13: 0x556f84e5abdd - bootstrap::core::config::config::Config::last_modified_commit::h0e5bf6b59b9537e9
at /home/builder/Tmpdir/rustc-1.84.0-src/src/bootstrap/src/core/config/config.rs:2908:22
14: 0x556f84e5a266 - bootstrap::core::config::config::Config::download_ci_rustc_commit::h6e7a14b43ced4064
at /home/builder/Tmpdir/rustc-1.84.0-src/src/bootstrap/src/core/config/config.rs:2820:28
15: 0x556f8514e8c2 - bootstrap::core::config::config::Config::parse_inner::ha7f9a830d56f200a
at /home/builder/Tmpdir/rustc-1.84.0-src/src/bootstrap/src/core/config/config.rs:1775:17
16: 0x556f84e555ad - bootstrap::core::config::config::Config::parse::h294bff55ae4cccc9
at /home/builder/Tmpdir/rustc-1.84.0-src/src/bootstrap/src/core/config/config.rs:1305:9
17: 0x556f84e0c42c - bootstrap::main::he2af89d8870d09bd
at /home/builder/Tmpdir/rustc-1.84.0-src/src/bootstrap/src/bin/main.rs:27:18
18: 0x556f84e084a3 - core::ops::function::FnOnce::call_once::haf58ca782caa1c52
at /home/builder/Tmpdir/rustc-1.83.0-src/library/core/src/ops/function.rs:250:5
19: 0x556f84e10966 - std::sys::backtrace::__rust_begin_short_backtrace::h173f508882ed3517
at /home/builder/Tmpdir/rustc-1.83.0-src/library/std/src/sys/backtrace.rs:154:18
20: 0x556f84e072a9 - std::rt::lang_start::{{closure}}::h41c6084881d81864
at /home/builder/Tmpdir/rustc-1.83.0-src/library/std/src/rt.rs:195:18
21: 0x556f85b26a80 - std::rt::lang_start_internal::hec001d8d383763ba
22: 0x556f84e07287 - std::rt::lang_start::hbc106bd9b8bea089
at /home/builder/Tmpdir/rustc-1.83.0-src/library/std/src/rt.rs:194:17
23: 0x556f84e0ee4e - main
24: 0x149dee2bd1ca - __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
25: 0x149dee2bd285 - __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
26: 0x556f84e06bf1 - _start
27: 0x0 - <unknown>
Build completed unsuccessfully in 0:03:01
Using the same config.toml file on the tarball for rustc 1.83 works with no problems, so this seems to be limited to the 1.84 tarball. Please kindly assist, thank you.
truboxl and thesamesam
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Type
Projects
Relationships
Development
Select code repository
Activity
Noratrieb commentedon Jan 11, 2025
what's your
config.toml
?Noratrieb commentedon Jan 11, 2025
I see the one from @truboxl backlinked from termux: https://github.com/termux/termux-packages/blob/0366d87f0e811efadd6de798cbc8220c216d2faa/packages/rust/config.toml#L4
You need to set
profile = "dist"
at the top to get a configuration that properly works for building (which is set automatically by./configure
). The dist profile disablesdownload-rustc
, whose logic is only intended to be used in a Git repository.dev-lang/rust: set `dist` profile for 1.84.0
onur-ozkan commentedon Jan 11, 2025
We shouldn't allow using "if-unchanged" on non-git sources.
Noratrieb commentedon Jan 11, 2025
Maybe it would also be good to force people to set
profile = "dist"
in non-git sources? Relying on the config instead of whether it's Git or not seems more reliable and less prone to mistakes. (nice errors would be cool of course)onur-ozkan commentedon Jan 11, 2025
I think that wouldn't be enough as can simply override the defaults.
jyn514 commentedon Jan 11, 2025
defaulting to (but not forcing) profile = dist in non-git sources seems like a good change. i agree with onur that we should additionally add a helpful error when combining download-* with non-git sources.
etna commentedon Jan 12, 2025
Adding profile = "dist" results in a successful build, thank you very much.
I am fine with manually declaring profile = "dist" in my config.toml if it is clearly stated and described in the tarball's config.toml.example
etna commentedon Jan 12, 2025
Sorry, closed by mistake; please re-open if needed.
18 remaining items