rust error: image not found
Closed this issue · 7 comments
I downloaded https://github.com/michaeleisel/zld/releases/tag/1.3.2, unzipped and untarred, and moved zld
.
I added this
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-fuse-ld=/Users/david.jaffe/bin/zld"]
to .cargo/config
in my rust workspace.
Then I did cargo b
, yielding this error:
= note: dyld: Library not loaded: @rpath/libLTO.dylib
Referenced from: /Users/david.jaffe/bin/zld
Reason: image not found
clang: error: unable to execute command: Abort trap: 6
This is with macOS Catalina 10.15.7, using rust 1.53.0.
do you have xcode installed?
I'm not sure what I had, but I've now gone to the apple developer site and installed xcode 12.5.
and you still have the same issue?
Ah. I downloaded it but did not install it. It won't install on this version of macOS. Let me try installing xcode 12.4.
Same error. I don't know anything about xcode. It is in my Downloads directory as Xcode.app and seems to be functional. I assume that xcode files have been sprinkled elsewhere in the filesystem. Is it possible that I need to add something to my path or some such?
run xcode-select -s /path/to/Xcode.app
Yes, that worked, thank you very much!