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
rustfmt broken on macOS Darwin with Library not loaded: @rpath/librustc_driver-fd9e092a1dc273d5.dylib #273920
Comments
After a very long time spent bisecting, I now know this was introduced by 8b51cdd (@alyssais since you authored this). Broken in 8b51cdd:
Working in c6f3c04 (the parent of 8b51cdd):
|
Ah I see, it's trying to load librustc_driver from the wrapper's lib directory, where it doesn't exist. I wonder how rustfmt decides where to load that from. Can we change that, or does the wrapper need to pass through lib? |
On Linux it links correctly:
So this needs some investigation from somebody on Darwin to determine what's different about linking there, and how it ends up using the wrong path. |
I suspect it might be because of these darwin specific prefixup commands: nixpkgs/pkgs/development/compilers/rust/rustfmt.nix Lines 24 to 27 in fa063ba
Changing |
Ah yes, that looks likely! Probably better to use |
clippy likely needs a similar fix |
Yes, clippy wasn't working either. Opened a PR to fix both: #274482 Thank you for the help! |
Describe the bug
rustfmt is broken on macOS.
Steps To Reproduce
Here's the output of
otool
if it's helpful:Expected behavior
rustfmt should run without crashing =)
Additional context
This feels like a recurrence of #231078
Notify maintainers
@globin @basvandijk
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: