cargo-geiger icon indicating copy to clipboard operation
cargo-geiger copied to clipboard

"dyld: Library not loaded" on macOS in crate with rust-toolchain file

Open jbg opened this issue 7 years ago • 2 comments

After cargo install cargo-geiger on macOS, trying to run it against a crate with a rust-toolchain file (info) in its root fails with a dynamic linking error:

$ cargo geiger
dyld: Library not loaded: @rpath/libproc_macro-4f1d545c303aa6cd.dylib
  Referenced from: /Users/.../.cargo/bin/cargo-geiger
  Reason: image not found
Abort trap: 6

jbg avatar Jan 29 '19 09:01 jbg

Interesting! Thanks for the report.

I've seen similar errors after running rustup update and I think it could have something to do with cargo linking to some dynamic library that is part of the Rust tools installation, but I'm just guessing now.

Do you have a theory on why this error occurs?

anderejd avatar Jan 29 '19 17:01 anderejd

We've had bunch of updates to cargo over the .. two years

And rust has had a lot of updates..

I have no way to replicate this issue at the moment -

@jbg mind sharing the crate as repro if it's public?

This seems to be very environment related issue that will be hard to tackle without repro

It seems to be some dynamic linking messing things

https://stackoverflow.com/a/17704255

pinkforest avatar Jan 06 '22 13:01 pinkforest