Skip to content

Fail to build (link) executable using generated swift-sdk #7222

Open
@krzyzanowskim

Description

@krzyzanowskim

Description

Building executable with sdk generated with https://github.com/apple/swift-sdk-generator fail on unable to find linker error message

Expected behavior

build

Actual behavior

fatal error

Steps to reproduce

git clone https://github.com/apple/swift-sdk-generator.git
cd swift-sdk-generator
swift run swift-sdk-generator
swift experimental-sdk install Bundles/5.9.2-RELEASE_ubuntu_jammy_aarch64.artifactbundle

mkdir hello-world
cd hello-world
swift-package init --type=executable

swift build --experimental-swift-sdk 5.9.2-RELEASE_ubuntu_jammy_aarch64

error unable to find library. the file at the path exists

ld.lld: error: unable to find library -ld-path=/Users/marcinkrzyzanowski/Library/org.swift.swiftpm/swift-sdks/5.9.2-RELEASE_ubuntu_jammy_aarch64.artifactbundle/5.9.2-RELEASE_ubuntu_jammy_aarch64/aarch64-unknown-linux-gnu/swift.xctoolchain/usr/bin/ld.lld
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
error: fatalError

Swift Package Manager version/commit hash

3ce3894

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

swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions