You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download any developer snapshot from swift.org and try to run `swift test` in a package. The project will build, and then output the following error:
error: signalled(6): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-04-13-a.xctoolchain/usr/libexec/swift/pm/swiftpm-xctest-helper /<redacted>/swift-format/.build/x86_64-apple-macosx/debug/swift-formatPackageTests.xctest /var/folders/lp/b8svs5jj46d_g3t6smn3cj3h006b5z/T/TemporaryFile.ZxlFMg output:
{{ dyld: Library not loaded: @rpath/XCTest.framework/Versions/A/XCTest}}
{{ Referenced from: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-04-13-a.xctoolchain/usr/libexec/swift/pm/swiftpm-xctest-helper}}
{{ Reason: image not found }}
This seems to have broken sometime around the 5.2 cut, but I'm not sure exactly when.
If we run otool -l and compare the load commands of swiftpm-xctest-helper in a current toolchain and an older working toolchain, we see some differences:
Specifically, it looks like the one that's missing in the newer toolchains is @executable_path/../../../lib/swift/macosx, and that is where XCTest.swiftmodule lives; presumably if it found that, it would be able to resolve XCTest.framework from that overlay.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 51d2884b5d9a555b1fc271e9d6c258ea
Issue Description:
This may be similar to SR-12599.
Download any developer snapshot from swift.org and try to run `swift test` in a package. The project will build, and then output the following error:
error: signalled(6): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-04-13-a.xctoolchain/usr/libexec/swift/pm/swiftpm-xctest-helper /<redacted>/swift-format/.build/x86_64-apple-macosx/debug/swift-formatPackageTests.xctest /var/folders/lp/b8svs5jj46d_g3t6smn3cj3h006b5z/T/TemporaryFile.ZxlFMg output:
{{ dyld: Library not loaded: @rpath/XCTest.framework/Versions/A/XCTest}}
{{ Referenced from: /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-04-13-a.xctoolchain/usr/libexec/swift/pm/swiftpm-xctest-helper}}
{{ Reason: image not found }}
This seems to have broken sometime around the 5.2 cut, but I'm not sure exactly when.
If we run
otool -l
and compare the load commands ofswiftpm-xctest-helper
in a current toolchain and an older working toolchain, we see some differences:Broken (2020-04-13):
Load command 32
cmd LC_RPATH
cmdsize 32
path /usr/lib/swift (offset 12)
Load command 33
cmd LC_RPATH
cmdsize 32
path @loader_path (offset 12)
Load command 34
cmd LC_RPATH
cmdsize 224
path /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift-nightly-install/Applications/Xcode.app/Contents/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2020-04-13-a.xctoolchain/usr/lib/swift/macosx (offset 12)
Load command 35
cmd LC_RPATH
cmdsize 56
path @executable_path/../lib/swift/macosx (offset 12)
Working (2019-09-26):
Load command 33
cmd LC_RPATH
cmdsize 32
path /usr/lib/swift (offset 12)
Load command 34
cmd LC_RPATH
cmdsize 32
path @loader_path (offset 12)
Load command 35
cmd LC_RPATH
cmdsize 56
path @executable_path/../lib/swift/macosx (offset 12)
Load command 36
cmd LC_RPATH
cmdsize 56
path @executable_path/../lib/swift/pm/llbuild (offset 12)
...
Load command 39
cmd LC_RPATH
cmdsize 56
path @executable_path/../../../lib/swift/macosx (offset 12)
Specifically, it looks like the one that's missing in the newer toolchains is
@executable_path/../../../lib/swift/macosx
, and that is where XCTest.swiftmodule lives; presumably if it found that, it would be able to resolve XCTest.framework from that overlay.The text was updated successfully, but these errors were encountered: