-
Notifications
You must be signed in to change notification settings - Fork 59
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
Delocate "@rpath" when search paths include "/usr/lib/swift" #204
Comments
Note, using So the solution is probably to make |
A more verbose output from Delocate |
Thank you! Any clue as to why these libraries might be output with "@rpath/" rather than "/usr/lib" by a compiler? |
If I remember correctly. Because the "install name" of An install name with |
Delocate would be less confused if these libraries were installed in |
Looks like Swift installs to I'm considering changing Delocate to only exclude libraries directly inside of |
I see, thanks for looking into it, I really appreciate it! It's clear to me now this isn't a bug or unexpected behavior with Delocate, so I'll close the issue. |
It isn't completely unexpected, but it can still be a bug, one that's affecting bundling the Swift runtime. I'd prefer this issue was left open until a solution is found. System libraries are ones which are always available on every MacOS system. If Swift has to be installed, then it isn't a system library and Delocate should not ignore it like it's doing now. |
I know a little more now. On my arm64 (aka aarch64) macOS device:
Is this a Swift compiler bug? Or is it something that I think the only way workaround for |
Can you send the output with |
Using
Yes, I think that's the best way forward. |
A workaround for now is to use the |
Describe the bug
delocate
works with/usr/lib/swift/libswiftCore.dylib
paths, but fails with@rpath/libswiftCore.dylib
when the search path includes "/usr/lib/swift".Expected behavior
I'm not sure. This might not be a bug; I can understand why the latter might not work. Do you have any pointers as to why the Swift package manager (
swift build
) might output@rpath/
entries in one environment, and/usr/lib/swift/
entries in another? I would really appreciate some help.See additional context.
Platform (please complete the following information):
Additional context
When I build a Swift binary on my personal laptop,
otool -L
outputs a bunch of paths likeMy "/usr/lib/swift" does not include those directories, but the binary works fine (I don't understand why) and
delocate
works fine as well.When I do the same in a GitHub workflow, the
otool -L
output instead showsI don't know where the discrepancy comes from exactly, but I know that the macOS version is different and that the CI is using Xcode_15.1.app whereas I'm using the Xcode CommandLineTools.
Importantly, however, the error messages show that the RPATH includes
/usr/lib/swift
:So I would expect delocate to have the same behavior in my CI as on my personal laptop.
The text was updated successfully, but these errors were encountered: