Closed
Description
The latest update of miri (#84050) makes build from tarball to fail. In nigthly, it isn't really a big problem (as tarball is unusual build method), but when it would reach stable (1.53.0), it will hurt downstream distributions.
If I correctly understood the problem, miri tries to extract informations at build time from expected git repository (sha + timestamp). See src/tools/miri/cargo-miri/build.rs. But when the build is from tarball, such git repository doesn't exist, and the build fails with Unable to generate vergen keys!
.
The full error when building 1.53.0-nightly (a866124 2021-04-11) is the following:
Compiling cargo-miri v0.1.0 (/data/semarie/build-rust/build_dir/rustc-nightly-src/src/tools/miri/cargo-miri)
error: failed to run custom build command for `cargo-miri v0.1.0 (/data/semarie/build-rust/build_dir/rustc-nightly-src/src/tools/miri/cargo-miri)`
Caused by:
process didn't exit successfully: `/data/semarie/build-rust/build_dir/build/x86_64-unknown-openbsd/stage1-tools/release/build/cargo-miri-a3c3912099a18c0b/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
--- stderr
thread 'main' panicked at 'Unable to generate vergen keys!: could not find repository from '/data/semarie/build-rust/build_dir/rustc-nightly-src/src/tools/miri/cargo-miri'; class=Repository (6); code=NotFound (-3)
Stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>', src/tools/miri/cargo-miri/build.rs:10:24
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
command did not execute successfully: "/data/semarie/build-rust/install_dir/beta/bin/cargo.bin" "build" "--target" "x86_64-unknown-openbsd" "-Zbinary-dep-depinfo" "-j" "4" "--release" "--frozen" "--manifest-path"
"/data/semarie/build-rust/build_dir/rustc-nightly-src/src/tools/miri/cargo-miri/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit code: 101
< ToolBuild { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-openbsd", file: None } }, target: TargetSelection { triple: "x86_64-unknown-openbsd", file: None }, tool: "cargo-miri", path:
"src/tools/miri/cargo-miri", mode: ToolRustc, is_optional_tool: true, source_type: Submodule, extra_features: [] }
< CargoMiri { compiler: Compiler { stage: 1, host: TargetSelection { triple: "x86_64-unknown-openbsd", file: None } }, target: TargetSelection { triple: "x86_64-unknown-openbsd", file: None }, extra_features: [] }
thread 'main' panicked at 'Unable to build cargo miri', src/bootstrap/dist.rs:44:9
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Traceback (most recent call last):
File "/data/semarie/build-rust/build_dir/rustc-nightly-src/x.py", line 27, in <module>
bootstrap.main()
File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 1191, in main
bootstrap(help_triggered)
File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 1177, in bootstrap
run(args, env=env, verbose=build.verbose)
File "/data/semarie/build-rust/build_dir/rustc-nightly-src/src/bootstrap/bootstrap.py", line 153, in run
raise RuntimeError(err)
RuntimeError: failed to run: /data/semarie/build-rust/build_dir/build/bootstrap/debug/bootstrap dist --jobs=4
Metadata
Metadata
Assignees
Labels
No labels