Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

swift test linker issue on macOS #486

@dan-zheng

Description

@dan-zheng

Reproducer (macOS-only):

$ swift test
[84/84] Linking TensorFlowPackageTests
2019-08-26 16:25:01.853 xctest[37643:14366877] The bundle “TensorFlowPackageTests.xctest” couldn’t be loaded. Try reinstalling the bundle.
2019-08-26 16:25:01.853 xctest[37643:14366877] (dlopen(/Users/danielzheng/swift-apis/.build/x86_64-apple-macosx/debug/TensorFlowPackageTests.xctest/Contents/MacOS/TensorFlowPackageTests, 265): Symbol not found: _$s11AllKeyPathss0B12PathIterablePTl
  Referenced from: /Users/danielzheng/swift-apis/.build/x86_64-apple-macosx/debug/TensorFlowPackageTests.xctest/Contents/MacOS/TensorFlowPackageTests
  Expected in: /usr/lib/swift/libswiftCore.dylib
 in /Users/danielzheng/swift-apis/.build/x86_64-apple-macosx/debug/TensorFlowPackageTests.xctest/Contents/MacOS/TensorFlowPackageTests)

The key issue is /usr/lib/swift/libswiftCore.dylib. After ABI stability, the linker attempts to link the OS-vendored standard library instead of the one in the toolchain.

This issue is related to swiftlang/swift#25328. We need to revert the change that introduced linking /usr/lib/swift/libswiftCore.dylib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions