Skip to content

PluginTests.testURLBasedPluginAPI fails building build tool library due to missing symbols with swiftbuild #8791

Open
@cmcgee1024

Description

@cmcgee1024

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

When running the PluginTests.testURLBasedPluginAPI test on Linux (Ubuntu 24.04.2 - Noble), with the swiftbuild build system it fails to link the build tool.

swift test --filter PluginTests.testURLBasedPluginAPI

    /tmp/Miscellaneous_Plugins_MySourceGenPluginUsingURLBasedAPI.vcbqt8/Miscellaneous_Plugins_MySourceGenPluginUsingURLBasedAPI/Sources/MySourceGenBuildToolLib/library.swift:8: error: undefined reference to '$sSy10FoundationE20replacingOccurrences2of4with7options5rangeSSqd___qd_0_SS0A10EssentialsE14CompareOptionsVSnySS5IndexVGSgtSyRd__SyRd_0_r0_lF'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: Ld /tmp/Miscellaneous_Plugins_MySourceGenPluginUsingURLBasedAPI.vcbqt8/Miscellaneous_Plugins_MySourceGenPluginUsingURLBasedAPI/.build/aarch64-unknown-linux-gnu/Products/Debug-linux/MyLocalTool normal failed with a nonzero exit code
    error: Build failed

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions