-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
-C rpath does not work on OS X #17219
Comments
I'm running into this when trying to build something with the |
Confirmed here as well. It happens when trying to build rustbook as well as other things. Somehow |
Triage: I do not have a mac, so I cannot try to reproduce again today. Anyone? |
I don't know how to get output like what @comex pasted with the load commands. However, I have this:
That is, |
There is still weirdness in this area, but |
With just
rustc -C prefer-dynamic test.rs
, I get a binary with load commands that look like this:This is not an absolute path, and in fact does not even exist - since I downloaded rustc from a nightly, the real path is
/Users/comex/rust-nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustrt-4e7c5e5c.dylib
. The pre-install path comes from that library'sLC_ID_DYLIB
.The binary does not run, but so far that's expected behavior and setting
DYLD_LIBRARY_PATH
works. However, as far as I can tell,-C rpath
is supposed to make a binary with the correct path built in. It does not. It adds a-rpath
entry, but on OS X,-rpath
is documented as follows:While
LC_RPATH
shows up in the binary, theLC_LOAD_DYLIB
load paths are the same oldx86_64-apple-darwin/etc/etc
, so the rpath is not used and nothing changes.The text was updated successfully, but these errors were encountered: