Skip to content

Conversation

@gregcotten
Copy link
Contributor

Compiling with Swift 6.1 on Linux fails with stuff like

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:372:50: error: cannot find 'SOCK_STREAM' in scope

@_alwaysEmitIntoClient
internal var _SOCK_STREAM: CInterop.SocketType { SOCK_STREAM }
                                                 `- error: cannot find 'SOCK_STREAM' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:375:49: error: cannot find 'SOCK_DGRAM' in scope

@_alwaysEmitIntoClient
internal var _SOCK_DGRAM: CInterop.SocketType { SOCK_DGRAM }
                                                `- error: cannot find 'SOCK_DGRAM' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:378:47: error: cannot find 'SOCK_RAW' in scope

@_alwaysEmitIntoClient
internal var _SOCK_RAW: CInterop.SocketType { SOCK_RAW }
                                              `- error: cannot find 'SOCK_RAW' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:381:47: error: cannot find 'SOCK_RDM' in scope

@_alwaysEmitIntoClient
internal var _SOCK_RDM: CInterop.SocketType { SOCK_RDM }
                                              `- error: cannot find 'SOCK_RDM' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:384:53: error: cannot find 'SOCK_SEQPACKET' in scope

@_alwaysEmitIntoClient
internal var _SOCK_SEQPACKET: CInterop.SocketType { SOCK_SEQPACKET }
                                                    `- error: cannot find 'SOCK_SEQPACKET' in scope

#if os(Linux)

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:388:48: error: cannot find 'SOCK_DCCP' in scope
#if os(Linux)
@_alwaysEmitIntoClient
internal var _SOCK_DCCP: CInterop.SocketType { SOCK_DCCP }
                                               `- error: cannot find 'SOCK_DCCP' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:391:52: error: cannot find 'SOCK_NONBLOCK' in scope

@_alwaysEmitIntoClient
internal var _SOCK_NONBLOCK: CInterop.SocketType { SOCK_NONBLOCK }
                                                   `- error: cannot find 'SOCK_NONBLOCK' in scope

@_alwaysEmitIntoClient

/swift-bundler/.build/checkouts/Socket/Sources/Socket/System/Constants.swift:394:51: error: cannot find 'SOCK_CLOEXEC' in scope

@_alwaysEmitIntoClient
internal var _SOCK_CLOEXEC: CInterop.SocketType { SOCK_CLOEXEC }
                                                  `- error: cannot find 'SOCK_CLOEXEC' in scope
#endif

@gregcotten
Copy link
Contributor Author

care to pull these changes in?

@gregcotten
Copy link
Contributor Author

@colemancda, now that Swift 6.1 is generally available, anyone trying to use this package on Linux will be met with these build errors!

@colemancda
Copy link
Member

Sorry, just seeing this. I happened to fix this myself.

@colemancda colemancda merged commit e2e20b4 into PureSwift:main Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants