"dyld: Library not loaded" on macOS in crate with rust-toolchain file
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
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?
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