Skip to content

Running cargo miri setup fails when build-std is set globally #2705

Open
@ProfElements

Description

@ProfElements

Target

{
    "arch": "powerpc",
    "cpu": "750",
    "data-layout": "E-m:e-p:32:32-i64:64-n32",
    "dynamic-linking": false,
    "env": "newlib",
    "exe-suffix": ".elf",
    "executables": true,
    "has-rpath": true,
    "llvm-target": "powerpc-eabi",
    "linker": "powerpc-eabi-gcc",
    "linker-flavor": "gcc",
    "linker-is-gnu": true,
    "os": "revolution",
    "pre-link-args": {
        "gcc": ["-meabi", "-mhard-float"]
    },
    "panic-strategy": "abort",
    "relocation-model": "static",
    "target-endian": "big",
    "target-family": "unix",
    "target-mcount": "_mcount",
    "target-c-int-width": "32",
    "target-pointer-width": "32",
    "vendor": "nintendo"
}

Error

rosalina  ❯ cargo miri setup --target powerpc-nintendo-wii.json
Preparing a sysroot for Miri (target: powerpc-nintendo-wii.json)...
   Compiling compiler_builtins v0.1.84
   Compiling core v0.0.0 (/home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.135
   Compiling cc v1.0.76
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
   Compiling unwind v0.0.0 (/home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind)
   Compiling rustc-std-workspace-core v1.99.0 (/home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
error[E0465]: multiple rmeta candidates for `core` found
 --> /home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^
  |
note: candidate #1: /tmp/.tmp7hbq08/target/powerpc-nintendo-wii/release/deps/libcore-5ded7a8114947da2.rmeta
 --> /home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^
note: candidate #2: /tmp/.tmp7hbq08/target/powerpc-nintendo-wii/release/deps/libcore-7aa06ab5b4d41ada.rmeta
 --> /home/profelements/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^

error: could not compile `rustc-std-workspace-core` due to previous error
fatal error: failed to build sysroot, see error details above

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