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

Error on macOS #2

Open
Edivad99 opened this issue Sep 19, 2024 · 4 comments
Open

Error on macOS #2

Edivad99 opened this issue Sep 19, 2024 · 4 comments

Comments

@Edivad99
Copy link

Issue

When I run cargo mirai I get this error:

davide@MBP-di-Davide hello-rust % cargo mirai
    Checking hello-rust v0.1.0 (/Users/davide/Sviluppo/Rust/hello-rust)
dyld[48165]: Library not loaded: @rpath/librustc_driver-5e4bb888e3e572f4.dylib
  Referenced from: <2A8CD396-59E0-3EC6-9DED-EFE5E73E446E> /Users/davide/.cargo/bin/mirai
  Reason: tried: '/Users/davide/Sviluppo/Rust/hello-rust/target/debug/deps/librustc_driver-5e4bb888e3e572f4.dylib' (no such file), '/Users/davide/.rustup/toolchains/stable-aarch64-apple-darwin/lib/librustc_driver-5e4bb888e3e572f4.dylib' (no such file), '/Users/davide/lib/librustc_driver-5e4bb888e3e572f4.dylib' (no such file), '/usr/local/lib/librustc_driver-5e4bb888e3e572f4.dylib' (no such file), '/usr/lib/librustc_driver-5e4bb888e3e572f4.dylib' (no such file, not in dyld cache)
error: could not compile `hello-rust` (bin "hello-rust")

Caused by:
  process didn't exit successfully: `/Users/davide/.cargo/bin/cargo-mirai /Users/davide/.rustup/toolchains/nightly-2023-12-30-aarch64-apple-darwin/bin/rustc --crate-name hello_rust --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=130 --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C metadata=064f3c2b5f4833d2 -C extra-filename=-064f3c2b5f4833d2 --out-dir /Users/davide/Sviluppo/Rust/hello-rust/target/debug/deps -C incremental=/Users/davide/Sviluppo/Rust/hello-rust/target/debug/incremental -L dependency=/Users/davide/Sviluppo/Rust/hello-rust/target/debug/deps --cfg mirai -Z always_encode_mir` (exit status: 255)

Steps to Reproduce

git clone https://github.com/facebookexperimental/MIRAI.git
cd MIRAI
cargo install --locked --path ./checker
cd ..
cargo new hello_world
cd hello_world
cargo mirai

Expected Behavior

Not to crash

Environment

Rust version (rustc --version)
rustc 1.81.0 (eeb90cda1 2024-09-04)

@linchengLi-l
Copy link

Hi. Have you solved the problem? I did not get results after running cargo mirai in the root directory of a project.

@Edivad99
Copy link
Author

@linchengLi-l nope

@hermanventer
Copy link
Collaborator

I have had other reports of this as well. Sadly, I can't reproduce it locally. I've been told that, for Linux, setting the LD_LIBRARY_PATH variable does the trick. For your case, DYLD_LIBRARY_PATH=/Users/davide/.rustup/toolchains/nightly-2023-12-30-aarch64-apple-darwin/lib might do the trick.

This is a change in behavior in the Rust runtime that happened somewhere in the last year. If anyone has any pointers to what is really going on here, I'd very happy to hear from you.

@hermanventer
Copy link
Collaborator

It is conceivable that the problem David Tolnay kindly fixed in #4, is related to this. If syncing up to the latest version of MIRAI makes the problem go away for you, I'd very much appreciate hearing from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants