The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build HttpSwift, reference master (fd66de), with Swift 6.1 for Wasm on 27 May 2025 09:28:58 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 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:         wasm
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-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -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
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:059e0fdbe549369b902c0d423739510ddee50a4a70258d1404125eb9394ef31c
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Fetching https://github.com/BiAtoms/Request.swift.git
Fetching https://github.com/BiAtoms/Socket.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.22s)
Fetched https://github.com/BiAtoms/Socket.swift.git from cache (0.22s)
Computing version for https://github.com/BiAtoms/Request.swift.git
Computed https://github.com/BiAtoms/Request.swift.git at 2.3.0 (0.74s)
Computing version for https://github.com/BiAtoms/Socket.swift.git
Computed https://github.com/BiAtoms/Socket.swift.git at 2.4.0 (0.46s)
Fetching https://github.com/Zewo/CLibreSSL.git
[1/39] Fetching clibressl
Fetched https://github.com/Zewo/CLibreSSL.git from cache (0.22s)
Computing version for https://github.com/Zewo/CLibreSSL.git
Computed https://github.com/Zewo/CLibreSSL.git at 3.1.0 (0.72s)
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
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
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 Family.swift
[5/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 | }
[6/12] Compiling SocketSwift Protocol.swift
[7/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 |
[8/12] Compiling SocketSwift Socket.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/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: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/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: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/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/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/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: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/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/Socket.swift:233:18: error: value of type 'sockaddr_in' has no member 'sin_len'
231 |         var addr = sockaddr_in() //no need to memset 0. Swift does it
232 |         #if !os(Linux)
233 |             addr.sin_len = UInt8(MemoryLayout<sockaddr_in>.stride)
    |                  `- error: value of type 'sockaddr_in' has no member 'sin_len'
234 |         #endif
235 |         addr.sin_family = sa_family_t(AF_INET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:45: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
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 'Int64'
256 |     }
257 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:60: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
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 'Int64'
256 |     }
257 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:27: error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
253 |             let milliseconds = Int32(milliseconds)
254 |         #endif
255 |         self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
    |                           `- error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
256 |     }
257 | }
[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 | }
[10/12] Compiling SocketSwift Error.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/12] Emitting module SocketSwift
/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/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: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 | }
[12/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 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:059e0fdbe549369b902c0d423739510ddee50a4a70258d1404125eb9394ef31c
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-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] Compiling SocketSwift Family.swift
[3/9] Emitting module SocketSwift
/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/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: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 | }
[4/9] Compiling SocketSwift Error.swift
[5/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 | }
[6/10] Compiling SocketSwift Protocol.swift
[7/10] Compiling SocketSwift Socket.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/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: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/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: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/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/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/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: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/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/Socket.swift:233:18: error: value of type 'sockaddr_in' has no member 'sin_len'
231 |         var addr = sockaddr_in() //no need to memset 0. Swift does it
232 |         #if !os(Linux)
233 |             addr.sin_len = UInt8(MemoryLayout<sockaddr_in>.stride)
    |                  `- error: value of type 'sockaddr_in' has no member 'sin_len'
234 |         #endif
235 |         addr.sin_family = sa_family_t(AF_INET)
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:60: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
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 'Int64'
256 |     }
257 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:45: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
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 'Int64'
256 |     }
257 | }
/host/spi-builder-workspace/.build/checkouts/Socket.swift/Sources/Socket.swift:255:27: error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
253 |             let milliseconds = Int32(milliseconds)
254 |         #endif
255 |         self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
    |                           `- error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
256 |     }
257 | }
[8/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 | }
[9/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 |
[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 wasm