Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

mirai: error while loading shared libraries: librustc_driver-0c79f0a768565e4a.so: cannot open shared object file: No such file or directory #1270

Open
VorpalBlade opened this issue Jul 15, 2024 · 4 comments

Comments

@VorpalBlade
Copy link

VorpalBlade commented Jul 15, 2024

Issue

I tried to run mirai on one of my projects (a simple no-std library for parsing INI files) and got a very strange error.

Steps to Reproduce

$ git clone https://github.com/VorpalBlade/ini-roundtrip
$ cd ini-roundtrip
$ git checkout 9d2589f4d5a845a9a19249e5b3bfe6b49c893c85
$ cargo mirai
    Checking cfg-if v1.0.0
    Checking ini-roundtrip v0.1.3 (/home/arvid/src/chmm/ini-roundtrip)
/home/arvid/.cargo/bin/mirai: error while loading shared libraries: librustc_driver-0c79f0a768565e4a.so: cannot open shared object file: No such file or directory
error: could not compile `ini-roundtrip` (lib)

Expected Behavior

Not give a strange error aout a rustc driver .so file?

Actual Results

/home/arvid/.cargo/bin/mirai: error while loading shared libraries: librustc_driver-0c79f0a768565e4a.so: cannot open shared object file: No such file or directory

Environment

Rust version (rustc --version): rustc 1.79.0 (129f3b996 2024-06-10)
Mirai commit: 6a91ee0
OS: Arch Linux (rolling release)
Rust is installed via rustup

@VorpalBlade
Copy link
Author

Update: This seems to happen on any project I try. Even a simple hello world one.

@heisen-li
Copy link

heisen-li commented Jul 15, 2024

It happened to me too.

@VorpalBlade
Copy link
Author

LD_LIBRARY_PATH=$HOME/.rustup/toolchains/nightly-2023-12-07-x86_64-unknown-linux-gnu/lib/ cargo mirai works as a workaround for me. This suggests somehow the linking is screwed up, perhaps it should use rpath?

@hermanventer
Copy link
Contributor

It seems that something has changed in cargo that breaks plugins like MIRAI. I'll try to look into it, but it is going to take a while before I can get to it.

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

No branches or pull requests

3 participants