Skip to content

Cross compile with Static Linux SDK #55

@zaneenders

Description

@zaneenders

Describe the bug
Attempting to Cross compile this package results in an error.

To Reproduce
Steps to reproduce the behavior:

Running the following command to build this package

swift build --swift-sdk x86_64-swift-linux-musl -c release
Subprocess/Sources/Subprocess/Platforms/Subprocess+Linux.swift:275:46: error: value of type 'siginfo_t' has no member '_sifields'
273 |                 switch siginfo.si_code {
274 |                 case .init(CLD_EXITED):
275 |                     status = .exited(siginfo._sifields._sigchld.si_status)
    |                                              `- error: value of type 'siginfo_t' has no member '_sifields'
276 |                 case .init(CLD_KILLED), .init(CLD_DUMPED):
277 |                     status = .unhandledException(siginfo._sifields._sigchld.si_status)

Expected behavior
I think cross compilation support is intended as import Musl is at the top of the file.

Environment (please complete the following information):

# OS
Ubuntu 24 

# Swift version
Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu

# SDK version
swift-6.0.3-RELEASE_static-linux-0.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions