Build Information
Failed to build HttpSwift, reference master (fd66de
), with Swift 6.1 for Android on 27 May 2025 09:28:59 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/BiAtoms/Http.swift.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/BiAtoms/Http.swift
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at fd66de4 Ignore nonpassing test
Submodule path 'Sources/Frameworks/RequestSwift': checked out '47cea3de9cb961f77c659a27894d32454b42e25f'
Submodule path 'Sources/Frameworks/RequestSwift/Sources/Frameworks/SocketSwift': checked out '36911c13adfe12859ed43dcba878052b1897fcd3'
Submodule path 'Sources/Frameworks/SocketSwift': checked out '36911c13adfe12859ed43dcba878052b1897fcd3'
Submodule 'Sources/Frameworks/RequestSwift' (https://github.com/BiAtoms/Request.swift) registered for path 'Sources/Frameworks/RequestSwift'
Submodule 'Sources/Frameworks/SocketSwift' (https://github.com/BiAtoms/Socket.swift) registered for path 'Sources/Frameworks/SocketSwift'
Cloning into '/host/spi-builder-workspace/Sources/Frameworks/RequestSwift'...
Cloning into '/host/spi-builder-workspace/Sources/Frameworks/SocketSwift'...
Submodule 'Sources/Frameworks/SocketSwift' (https://github.com/BiAtoms/Socket.swift) registered for path 'Sources/Frameworks/RequestSwift/Sources/Frameworks/SocketSwift'
Cloning into '/host/spi-builder-workspace/Sources/Frameworks/RequestSwift/Sources/Frameworks/SocketSwift'...
Cloned https://github.com/BiAtoms/Http.swift.git
Revision (git rev-parse @):
fd66de454656b4c385ffca16a3d46675e51eb649
SUCCESS checkout https://github.com/BiAtoms/Http.swift.git at master
========================================
Build
========================================
Selected platform: android
Swift version: 6.1
Building package at path: $PWD
https://github.com/BiAtoms/Http.swift.git
https://github.com/BiAtoms/Http.swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "socket.swift",
"requirement" : {
"range" : [
{
"lower_bound" : "2.4.0",
"upper_bound" : "2.5.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/BiAtoms/Socket.swift.git"
},
{
"identity" : "request.swift",
"requirement" : {
"range" : [
{
"lower_bound" : "2.3.0",
"upper_bound" : "2.4.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/BiAtoms/Request.swift.git"
}
],
"manifest_display_name" : "HttpSwift",
"name" : "HttpSwift",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "HttpSwift",
"targets" : [
"HttpSwift"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "HttpSwiftTests",
"module_type" : "SwiftTarget",
"name" : "HttpSwiftTests",
"path" : "Tests/HttpSwiftTests",
"product_dependencies" : [
"RequestSwift"
],
"sources" : [
"HttpSwiftTests.swift"
],
"target_dependencies" : [
"HttpSwift"
],
"type" : "test"
},
{
"c99name" : "HttpSwift",
"module_type" : "SwiftTarget",
"name" : "HttpSwift",
"path" : "Sources",
"product_dependencies" : [
"SocketSwift"
],
"product_memberships" : [
"HttpSwift"
],
"sources" : [
"ErrorHandler.swift",
"File.swift",
"Helper.swift",
"Regex.swift",
"Request.swift",
"RequestParser.swift",
"Response.swift",
"ResponseWriter.swift",
"Route.swift",
"Router.swift",
"Server+Methods.swift",
"Server.swift",
"ServerError.swift",
"StaticServer.swift",
"Url.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:9f3c606dcd2a4f06d17ba472aa533c43685ba7ba19a5c9bc23518a066eb7f86a
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
Fetching https://github.com/BiAtoms/Socket.swift.git
Fetching https://github.com/BiAtoms/Request.swift.git
[1/299] Fetching request.swift
[300/723] Fetching request.swift, socket.swift
Fetched https://github.com/BiAtoms/Request.swift.git from cache (0.25s)
Fetched https://github.com/BiAtoms/Socket.swift.git from cache (0.25s)
Computing version for https://github.com/BiAtoms/Request.swift.git
Computed https://github.com/BiAtoms/Request.swift.git at 2.3.0 (0.73s)
Computing version for https://github.com/BiAtoms/Socket.swift.git
Computed https://github.com/BiAtoms/Socket.swift.git at 2.4.0 (0.54s)
Fetching https://github.com/Zewo/CLibreSSL.git
[1/39] Fetching clibressl
Fetched https://github.com/Zewo/CLibreSSL.git from cache (0.18s)
Computing version for https://github.com/Zewo/CLibreSSL.git
Computed https://github.com/Zewo/CLibreSSL.git at 3.1.0 (0.67s)
Creating working copy for https://github.com/Zewo/CLibreSSL.git
Working copy of https://github.com/Zewo/CLibreSSL.git resolved at 3.1.0
Creating working copy for https://github.com/BiAtoms/Request.swift.git
Working copy of https://github.com/BiAtoms/Request.swift.git resolved at 2.3.0
Creating working copy for https://github.com/BiAtoms/Socket.swift.git
Working copy of https://github.com/BiAtoms/Socket.swift.git resolved at 2.4.0
warning: 'clibressl': ignoring declared target(s) 'CLibreSSL' in the system package
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-24593BA9C3E375BF.txt
[4/11] Compiling SocketSwift Socket.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:13:25: error: cannot find type 'in_port_t' in scope
11 | public typealias FileDescriptor = Int32
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
| `- error: cannot find type 'in_port_t' in scope
14 | public typealias SocketAddress = sockaddr
15 | public typealias TimeValue = timeval
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:14:34: error: cannot find type 'sockaddr' in scope
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
14 | public typealias SocketAddress = sockaddr
| `- error: cannot find type 'sockaddr' in scope
15 | public typealias TimeValue = timeval
16 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:132:55: error: cannot find 'POLLIN' in scope
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| `- error: cannot find 'POLLIN' in scope
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:133:56: error: cannot find 'POLLOUT' in scope
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| `- error: cannot find 'POLLOUT' in scope
134 | }
135 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:26:41: error: cannot find 'socket' in scope
24 |
25 | required public init(_ family: Family, type: Type = .stream, protocol: Protocol = .tcp) throws {
26 | self.fileDescriptor = try ing { socket(family.rawValue, type.rawValue, `protocol`.rawValue) }
| `- error: cannot find 'socket' in scope
27 | }
28 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:46:34: error: cannot find 'recv' in scope
44 | return try tls.read(buffer, size: size)
45 | }
46 | let received = try ing { recv(fileDescriptor, buffer, size, 0) }
| `- error: cannot find 'recv' in scope
47 | return received
48 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:79:32: error: cannot find 'errno' in scope
77 | let written = OS.write(fileDescriptor, buffer, size)
78 | if written <= 0 { //see http://man7.org/linux/man-pages/man2/write.2.html#RETURN_VALUE
79 | throw Error(errno: errno)
| `- error: cannot find 'errno' in scope
80 | }
81 |
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:97:19: error: cannot find 'setsockopt' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'setsockopt' in scope
98 | }
99 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:97:46: error: cannot find 'SOL_SOCKET' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'SOL_SOCKET' in scope
98 | }
99 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:123:44: error: cannot find 'sockaddr' in scope
121 |
122 | open func accept() throws -> Self {
123 | var addrlen: socklen_t = 0, addr = sockaddr()
| `- error: cannot find 'sockaddr' in scope
124 | let client = try ing { OS.accept(fileDescriptor, &addr, &addrlen) }
125 | return type(of: self).init(with: client)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:146:18: error: cannot find 'pollfd' in scope
144 | /// - Throws: Socket.Error holding `errno`
145 | open func wait(for option: WaitOption, timeout: TimeInterval, retryOnInterrupt: Bool = true) throws -> Bool {
146 | var fd = pollfd() //swift zeroes out memory of any struct. no need to memset 0
| `- error: cannot find 'pollfd' in scope
147 | fd.fd = fileDescriptor
148 | fd.events = Int16(option.rawValue)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:152:18: error: cannot find 'poll' in scope
150 | var rc: Int32 = 0
151 | repeat {
152 | rc = poll(&fd, 1, Int32(timeout * 1000))
| `- error: cannot find 'poll' in scope
153 | } while retryOnInterrupt && rc == -1 && errno == EINTR //retry on interrupt
154 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:153:49: error: cannot find 'errno' in scope
151 | repeat {
152 | rc = poll(&fd, 1, Int32(timeout * 1000))
153 | } while retryOnInterrupt && rc == -1 && errno == EINTR //retry on interrupt
| `- error: cannot find 'errno' in scope
154 |
155 | //-1 will throw error, 0 means timeout, otherwise success
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:168:21: error: cannot find 'addrinfo' in scope
166 | /// - Throws: Domain name not resolved
167 | open func addresses(for host: String, port: Port) throws -> [SocketAddress] {
168 | var hints = addrinfo()
| `- error: cannot find 'addrinfo' in scope
169 |
170 | //TODO: set correct values of current socket
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:175:41: error: cannot find type 'addrinfo' in scope
173 | hints.ai_protocol = Protocol.tcp.rawValue
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
| `- error: cannot find type 'addrinfo' in scope
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
177 | // unable to resolve
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:176:12: error: cannot find 'getaddrinfo' in scope
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
| `- error: cannot find 'getaddrinfo' in scope
177 | // unable to resolve
178 | throw Error(errno: 11) //TODO: fix this thing
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:180:17: error: cannot find 'freeaddrinfo' in scope
178 | throw Error(errno: 11) //TODO: fix this thing
179 | }
180 | defer { freeaddrinfo(addrs) }
| `- error: cannot find 'freeaddrinfo' in scope
181 |
182 | var result: [SocketAddress] = []
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:183:51: error: cannot infer type of closure parameter '$0' without a type annotation
181 |
182 | var result: [SocketAddress] = []
183 | for addr in sequence(first: addrs!, next: { $0.pointee.ai_next }) {
| `- error: cannot infer type of closure parameter '$0' without a type annotation
184 | result.append(addr.pointee.ai_addr.pointee)
185 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:200:23: error: cannot find 'sockaddr_in' in scope
198 | /// - Returns: Local port to which the socket is bound.
199 | open func port() throws -> Port {
200 | var address = sockaddr_in()
| `- error: cannot find 'sockaddr_in' in scope
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:202:77: error: cannot find 'sockaddr' in scope
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| `- error: cannot find 'sockaddr' in scope
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:202:53: error: generic parameter 'T' could not be inferred
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| `- error: generic parameter 'T' could not be inferred
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
Swift.UnsafeMutableRawPointer.assumingMemoryBound:2:13: note: in call to function 'assumingMemoryBound(to:)'
1 | struct UnsafeMutableRawPointer {
2 | public func assumingMemoryBound<T>(to: T.Type) -> UnsafeMutablePointer<T> where T : ~Copyable}
| `- note: in call to function 'assumingMemoryBound(to:)'
3 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:204:19: error: cannot find 'getsockname' in scope
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
| `- error: cannot find 'getsockname' in scope
205 |
206 | return Port(address.sin_port.bigEndian)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:214:33: error: cannot infer contextual base in reference to member 'reuseAddress'
212 |
213 | let socket = try self.init(.inet)
214 | try socket.set(option: .reuseAddress, true)
| `- error: cannot infer contextual base in reference to member 'reuseAddress'
215 | try socket.bind(port: port, address: address)
216 | try socket.listen(backlog: maxPendingConnection)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:58: error: cannot convert value of type 'Int32' to expected argument type '__kernel_suseconds_t' (aka 'Int')
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type '__kernel_suseconds_t' (aka 'Int')
256 | }
257 | }
[5/11] Compiling SocketSwift Protocol.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:18:58: error: cannot find 'IPPROTO_UDP' in scope
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| `- error: cannot find 'IPPROTO_UDP' in scope
19 | }
20 | }
[6/12] Compiling SocketSwift Option.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
[7/12] Compiling SocketSwift Family.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:17:52: error: cannot find 'AF_INET6' in scope
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| `- error: cannot find 'AF_INET6' in scope
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:18:51: error: cannot find 'AF_UNIX' in scope
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| `- error: cannot find 'AF_UNIX' in scope
19 | }
20 | }
[8/12] Compiling SocketSwift OS.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[9/12] Compiling SocketSwift TLS.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:28: error: cannot find 'SSLCreateContext' in scope
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot find 'SSLCreateContext' in scope
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:45: error: 'nil' requires a contextual type
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: 'nil' requires a contextual type
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:69: error: cannot infer contextual base in reference to member 'serverSide'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'serverSide'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:96: error: cannot infer contextual base in reference to member 'streamType'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'streamType'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:96:13: error: cannot find 'SSLSetIOFuncs' in scope
94 | self.fdPtr.pointee = fd
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
| `- error: cannot find 'SSLSetIOFuncs' in scope
97 | SSLSetConnection(context, fdPtr)
98 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:97:13: error: cannot find 'SSLSetConnection' in scope
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
97 | SSLSetConnection(context, fdPtr)
| `- error: cannot find 'SSLSetConnection' in scope
98 |
99 | if config.isServer {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:100:17: error: cannot find 'SSLSetCertificate' in scope
98 |
99 | if config.isServer {
100 | SSLSetCertificate(context, config.certificate)
| `- error: cannot find 'SSLSetCertificate' in scope
101 | } else {
102 | if let peerName = config.peer {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:103:21: error: cannot find 'SSLSetPeerDomainName' in scope
101 | } else {
102 | if let peerName = config.peer {
103 | SSLSetPeerDomainName(context, peerName, peerName.count)
| `- error: cannot find 'SSLSetPeerDomainName' in scope
104 | }
105 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:107:21: error: cannot find 'SSLSetSessionOption' in scope
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot find 'SSLSetSessionOption' in scope
108 | }
109 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:107:51: error: cannot infer contextual base in reference to member 'breakOnServerAuth'
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot infer contextual base in reference to member 'breakOnServerAuth'
108 | }
109 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:117:25: error: cannot find type 'OSStatus' in scope
115 | try ing { tls_handshake(context) }
116 | #else
117 | var status: OSStatus = -1
| `- error: cannot find type 'OSStatus' in scope
118 | repeat {
119 | status = SSLHandshake(context)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:119:26: error: cannot find 'SSLHandshake' in scope
117 | var status: OSStatus = -1
118 | repeat {
119 | status = SSLHandshake(context)
| `- error: cannot find 'SSLHandshake' in scope
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:120:31: error: cannot find 'errSSLWouldBlock' in scope
118 | repeat {
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
| `- error: cannot find 'errSSLWouldBlock' in scope
121 | if status != noErr && status != errSSLPeerAuthCompleted {
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:121:26: error: cannot find 'noErr' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'noErr' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:121:45: error: cannot find 'errSSLPeerAuthCompleted' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'errSSLPeerAuthCompleted' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:133:16: error: cannot find 'SSLWrite' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'SSLWrite' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:133:61: error: cannot find 'noErr' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'noErr' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:145:16: error: cannot find 'SSLRead' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'SSLRead' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:145:61: error: cannot find 'noErr' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'noErr' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:157:13: error: cannot find 'SSLClose' in scope
155 | tls_free(context);
156 | #else
157 | SSLClose(context)
| `- error: cannot find 'SSLClose' in scope
158 | fdPtr.deallocate()
159 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:167:38: error: cannot find 'kSecImportExportPassphrase' in scope
165 | open class func importCert(at path: URL, password: String) -> Certificate {
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
| `- error: cannot find 'kSecImportExportPassphrase' in scope
168 |
169 | var items: CFArray?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:169:20: error: cannot find type 'CFArray' in scope
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
168 |
169 | var items: CFArray?
| `- error: cannot find type 'CFArray' in scope
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:170:22: error: cannot find 'SecPKCS12Import' in scope
168 |
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
| `- error: cannot find 'SecPKCS12Import' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:171:26: error: cannot find 'noErr' in scope
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
| `- error: cannot find 'noErr' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:173:52: error: cannot find 'kSecImportItemIdentity' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
| `- error: cannot find 'kSecImportItemIdentity' in scope
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
175 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:174:47: error: cannot find 'kSecImportItemCertChain' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find 'kSecImportItemCertChain' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:174:87: error: cannot find type 'SecCertificate' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find type 'SecCertificate' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:223:20: error: cannot find 'recv' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
223 | let read = recv(fd, data, bytesToRead, 0)
| `- error: cannot find 'recv' in scope
224 | dataLength.pointee = read
225 | if read > 0 {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:234:16: error: cannot find 'errno' in scope
232 |
233 | dataLength.pointee = 0
234 | switch errno {
| `- error: cannot find 'errno' in scope
235 | case ENOENT:
236 | return errSSLClosedGraceful
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
error: emit-module command failed with exit code 1 (use -v to see invocation)
[10/12] Emitting module SocketSwift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:17:52: error: cannot find 'AF_INET6' in scope
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| `- error: cannot find 'AF_INET6' in scope
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:18:51: error: cannot find 'AF_UNIX' in scope
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| `- error: cannot find 'AF_UNIX' in scope
19 | }
20 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:18:58: error: cannot find 'IPPROTO_UDP' in scope
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| `- error: cannot find 'IPPROTO_UDP' in scope
19 | }
20 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:13:25: error: cannot find type 'in_port_t' in scope
11 | public typealias FileDescriptor = Int32
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
| `- error: cannot find type 'in_port_t' in scope
14 | public typealias SocketAddress = sockaddr
15 | public typealias TimeValue = timeval
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:14:34: error: cannot find type 'sockaddr' in scope
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
14 | public typealias SocketAddress = sockaddr
| `- error: cannot find type 'sockaddr' in scope
15 | public typealias TimeValue = timeval
16 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:132:55: error: cannot find 'POLLIN' in scope
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| `- error: cannot find 'POLLIN' in scope
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:133:56: error: cannot find 'POLLOUT' in scope
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| `- error: cannot find 'POLLOUT' in scope
134 | }
135 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
[11/12] Compiling SocketSwift Error.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Error.swift:15:35: error: cannot find 'errno' in scope
13 | let value = block()
14 | if value == -1 {
15 | throw Socket.Error(errno: errno)
| `- error: cannot find 'errno' in scope
16 | }
17 | return value
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
[12/12] Compiling SocketSwift Type.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:9f3c606dcd2a4f06d17ba472aa533c43685ba7ba19a5c9bc23518a066eb7f86a
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
warning: 'clibressl': ignoring declared target(s) 'CLibreSSL' in the system package
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/9] Emitting module SocketSwift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:17:52: error: cannot find 'AF_INET6' in scope
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| `- error: cannot find 'AF_INET6' in scope
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:18:51: error: cannot find 'AF_UNIX' in scope
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| `- error: cannot find 'AF_UNIX' in scope
19 | }
20 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:18:58: error: cannot find 'IPPROTO_UDP' in scope
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| `- error: cannot find 'IPPROTO_UDP' in scope
19 | }
20 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:13:25: error: cannot find type 'in_port_t' in scope
11 | public typealias FileDescriptor = Int32
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
| `- error: cannot find type 'in_port_t' in scope
14 | public typealias SocketAddress = sockaddr
15 | public typealias TimeValue = timeval
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:14:34: error: cannot find type 'sockaddr' in scope
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
14 | public typealias SocketAddress = sockaddr
| `- error: cannot find type 'sockaddr' in scope
15 | public typealias TimeValue = timeval
16 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:132:55: error: cannot find 'POLLIN' in scope
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| `- error: cannot find 'POLLIN' in scope
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:133:56: error: cannot find 'POLLOUT' in scope
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| `- error: cannot find 'POLLOUT' in scope
134 | }
135 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
[3/9] Compiling SocketSwift Error.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Error.swift:15:35: error: cannot find 'errno' in scope
13 | let value = block()
14 | if value == -1 {
15 | throw Socket.Error(errno: errno)
| `- error: cannot find 'errno' in scope
16 | }
17 | return value
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
[4/9] Compiling SocketSwift TLS.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:28: error: cannot find 'SSLCreateContext' in scope
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot find 'SSLCreateContext' in scope
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:45: error: 'nil' requires a contextual type
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: 'nil' requires a contextual type
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:69: error: cannot infer contextual base in reference to member 'serverSide'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'serverSide'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:93:96: error: cannot infer contextual base in reference to member 'streamType'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'streamType'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:96:13: error: cannot find 'SSLSetIOFuncs' in scope
94 | self.fdPtr.pointee = fd
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
| `- error: cannot find 'SSLSetIOFuncs' in scope
97 | SSLSetConnection(context, fdPtr)
98 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:97:13: error: cannot find 'SSLSetConnection' in scope
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
97 | SSLSetConnection(context, fdPtr)
| `- error: cannot find 'SSLSetConnection' in scope
98 |
99 | if config.isServer {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:100:17: error: cannot find 'SSLSetCertificate' in scope
98 |
99 | if config.isServer {
100 | SSLSetCertificate(context, config.certificate)
| `- error: cannot find 'SSLSetCertificate' in scope
101 | } else {
102 | if let peerName = config.peer {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:103:21: error: cannot find 'SSLSetPeerDomainName' in scope
101 | } else {
102 | if let peerName = config.peer {
103 | SSLSetPeerDomainName(context, peerName, peerName.count)
| `- error: cannot find 'SSLSetPeerDomainName' in scope
104 | }
105 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:107:21: error: cannot find 'SSLSetSessionOption' in scope
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot find 'SSLSetSessionOption' in scope
108 | }
109 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:107:51: error: cannot infer contextual base in reference to member 'breakOnServerAuth'
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot infer contextual base in reference to member 'breakOnServerAuth'
108 | }
109 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:117:25: error: cannot find type 'OSStatus' in scope
115 | try ing { tls_handshake(context) }
116 | #else
117 | var status: OSStatus = -1
| `- error: cannot find type 'OSStatus' in scope
118 | repeat {
119 | status = SSLHandshake(context)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:119:26: error: cannot find 'SSLHandshake' in scope
117 | var status: OSStatus = -1
118 | repeat {
119 | status = SSLHandshake(context)
| `- error: cannot find 'SSLHandshake' in scope
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:120:31: error: cannot find 'errSSLWouldBlock' in scope
118 | repeat {
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
| `- error: cannot find 'errSSLWouldBlock' in scope
121 | if status != noErr && status != errSSLPeerAuthCompleted {
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:121:26: error: cannot find 'noErr' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'noErr' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:121:45: error: cannot find 'errSSLPeerAuthCompleted' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'errSSLPeerAuthCompleted' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:133:16: error: cannot find 'SSLWrite' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'SSLWrite' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:133:61: error: cannot find 'noErr' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'noErr' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:145:16: error: cannot find 'SSLRead' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'SSLRead' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:145:61: error: cannot find 'noErr' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'noErr' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:157:13: error: cannot find 'SSLClose' in scope
155 | tls_free(context);
156 | #else
157 | SSLClose(context)
| `- error: cannot find 'SSLClose' in scope
158 | fdPtr.deallocate()
159 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:167:38: error: cannot find 'kSecImportExportPassphrase' in scope
165 | open class func importCert(at path: URL, password: String) -> Certificate {
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
| `- error: cannot find 'kSecImportExportPassphrase' in scope
168 |
169 | var items: CFArray?
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:169:20: error: cannot find type 'CFArray' in scope
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
168 |
169 | var items: CFArray?
| `- error: cannot find type 'CFArray' in scope
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:170:22: error: cannot find 'SecPKCS12Import' in scope
168 |
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
| `- error: cannot find 'SecPKCS12Import' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:171:26: error: cannot find 'noErr' in scope
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
| `- error: cannot find 'noErr' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:173:52: error: cannot find 'kSecImportItemIdentity' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
| `- error: cannot find 'kSecImportItemIdentity' in scope
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
175 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:174:47: error: cannot find 'kSecImportItemCertChain' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find 'kSecImportItemCertChain' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:174:87: error: cannot find type 'SecCertificate' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find type 'SecCertificate' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:223:20: error: cannot find 'recv' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
223 | let read = recv(fd, data, bytesToRead, 0)
| `- error: cannot find 'recv' in scope
224 | dataLength.pointee = read
225 | if read > 0 {
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/TLS.swift:234:16: error: cannot find 'errno' in scope
232 |
233 | dataLength.pointee = 0
234 | switch errno {
| `- error: cannot find 'errno' in scope
235 | case ENOENT:
236 | return errSSLClosedGraceful
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
[5/10] Compiling SocketSwift OS.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[6/10] Compiling SocketSwift Option.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
[7/10] Compiling SocketSwift Socket.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:13:25: error: cannot find type 'in_port_t' in scope
11 | public typealias FileDescriptor = Int32
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
| `- error: cannot find type 'in_port_t' in scope
14 | public typealias SocketAddress = sockaddr
15 | public typealias TimeValue = timeval
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:14:34: error: cannot find type 'sockaddr' in scope
12 | public typealias Byte = UInt8
13 | public typealias Port = in_port_t
14 | public typealias SocketAddress = sockaddr
| `- error: cannot find type 'sockaddr' in scope
15 | public typealias TimeValue = timeval
16 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:132:55: error: cannot find 'POLLIN' in scope
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| `- error: cannot find 'POLLIN' in scope
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:133:56: error: cannot find 'POLLOUT' in scope
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| `- error: cannot find 'POLLOUT' in scope
134 | }
135 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:26:41: error: cannot find 'socket' in scope
24 |
25 | required public init(_ family: Family, type: Type = .stream, protocol: Protocol = .tcp) throws {
26 | self.fileDescriptor = try ing { socket(family.rawValue, type.rawValue, `protocol`.rawValue) }
| `- error: cannot find 'socket' in scope
27 | }
28 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:46:34: error: cannot find 'recv' in scope
44 | return try tls.read(buffer, size: size)
45 | }
46 | let received = try ing { recv(fileDescriptor, buffer, size, 0) }
| `- error: cannot find 'recv' in scope
47 | return received
48 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:79:32: error: cannot find 'errno' in scope
77 | let written = OS.write(fileDescriptor, buffer, size)
78 | if written <= 0 { //see http://man7.org/linux/man-pages/man2/write.2.html#RETURN_VALUE
79 | throw Error(errno: errno)
| `- error: cannot find 'errno' in scope
80 | }
81 |
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:97:19: error: cannot find 'setsockopt' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'setsockopt' in scope
98 | }
99 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:97:46: error: cannot find 'SOL_SOCKET' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'SOL_SOCKET' in scope
98 | }
99 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:123:44: error: cannot find 'sockaddr' in scope
121 |
122 | open func accept() throws -> Self {
123 | var addrlen: socklen_t = 0, addr = sockaddr()
| `- error: cannot find 'sockaddr' in scope
124 | let client = try ing { OS.accept(fileDescriptor, &addr, &addrlen) }
125 | return type(of: self).init(with: client)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:146:18: error: cannot find 'pollfd' in scope
144 | /// - Throws: Socket.Error holding `errno`
145 | open func wait(for option: WaitOption, timeout: TimeInterval, retryOnInterrupt: Bool = true) throws -> Bool {
146 | var fd = pollfd() //swift zeroes out memory of any struct. no need to memset 0
| `- error: cannot find 'pollfd' in scope
147 | fd.fd = fileDescriptor
148 | fd.events = Int16(option.rawValue)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:152:18: error: cannot find 'poll' in scope
150 | var rc: Int32 = 0
151 | repeat {
152 | rc = poll(&fd, 1, Int32(timeout * 1000))
| `- error: cannot find 'poll' in scope
153 | } while retryOnInterrupt && rc == -1 && errno == EINTR //retry on interrupt
154 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:153:49: error: cannot find 'errno' in scope
151 | repeat {
152 | rc = poll(&fd, 1, Int32(timeout * 1000))
153 | } while retryOnInterrupt && rc == -1 && errno == EINTR //retry on interrupt
| `- error: cannot find 'errno' in scope
154 |
155 | //-1 will throw error, 0 means timeout, otherwise success
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/errno.h:58:9: note: macro 'errno' unavailable: structure not supported
56 | * thread.
57 | */
58 | #define errno (*__errno())
| `- note: macro 'errno' unavailable: structure not supported
59 |
60 | __END_DECLS
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:168:21: error: cannot find 'addrinfo' in scope
166 | /// - Throws: Domain name not resolved
167 | open func addresses(for host: String, port: Port) throws -> [SocketAddress] {
168 | var hints = addrinfo()
| `- error: cannot find 'addrinfo' in scope
169 |
170 | //TODO: set correct values of current socket
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:175:41: error: cannot find type 'addrinfo' in scope
173 | hints.ai_protocol = Protocol.tcp.rawValue
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
| `- error: cannot find type 'addrinfo' in scope
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
177 | // unable to resolve
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:176:12: error: cannot find 'getaddrinfo' in scope
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
| `- error: cannot find 'getaddrinfo' in scope
177 | // unable to resolve
178 | throw Error(errno: 11) //TODO: fix this thing
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:180:17: error: cannot find 'freeaddrinfo' in scope
178 | throw Error(errno: 11) //TODO: fix this thing
179 | }
180 | defer { freeaddrinfo(addrs) }
| `- error: cannot find 'freeaddrinfo' in scope
181 |
182 | var result: [SocketAddress] = []
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:183:51: error: cannot infer type of closure parameter '$0' without a type annotation
181 |
182 | var result: [SocketAddress] = []
183 | for addr in sequence(first: addrs!, next: { $0.pointee.ai_next }) {
| `- error: cannot infer type of closure parameter '$0' without a type annotation
184 | result.append(addr.pointee.ai_addr.pointee)
185 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:200:23: error: cannot find 'sockaddr_in' in scope
198 | /// - Returns: Local port to which the socket is bound.
199 | open func port() throws -> Port {
200 | var address = sockaddr_in()
| `- error: cannot find 'sockaddr_in' in scope
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:202:77: error: cannot find 'sockaddr' in scope
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| `- error: cannot find 'sockaddr' in scope
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:202:53: error: generic parameter 'T' could not be inferred
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| `- error: generic parameter 'T' could not be inferred
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
Swift.UnsafeMutableRawPointer.assumingMemoryBound:2:13: note: in call to function 'assumingMemoryBound(to:)'
1 | struct UnsafeMutableRawPointer {
2 | public func assumingMemoryBound<T>(to: T.Type) -> UnsafeMutablePointer<T> where T : ~Copyable}
| `- note: in call to function 'assumingMemoryBound(to:)'
3 |
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:204:19: error: cannot find 'getsockname' in scope
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
| `- error: cannot find 'getsockname' in scope
205 |
206 | return Port(address.sin_port.bigEndian)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:214:33: error: cannot infer contextual base in reference to member 'reuseAddress'
212 |
213 | let socket = try self.init(.inet)
214 | try socket.set(option: .reuseAddress, true)
| `- error: cannot infer contextual base in reference to member 'reuseAddress'
215 | try socket.bind(port: port, address: address)
216 | try socket.listen(backlog: maxPendingConnection)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:58: error: cannot convert value of type 'Int32' to expected argument type '__kernel_suseconds_t' (aka 'Int')
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type '__kernel_suseconds_t' (aka 'Int')
256 | }
257 | }
[8/10] Compiling SocketSwift Protocol.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:17:58: error: cannot find 'IPPROTO_TCP' in scope
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| `- error: cannot find 'IPPROTO_TCP' in scope
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Protocol.swift:18:58: error: cannot find 'IPPROTO_UDP' in scope
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| `- error: cannot find 'IPPROTO_UDP' in scope
19 | }
20 | }
[9/10] Compiling SocketSwift Family.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:16:51: error: cannot find 'AF_INET' in scope
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| `- error: cannot find 'AF_INET' in scope
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:17:52: error: cannot find 'AF_INET6' in scope
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| `- error: cannot find 'AF_INET6' in scope
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Family.swift:18:51: error: cannot find 'AF_UNIX' in scope
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| `- error: cannot find 'AF_UNIX' in scope
19 | }
20 | }
[10/10] Compiling SocketSwift Type.swift
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
BUILD FAILURE 6.1 android