-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.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)
Description
We are building the compiler and tools using the vendored crates properly (via x.py build) in systems with no network access. But when running the tests (x.py test) it tries to access the network.
Setting properly the envs vars that x.py set, this can be reproduced with:
# /home/abuild/rpmbuild/BUILD/rustc-1.56.1-src/build/bootstrap/debug/bootstrap test
Building stage0 tool tidy (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.24s
tidy check
Checking which error codes lack tests...
* 627 error codes
* highest error code: E0785
Found 501 error codes
Found 0 error codes with no tests
Done!
thread '<unnamed>' panicked at 'cmd.exec() failed with Error during execution of `cargo metadata`: Updating git repository `https://github.com/bjorn3/rust-ar.git`
warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
error: failed to get `ar` as a dependency of package `rustc_codegen_cranelift v0.1.0 (/home/abuild/rpmbuild/BUILD/rustc-1.56.1-src/compiler/rustc_codegen_cranelift)`
Caused by:
failed to load source for dependency `ar`
Caused by:
Unable to update https://github.com/bjorn3/rust-ar.git?branch=do_not_remove_cg_clif_ranlib#de9ab0e5
Caused by:
failed to fetch into: /home/abuild/.cargo/git/db/rust-ar-9b35aff8ad678e06
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
', src/tools/tidy/src/deps.rs:293:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', src/tools/tidy/src/main.rs:77:9
command did not execute successfully: "/home/abuild/rpmbuild/BUILD/rustc-1.56.1-src/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-tidy" "/home/abuild/rpmbuild/BUILD/rustc-1.56.1-src" "/home/abuild/rpmbuild/BUILD/rust-1.56.1-x86_64-unknown-linux-gnu/usr/bin/cargo" "/home/abuild/rpmbuild/BUILD/rustc-1.56.1-src/build" "8"
expected success, got: exit status: 101
Seems that the call is be present in rust-tidy (in deps.rs). IIUC should use the --offline parameter, and I do not think that is checking the presence of .cargo/config per the ar error (that is present in the vendor directory)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.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)