fix: Copy extra components on darwin#259
Conversation
I'm kinda confused. If these tools expect libLLVM at |
|
Great question. As far as I understand, rustup normally places There is however a second part to this story: llvm-tools-preview component ships |
Okay so they did the load path trick as well...
So does this mean if we install all components into a single derivation instead of symlinking (and make relevant components depends on |
|
Anyways, thanks for the fix! |
It should work, but I didn't test it. It would also require identifying the exact set of components that have this dependency and introducing an extra dependency to bring in a library that is already bundled with other components. Thanks for merging! |
Hi! After updating to a fresh version of rust I've started getting these kinds of errors from
rust-lldon macos:It looks like recent versions of helper binaries link dynamically to
libLLVM.dylib. The tools live underlib/rustlib/<target>/binand their rpath include@loader_path/../lib, so dyld expects LLVM atlib/rustlib/<target>/lib/libLLVM.dylib. However, the rustc component provideslibLLVM.dylibunder:lib/libLLVM.dylib, current fix symlinks thelibLLVM.dylibinto the corresponding relative path.This issue was likely triggered by:
rust-lang/rust#157205
There is also
rust-lang/rust#157557
which will likely affect
x86_64-darwinas well.I've tested the fix on
aarch64-darwinandx86_64-linuxmanually (although withllvm-tools-previewcomponent enabled).