Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to cross compiling against MUSL. #170

Open
zaneenders opened this issue Sep 29, 2024 · 1 comment · May be fixed by #171
Open

Unable to cross compiling against MUSL. #170

zaneenders opened this issue Sep 29, 2024 · 1 comment · May be fixed by #171
Labels
good first issue Good for newcomers

Comments

@zaneenders
Copy link

SwiftNIO SSH commit hash: e0ad5be

Context:

Trying to compile swift-nio-ssh against MUSL getting the following errors.

/Users/zane/Downloads/swift-nio-ssh/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift:740:17: error: cannot find 'timespec' in scope
738 | extension DispatchWallTime {
739 |     init(secondsSinceEpoch: UInt64) {
740 |         let t = timespec(tv_sec: time_t(secondsSinceEpoch), tv_nsec: 0)
    |                 `- error: cannot find 'timespec' in scope
741 |         self = DispatchWallTime(timespec: t)
742 |     }

/Users/zane/Downloads/swift-nio-ssh/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift:740:34: error: cannot find 'time_t' in scope
738 | extension DispatchWallTime {
739 |     init(secondsSinceEpoch: UInt64) {
740 |         let t = timespec(tv_sec: time_t(secondsSinceEpoch), tv_nsec: 0)
    |                                  `- error: cannot find 'time_t' in scope
741 |         self = DispatchWallTime(timespec: t)
742 |     }

Steps to reproduce:

xcrun --toolchain swift swift build --swift-sdk aarch64-swift-linux-musl
# or 
xcrun --toolchain swift swift build --swift-sdk x86_64-swift-linux-musl

Environment

xcrun --toolchain swift swift --version
Apple Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: arm64-apple-macosx15.0

xcrun --toolchain swift swift sdk list
swift-6.0.1-RELEASE_static-linux-0.0.1

Operating system: 15.0 (24A335)

@Lukasa
Copy link
Contributor

Lukasa commented Sep 30, 2024

I don't know that this repo was ever ported to musl libc, but that would be handy. I'm going to mark this as a good first issue and ping a few folks who may want to do the work: @MaxDesiatov @Joannis.

@Lukasa Lukasa added the good first issue Good for newcomers label Sep 30, 2024
@zaneenders zaneenders linked a pull request Oct 1, 2024 that will close this issue
@Lukasa Lukasa linked a pull request Oct 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants