Skip to content

cargo miri setup no longer works for locally installed toolchains #3160

Closed
@matthiaskrgr

Description

@matthiaskrgr

I have a locally installed toolchain that I installed m into RUSTUP_HOME via x.py install.

When I now run cargo +mytoolchain miri setup, this no longer works:

at 18:15:47 ❯ RUST_BACKTRACE=1 ~/.cargo/bin/cargo +local-debug-assertions miri setup
Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)...
thread 'main' panicked at src/cargo/util/rustc.rs:86:13:
commit hash must be a hex string
stack backtrace:
   0: rust_begin_unwind
             at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:72:14
   2: <cargo::util::rustc::Rustc>::new::{closure#2}
   3: <core::option::Option<&str>>::map::<alloc::string::String, <cargo::util::rustc::Rustc>::new::{closure#2}>
             at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1072:29
   4: <cargo::util::rustc::Rustc>::new
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/util/rustc.rs:85:57
   5: <cargo::util::config::Config>::load_global_rustc
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/util/config/mod.rs:414:9
   6: <cargo::core::compiler::build_context::target_info::RustcTargetData>::new
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/core/compiler/build_context/target_info.rs:885:21
   7: cargo::ops::cargo_compile::create_bcx
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/ops/cargo_compile/mod.rs:240:27
   8: cargo::ops::cargo_compile::compile_ws
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/ops/cargo_compile/mod.rs:151:15
   9: cargo::ops::cargo_compile::compile_with_exec
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/ops/cargo_compile/mod.rs:141:5
  10: cargo::ops::cargo_compile::compile
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/cargo/ops/cargo_compile/mod.rs:128:5
  11: cargo::commands::check::exec
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/bin/cargo/commands/check.rs:56:5
  12: cargo::cli::main
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/bin/cargo/cli.rs:184:5
  13: cargo::main
             at /home/matthias/vcs/github/rust_debug_assertions/src/tools/cargo/src/bin/cargo/main.rs:31:9
  14: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal error: failed to build sysroot: sysroot build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargoArea: affects the cargo wrapper (cargo miri)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions