Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ProfElements opened this issue Nov 30, 2022 · 26 comments
Open

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

ProfElements opened this issue Nov 30, 2022 · 26 comments
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) C-bug Category: This is a bug.

Comments

@ProfElements
Copy link

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
@RalfJung
Copy link
Member

RalfJung commented Nov 30, 2022

We don't support .json files for targets, so I suspect that is the underlying cause here. The error looks strange though and I cannot make any sense of it...

@RalfJung
Copy link
Member

So, closing as a duplicate of #2053. Thanks for the report!

@ProfElements
Copy link
Author

It does the same thing for my default system
Target: px86_64-unknown-linux-gnu

Error:

rosalina ❯ cargo miri setup
Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)...
   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/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps/libcore-1ad36d05c04c5479.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/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps/libcore-9a9a7836d41bc1e7.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

I do not think the custom target is the issue

@RalfJung
Copy link
Member

RalfJung commented Nov 30, 2022

Oh. Okay that is something else then. Still absolutely no idea why it would build libcore twice though. x86_64-unknown-linux-gnu works fine on my system and on CI and for probably quite a few people out there... this is mysterious. Can you think of anything that is special about your setup? What distro are you using? What's your Miri version (cargo miri -V) and how did you install it? Is there anything in your global cargo config?

(I assume the p in "px86_64-unknown-linux-gnu" is a typo.)

@RalfJung RalfJung reopened this Nov 30, 2022
@RalfJung RalfJung changed the title Running cargo miri run --target powerpc-nintendo-wii.json yields multiple rmeta canidates for core found Running cargo miri setup yields multiple rmeta canidates for core found (on x86_64-unknown-linux-gnu) Nov 30, 2022
@ProfElements
Copy link
Author

ProfElements commented Nov 30, 2022

Miri: version: miri 0.1.0 (e0098a5 2022-11-29)
Os: OS: Pop!_OS 22.04 LTS x86_64

I have nothing in my global cargo config

@RalfJung
Copy link
Member

And miri is installed via rustup I assume?

@ProfElements
Copy link
Author

It is

@RalfJung
Copy link
Member

Hm. Pop!_OS seems to be a Ubuntu derivative so unlikely to do anything odd. (I asked because if it would have been NixOS or something like that that might have been a hint.^^)

Yeah I'm kind of stumped here. Either the single build of core produces two rmeta files (but why would it do that) or somehow the tmpdir that Miri creates is not empty and contains some old junk rmeta files.

Does the /tmp/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps/ folder still exist? Can you show the output of ls -lah /tmp/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps/?

@ProfElements
Copy link
Author

rosalina ❯ sudo ls -lah /tmp/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps
ls: cannot access '/tmp/.tmpNPVcjY/target/x86_64-unknown-linux-gnu/release/deps': No such file or directory

@RalfJung
Copy link
Member

RalfJung commented Nov 30, 2022

Ah yeah Miri is probably too efficient at cleaning this up.^^ But it's unlikely that the folder would already exist, tempdir should handle creating a new fresh folder.

Yeah sorry I am stumped here, and I can't really debug what I cannot reproduce. I hope someone else will see this and have an idea (or it happens to someone else so that we can start looking for things your systems have in common).

@RalfJung
Copy link
Member

I guess one thing we could do is add support for cargo miri setup -v, just to get a bit more information out of these logs. I'll add implementing that to my todo list.

@RalfJung
Copy link
Member

RalfJung commented Dec 5, 2022

@ProfElements could you try updating to the latest nightly, and do cargo miri setup -v? That should at last give us a bit more logging...

@bindsdev
Copy link

bindsdev commented Jan 31, 2023

@RalfJung as you directed me in the referenced issue, here is the output, at the point when it fails, of cargo miri setup -v --target CUSTOM_TARGET when I run it:

     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=f903b058488e1652 -C extra-filename=-f903b058488e1652 --out-dir /tmp/.tmpqspPUK/target/x86_64-prestige/release/deps --target /home/binds/code/prestige/.cargo/targets/x86_64-prestige.json -L dependency=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps -L dependency=/tmp/.tmpqspPUK/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/liballoc-b6b891d16f2b88c2.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcompiler_builtins-a90cc2465041ffba.rlib' --extern 'noprelude:core=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-fe8fccd3bdf8e7b3.rlib' --extern core=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-5484c1dfc1494680.rmeta -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
error[E0464]: multiple candidates for `rmeta` dependency `core` found
 --> /home/binds/.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/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-5484c1dfc1494680.rmeta
  = note: candidate #2: /tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-fe8fccd3bdf8e7b3.rmeta

For more information about this error, try `rustc --explain E0464`.
error: could not compile `rustc-std-workspace-core` due to previous error

Caused by:
  process didn't exit successfully: `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=f903b058488e1652 -C extra-filename=-f903b058488e1652 --out-dir /tmp/.tmpqspPUK/target/x86_64-prestige/release/deps --target /home/binds/code/prestige/.cargo/targets/x86_64-prestige.json -L dependency=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps -L dependency=/tmp/.tmpqspPUK/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/liballoc-b6b891d16f2b88c2.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcompiler_builtins-a90cc2465041ffba.rlib' --extern 'noprelude:core=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-fe8fccd3bdf8e7b3.rlib' --extern core=/tmp/.tmpqspPUK/target/x86_64-prestige/release/deps/libcore-5484c1dfc1494680.rmeta -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked` (exit status: 1)
fatal error: failed to build sysroot: sysroot build failed

I am on Windows 11 using WSL 2.

@RalfJung
Copy link
Member

RalfJung commented Jan 31, 2023 via email

@bindsdev
Copy link

Is that the full output? It doesn't contain the extra infoemation that "-v" would print.

Also I was asking about "cargo miri setup -v" without "--target".

I had omitted the rest up until that point because it was extremely long. I can send it later today, and will also run without --target.

@RalfJung
Copy link
Member

You can post it in a foldable comment like this


<details>

```
log
```

</details>

(the empty lines are important)

@bindsdev
Copy link

bindsdev commented Feb 1, 2023

Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)...
   Compiling compiler_builtins v0.1.85
   Compiling core v0.0.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.138
   Compiling cc v1.0.77
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' --cfg 'feature="rustc-dep-of-std"' -C metadata=3bc875503b81140f -C extra-filename=-3bc875503b81140f --out-dir /tmp/.tmpFPeU25/target/release/build/compiler_builtins-3bc875503b81140f -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=07931b5e597a00fa -C extra-filename=-07931b5e597a00fa --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.138/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="align"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-std-workspace-core"' -C metadata=c44b0f471760e46d -C extra-filename=-c44b0f471760e46d --out-dir /tmp/.tmpFPeU25/target/release/build/libc-c44b0f471760e46d -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name cc --edition=2018 /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.77/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=8168e7acf14ad5c1 -C extra-filename=-8168e7acf14ad5c1 --out-dir /tmp/.tmpFPeU25/target/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow`     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=c3942ea455900e5d -C extra-filename=-c3942ea455900e5d --out-dir /tmp/.tmpFPeU25/target/release/build/compiler_builtins-c3942ea455900e5d -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build --edition=2018 /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.5.0/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=d0eb65f2af616325 -C extra-filename=-d0eb65f2af616325 --out-dir /tmp/.tmpFPeU25/target/release/build/memchr-d0eb65f2af616325 -L dependency=/tmp/.tmpFPeU25/target/release/deps --cap-lints allow`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="addr2line"' --cfg 'feature="backtrace"' --cfg 'feature="gimli-symbolize"' --cfg 'feature="miniz_oxide"' --cfg 'feature="object"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=d92efa933cd9894b -C extra-filename=-d92efa933cd9894b --out-dir /tmp/.tmpFPeU25/target/release/build/std-d92efa933cd9894b -L dependency=/tmp/.tmpFPeU25/target/release/deps`
     Running `/tmp/.tmpFPeU25/target/release/build/compiler_builtins-c3942ea455900e5d/build-script-build`
     Running `/tmp/.tmpFPeU25/target/release/build/compiler_builtins-3bc875503b81140f/build-script-build`
     Running `/tmp/.tmpFPeU25/target/release/build/libc-c44b0f471760e46d/build-script-build`
     Running `/tmp/.tmpFPeU25/target/release/build/memchr-d0eb65f2af616325/build-script-build`
     Running `/tmp/.tmpFPeU25/target/release/build/std-d92efa933cd9894b/build-script-build`
   Compiling unwind v0.0.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind)
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name build_script_build --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=2f97088ac45cda53 -C extra-filename=-2f97088ac45cda53 --out-dir /tmp/.tmpFPeU25/target/release/build/unwind-2f97088ac45cda53 -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern cc=/tmp/.tmpFPeU25/target/release/deps/libcc-8168e7acf14ad5c1.rlib`
     Running `/tmp/.tmpFPeU25/target/release/build/unwind-2f97088ac45cda53/build-script-build`
   Compiling rustc-std-workspace-core v1.99.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=e22072ca3489f1c5 -C extra-filename=-e22072ca3489f1c5 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name compiler_builtins /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' --cfg 'feature="rustc-dep-of-std"' -C metadata=ff6a92920a24df5d -C extra-filename=-ff6a92920a24df5d --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-e22072ca3489f1c5.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg 'feature="unstable"' --cfg 'feature="mem-unaligned"'`
   Compiling alloc v0.0.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name alloc --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler-builtins-mem"' -C metadata=dd25b87da9fb59d4 -C extra-filename=-dd25b87da9fb59d4 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rmeta --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=7b8280741934e580 -C extra-filename=-7b8280741934e580 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/liballoc-dd25b87da9fb59d4.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rlib' --extern 'noprelude:core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rlib' -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name compiler_builtins /home/binds/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' --cfg 'feature="rustc-dep-of-std"' -C metadata=ff6a92920a24df5d -C extra-filename=-ff6a92920a24df5d --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-e22072ca3489f1c5.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg 'feature="unstable"' --cfg 'feature="mem-unaligned"'`
   Compiling alloc v0.0.0 (/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name alloc --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler-builtins-mem"' -C metadata=dd25b87da9fb59d4 -C extra-filename=-dd25b87da9fb59d4 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rmeta --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=7b8280741934e580 -C extra-filename=-7b8280741934e580 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/liballoc-dd25b87da9fb59d4.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rlib' --extern 'noprelude:core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rlib' -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=15fc0eaa2fb3ae15 -C extra-filename=-15fc0eaa2fb3ae15 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/liballoc-dd25b87da9fb59d4.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rlib' --extern 'noprelude:core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rlib' --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-7b8280741934e580.rmeta -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
error[E0464]: multiple candidates for `rmeta` dependency `core` found
 --> /home/binds/.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/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rmeta
  = note: candidate #2: /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-7b8280741934e580.rmeta

For more information about this error, try `rustc --explain E0464`.
error: could not compile `rustc-std-workspace-core` due to previous error

Caused by:
  process didn't exit successfully: `/home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/binds/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=192 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=15fc0eaa2fb3ae15 -C extra-filename=-15fc0eaa2fb3ae15 --out-dir /tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmpFPeU25/target/release/deps --extern 'noprelude:alloc=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/liballoc-dd25b87da9fb59d4.rlib' --extern 'noprelude:compiler_builtins=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-ff6a92920a24df5d.rlib' --extern 'noprelude:core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-07931b5e597a00fa.rlib' --extern core=/tmp/.tmpFPeU25/target/x86_64-unknown-linux-gnu/release/deps/libcore-7b8280741934e580.rmeta -Z unstable-options -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked` (exit status: 1)
fatal error: failed to build sysroot: sysroot build failed

Here is the full output.

@bjorn3
Copy link
Member

bjorn3 commented Feb 1, 2023

It looks like cargo does both a regular build as well as a check build of several crates for some reason. Do you have build-std in .cargo/config.toml or something?

@RalfJung
Copy link
Member

RalfJung commented Feb 1, 2023

There's actually three rustc invocations for libcore in total? Very strange.

For reference, here is what it should look like:

Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)...
   Compiling compiler_builtins v0.1.85
    Checking core v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core)
   Compiling libc v0.2.138
   Compiling cc v1.0.77
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name build_script_build /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=c3942ea455900e5d -C extra-filename=-c3942ea455900e5d --out-dir /tmp/.tmp9ESOHM/target/release/build/compiler_builtins-c3942ea455900e5d -L dependency=/tmp/.tmp9ESOHM/target/release/deps --cap-lints allow`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name core --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=97f8fc2bc46ff8b0 -C extra-filename=-97f8fc2bc46ff8b0 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name build_script_build /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.138/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="align"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-std-workspace-core"' -C metadata=c44b0f471760e46d -C extra-filename=-c44b0f471760e46d --out-dir /tmp/.tmp9ESOHM/target/release/build/libc-c44b0f471760e46d -L dependency=/tmp/.tmp9ESOHM/target/release/deps --cap-lints allow`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name cc --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.77/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=8168e7acf14ad5c1 -C extra-filename=-8168e7acf14ad5c1 --out-dir /tmp/.tmp9ESOHM/target/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --cap-lints allow`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name build_script_build --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.5.0/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=d0eb65f2af616325 -C extra-filename=-d0eb65f2af616325 --out-dir /tmp/.tmp9ESOHM/target/release/build/memchr-d0eb65f2af616325 -L dependency=/tmp/.tmp9ESOHM/target/release/deps --cap-lints allow`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name build_script_build --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="addr2line"' --cfg 'feature="backtrace"' --cfg 'feature="gimli-symbolize"' --cfg 'feature="miniz_oxide"' --cfg 'feature="object"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=d235a5f70ed145b9 -C extra-filename=-d235a5f70ed145b9 --out-dir /tmp/.tmp9ESOHM/target/release/build/std-d235a5f70ed145b9 -L dependency=/tmp/.tmp9ESOHM/target/release/deps`
     Running `/tmp/.tmp9ESOHM/target/release/build/compiler_builtins-c3942ea455900e5d/build-script-build`
     Running `/tmp/.tmp9ESOHM/target/release/build/libc-c44b0f471760e46d/build-script-build`
     Running `/tmp/.tmp9ESOHM/target/release/build/memchr-d0eb65f2af616325/build-script-build`
     Running `/tmp/.tmp9ESOHM/target/release/build/std-d235a5f70ed145b9/build-script-build`
   Compiling unwind v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/unwind)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name build_script_build --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/unwind/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=dca97ced3757f83c -C extra-filename=-dca97ced3757f83c --out-dir /tmp/.tmp9ESOHM/target/release/build/unwind-dca97ced3757f83c -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern cc=/tmp/.tmp9ESOHM/target/release/deps/libcc-8168e7acf14ad5c1.rlib`
     Running `/tmp/.tmp9ESOHM/target/release/build/unwind-dca97ced3757f83c/build-script-build`
    Checking rustc-std-workspace-core v1.99.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-core)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name rustc_std_workspace_core --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=f670947e254c203e -C extra-filename=-f670947e254c203e --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name compiler_builtins /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=bdfa0f27888814ba -C extra-filename=-bdfa0f27888814ba --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg 'feature="unstable"' --cfg 'feature="mem-unaligned"'`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name libc /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.138/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="align"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-std-workspace-core"' -C metadata=ba592fd96514433d -C extra-filename=-ba592fd96514433d --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern rustc_std_workspace_core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg freebsd11 --cfg libc_priv_mod_use --cfg libc_union --cfg libc_const_size_of --cfg libc_align --cfg libc_int128 --cfg libc_core_cvoid --cfg libc_packedN --cfg libc_cfg_target_vendor --cfg libc_non_exhaustive --cfg libc_ptr_addr_of --cfg libc_underscore_const_names --cfg libc_thread_local --cfg libc_const_extern_fn`
    Checking alloc v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc)
    Checking cfg-if v1.0.0
    Checking adler v1.0.2
    Checking rustc-demangle v0.1.21
     Running `/home/r/.cargo/bin/cargo-miri --crate-name alloc --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/alloc/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=aee357274e23840a -C extra-filename=-aee357274e23840a --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name cfg_if --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/cfg-if-1.0.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=39cbae399d97a223 -C extra-filename=-39cbae399d97a223 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name adler /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/adler-1.0.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=3d388049d1954fbd -C extra-filename=-3d388049d1954fbd --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name memchr --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.5.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=cca2e64eb2c896ed -C extra-filename=-cca2e64eb2c896ed --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg memchr_runtime_simd --cfg memchr_runtime_sse2 --cfg memchr_runtime_sse42 --cfg memchr_runtime_avx`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name rustc_demangle /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.21/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=c71cf60847782f46 -C extra-filename=-c71cf60847782f46 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name unwind --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/unwind/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=f813818fd53f7023 -C extra-filename=-f813818fd53f7023 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking rustc-std-workspace-alloc v1.99.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
    Checking panic_unwind v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/panic_unwind)
    Checking panic_abort v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/panic_abort)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name rustc_std_workspace_alloc --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-alloc/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=c0b4182046afaf21 -C extra-filename=-c0b4182046afaf21 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liballoc-aee357274e23840a.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name panic_unwind --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/panic_unwind/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=5183f393b9ae2b3d -C extra-filename=-5183f393b9ae2b3d --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liballoc-aee357274e23840a.rmeta --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta --extern unwind=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libunwind-f813818fd53f7023.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name panic_abort --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/panic_abort/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=64399cb767616d54 -C extra-filename=-64399cb767616d54 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liballoc-aee357274e23840a.rmeta --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking gimli v0.26.2
    Checking miniz_oxide v0.5.3
    Checking object v0.29.0
    Checking std_detect v0.1.5 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
    Checking hashbrown v0.12.3
     Running `/home/r/.cargo/bin/cargo-miri --crate-name gimli --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/gimli-0.26.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="read"' --cfg 'feature="read-core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=3cf776cab60e6ded -C extra-filename=-3cf776cab60e6ded --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name miniz_oxide --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/miniz_oxide-0.5.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=702adafd35183efe -C extra-filename=-702adafd35183efe --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern adler=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libadler-3d388049d1954fbd.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name object --edition=2018 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/object-0.29.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="archive"' --cfg 'feature="coff"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="elf"' --cfg 'feature="macho"' --cfg 'feature="pe"' --cfg 'feature="read_core"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="unaligned"' -C metadata=7c488f831e27c5e9 -C extra-filename=-7c488f831e27c5e9 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern memchr=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libmemchr-cca2e64eb2c896ed.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name std_detect --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/stdarch/crates/std_detect/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="libc"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=dfb26dd7a0521422 -C extra-filename=-dfb26dd7a0521422 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name hashbrown --edition=2021 /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.12.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="nightly"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="rustc-internal-api"' -C metadata=69808b7aa5c8ba9b -C extra-filename=-69808b7aa5c8ba9b --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking addr2line v0.17.0
     Running `/home/r/.cargo/bin/cargo-miri --crate-name addr2line /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/addr2line-0.17.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=55878229a6dee8c2 -C extra-filename=-55878229a6dee8c2 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern gimli=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libgimli-3cf776cab60e6ded.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_alloc-c0b4182046afaf21.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name std --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type dylib --crate-type rlib --emit=dep-info,metadata -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no --cfg 'feature="addr2line"' --cfg 'feature="backtrace"' --cfg 'feature="gimli-symbolize"' --cfg 'feature="miniz_oxide"' --cfg 'feature="object"' --cfg 'feature="panic_unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=22b6a5195fd9ca12 -C extra-filename=-22b6a5195fd9ca12 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern addr2line=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libaddr2line-55878229a6dee8c2.rmeta --extern alloc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liballoc-aee357274e23840a.rmeta --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern hashbrown=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libhashbrown-69808b7aa5c8ba9b.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta --extern miniz_oxide=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libminiz_oxide-702adafd35183efe.rmeta --extern object=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libobject-7c488f831e27c5e9.rmeta --extern panic_abort=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-64399cb767616d54.rmeta --extern panic_unwind=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-5183f393b9ae2b3d.rmeta --extern rustc_demangle=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_demangle-c71cf60847782f46.rmeta --extern std_detect=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libstd_detect-dfb26dd7a0521422.rmeta --extern unwind=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libunwind-f813818fd53f7023.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked --cfg backtrace_in_libstd`
    Checking rustc-std-workspace-std v1.99.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-std)
    Checking proc_macro v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/proc_macro)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name rustc_std_workspace_std --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/rustc-std-workspace-std/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=18ded89b63953e97 -C extra-filename=-18ded89b63953e97 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libstd-22b6a5195fd9ca12.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
     Running `/home/r/.cargo/bin/cargo-miri --crate-name proc_macro --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/proc_macro/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=9fb014dc1a05624b -C extra-filename=-9fb014dc1a05624b --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libstd-22b6a5195fd9ca12.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking unicode-width v0.1.10
     Running `/home/r/.cargo/bin/cargo-miri --crate-name unicode_width /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-width-0.1.10/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="std"' -C metadata=5e7d9db1b6723618 -C extra-filename=-5e7d9db1b6723618 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern compiler_builtins=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-bdfa0f27888814ba.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_std-18ded89b63953e97.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking getopts v0.2.21
     Running `/home/r/.cargo/bin/cargo-miri --crate-name getopts /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="std"' -C metadata=933ca1ac403ec826 -C extra-filename=-933ca1ac403ec826 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_core-f670947e254c203e.rmeta --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/librustc_std_workspace_std-18ded89b63953e97.rmeta --extern unicode_width=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libunicode_width-5e7d9db1b6723618.rmeta --cap-lints allow -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking test v0.0.0 (/home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/test)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name test --edition=2021 /home/r/.rustup/toolchains/miri/lib/rustlib/src/rust/library/test/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type dylib --crate-type rlib --emit=dep-info,metadata -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="panic-unwind"' --cfg 'feature="std_detect_dlsym_getauxval"' --cfg 'feature="std_detect_file_io"' -C metadata=81c91d4704279962 -C extra-filename=-81c91d4704279962 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern cfg_if=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcfg_if-39cbae399d97a223.rmeta --extern core=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libcore-97f8fc2bc46ff8b0.rmeta --extern getopts=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libgetopts-933ca1ac403ec826.rmeta --extern libc=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/liblibc-ba592fd96514433d.rmeta --extern panic_abort=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libpanic_abort-64399cb767616d54.rmeta --extern panic_unwind=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libpanic_unwind-5183f393b9ae2b3d.rmeta --extern proc_macro=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libproc_macro-9fb014dc1a05624b.rmeta --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libstd-22b6a5195fd9ca12.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Checking sysroot v0.0.0 (/tmp/.tmp9ESOHM)
     Running `/home/r/.cargo/bin/cargo-miri --crate-name sysroot lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=316 --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C embed-bitcode=no -C metadata=94fd9e3535f4b529 -C extra-filename=-94fd9e3535f4b529 --out-dir /tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/tmp/.tmp9ESOHM/target/release/deps --extern std=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libstd-22b6a5195fd9ca12.rmeta --extern test=/tmp/.tmp9ESOHM/target/x86_64-unknown-linux-gnu/release/deps/libtest-81c91d4704279962.rmeta -Cdebug-assertions=off -Coverflow-checks=on -Zforce-unstable-if-unmarked`
    Finished release [optimized] target(s) in 18.18s
A sysroot for Miri is now available in `/home/r/.cache/miri`.

There's only one --crate-name core here.

@bindsdev
Copy link

bindsdev commented Feb 2, 2023

It looks like cargo does both a regular build as well as a check build of several crates for some reason. Do you have build-std in .cargo/config.toml or something?

Yes, here is my config.toml:

[unstable]
build-std = ["core", "compiler_builtins", "alloc"]
build-std-features = ["compiler-builtins-mem"]

@RalfJung
Copy link
Member

RalfJung commented Feb 2, 2023

Ah, that would explain it then. We can't have cargo build std when we are just using cargo to build std our own way...

When build-std is set, I assume we want to skip the Miri sysroot setup entirely and let cargo handle everything?

@RalfJung RalfJung changed the title Running cargo miri setup yields multiple rmeta canidates for core found (on x86_64-unknown-linux-gnu) Running cargo miri setup fails when build-std is set globally May 13, 2023
@bindsdev
Copy link

bindsdev commented Sep 5, 2023

I came across this issue again while looking through the issue list. I would be interested in contributing a fix for this as it would be beneficial for me, and likely others, for Miri to work when build-std is set. I have looked through the source code a bit and I suspect a fix would require changing some code in the cargo-miri/src/phases.rs file. Would this be the right place? Any guidance on where to start would be appreciated.

@RalfJung
Copy link
Member

RalfJung commented Sep 5, 2023

The first step is to determine whether build-std is set or not. That sounds like we'd need to invoke cargo config get, somewhere in phase_cargo_miri, before setup gets called. And then when it is set, we'll need to figure out what to do -- probably skip the Miri sysroot setup, but the rest heavily depends on how exactly -Zbuild-std works inside cargo. So this could end up requiring a bunch of exploration and debugging the complicated flow of control between cargo-miri and cargo.

@bindsdev
Copy link

bindsdev commented Sep 7, 2023

the rest heavily depends on how exactly -Zbuild-std works inside cargo. So this could end up requiring a bunch of exploration and debugging the complicated flow of control between cargo-miri and cargo.

Would the way we build depend on what crates are specified in use with -Z build-std?

@RalfJung
Copy link
Member

RalfJung commented Sep 7, 2023

I hope not. But I don't know, the only way to figure this out is to try to implement this.

@RalfJung RalfJung added C-bug Category: This is a bug. A-cargo Area: affects the cargo wrapper (cargo miri) labels Mar 11, 2024
@VivekYadav7272
Copy link

Would just like to add that this also fails for Arduino Uno (avr) targets.
Here's my .cargo/config.toml

[build]
target = "atmega328p.json"

[unstable]
build-std = ["core"]

[target.'cfg(target_arch = "avr")']
runner = "ravedude uno --baudrate 9600 --open-console"

Here's atmega328p.json:

{
    "arch": "avr",
    "atomic-cas": false,
    "cpu": "atmega328p",
    "data-layout": "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8",
    "eh-frame-header": false,
    "exe-suffix": ".elf",
    "late-link-args": {
        "gcc": [
            "-lgcc"
        ]
    },
    "linker": "avr-gcc",
    "llvm-target": "avr-unknown-unknown",
    "max-atomic-width": 8,
    "no-default-libraries": false,
    "pre-link-args": {
        "gcc": [
            "-mmcu=atmega328p"
        ]
    },
    "relocation-model": "static",
    "target-c-int-width": "16",
    "target-pointer-width": "16"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants