-
Notifications
You must be signed in to change notification settings - Fork 266
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
libXCTest.so on Linux has no RUNPATH #432
Comments
I argued about adding @compnerd, just pick one place to add it for ELF platforms like linux, either |
@gwynne, guessing he's busy, I suggest you submit a pull to add the flags |
@buttaface I think that |
@gwynne, if you submit a pull adding that, we can finally get it in. |
When building on Linux, the
libXCTest.so
which is installed in/usr/lib/swift/linux/
ends up with noRUNPATH
s whatsoever, neither$ORIGIN
nor the toolchain's lib install directory. This has the effect of enforcing an entirely artificial link-ordering dependency when building Linuxxctest
executables due to its dependency onlibswift_RegexParser
. Control over link ordering is not generally available via SwiftPM, and is in fact actively discouraged by the default usage ofswift-autolink-extract
. Add to this that there is no attempt even by XCTest itself to guarantee its own build ordering, having relied for some time now on accident and luck to hide the problem, and its seem fairly obvious that the ordering dependency is both unintentional and undesirable.I'm not clear enough on how the Linux toolchain is set up to understand whether the fix is to add a
$ORIGIN
rpath, to remove the-no-toolchain-stdlib-rpath
flag from the XCTest CMake build (both of which successfully solved the linkage problem when I tried them), or some other approach.This issue was revealed by swiftlang/swift#64312; specific details are given by swiftlang/swift#64312 (comment) and swiftlang/swift#64312 (comment).
The text was updated successfully, but these errors were encountered: