Build Information
Failed to build SwiftTUI, reference main (f57da5), with Swift 6.3 for Android on 9 Nov 2026 12:45:15 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886769-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:android-6.3-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1Build Log
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[254/383] Compiling SwiftTUI Musl+Overlay.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[255/383] Compiling SwiftTUI POSIXError.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[256/383] Compiling SwiftTUI SignalHandler.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[257/383] Compiling SwiftTUI SystemInfo+POSIX.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[258/383] Compiling SwiftTUI RingBuffer.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[259/383] Compiling SwiftTUI Bindable.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[260/383] Compiling SwiftTUI Binding.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[261/383] Compiling SwiftTUI Environment.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[262/383] Compiling SwiftTUI FocusState.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[263/383] Compiling SwiftTUI ModelContextKey.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[264/383] Compiling SwiftTUI Query.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[265/383] Compiling SwiftTUI State.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[266/383] Compiling SwiftTUI View+Environment.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[267/383] Compiling SwiftTUI View+State.swift
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:18:11: error: cannot find 'strerror_r' in scope
16 | return withUnsafeTemporaryAllocation(of: CChar.self, capacity: 256) {
17 | guard let baseAddress = $0.baseAddress,
18 | strerror_r(code, baseAddress, $0.count) == 0 else {
| `- error: cannot find 'strerror_r' in scope
19 | return "POSIX Error \(code)"
20 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:41:11: error: cannot find 'close' in scope
39 | // Close channel.
40 | if Registry.fdBox.fds[0] != -1 {
41 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
42 | }
43 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:45:11: error: cannot find 'close' in scope
43 |
44 | if Registry.fdBox.fds[1] != -1 {
45 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
46 | }
47 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:53:11: error: cannot find 'pipe' in scope
51 |
52 | // TODO(compnerd): use `signalfd` on Linux
53 | guard pipe(&Registry.fdBox.fds) == 0 else { throw POSIXError() }
| `- error: cannot find 'pipe' in scope
54 |
55 | // Make the write non-blocking for the handler
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:17: error: cannot find 'fcntl' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'fcntl' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:56:46: error: cannot find 'F_GETFL' in scope
54 |
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
| `- error: cannot find 'F_GETFL' in scope
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
58 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:23: error: cannot find 'fcntl' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'fcntl' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:52: error: cannot find 'F_SETFL' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'F_SETFL' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:57:69: error: cannot find 'O_NONBLOCK' in scope
55 | // Make the write non-blocking for the handler
56 | let flags = fcntl(Registry.fdBox.fds[1], F_GETFL)
57 | guard flags >= 0, fcntl(Registry.fdBox.fds[1], F_SETFL, flags | O_NONBLOCK) == 0 else {
| `- error: cannot find 'O_NONBLOCK' in scope
58 | throw POSIXError()
59 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:66:21: error: cannot find 'read' in scope
64 | guard let self else { return }
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
| `- error: cannot find 'read' in scope
67 | let errno = errno
68 | guard count > 0 else {
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:67:21: error: use of local variable 'errno' before its declaration
65 |
66 | let count = read(Registry.fdBox.fds[0], &buffer, buffer.count)
67 | let errno = errno
| | `- error: use of local variable 'errno' before its declaration
| `- note: 'errno' declared here
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:69:23: error: cannot find 'EINTR' in scope
67 | let errno = errno
68 | guard count > 0 else {
69 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
70 | if errno == 0 { return }
71 | fatalError("read failure from signal pipe: \(POSIXError(errno))")
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:92:11: error: cannot find 'close' in scope
90 | // Close channel.
91 | if Registry.fdBox.fds[0] != -1 {
92 | _ = close(Registry.fdBox.fds[0])
| `- error: cannot find 'close' in scope
93 | Registry.fdBox.fds[0] = -1
94 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:97:11: error: cannot find 'close' in scope
95 |
96 | if Registry.fdBox.fds[1] != -1 {
97 | _ = close(Registry.fdBox.fds[1])
| `- error: cannot find 'close' in scope
98 | Registry.fdBox.fds[1] = -1
99 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:13: error: cannot find 'sigaction' in scope
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: cannot find 'sigaction' in scope
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:130:45: error: 'nil' requires a contextual type
128 | if var disposition = dispositions.removeValue(forKey: signal) {
129 | // Ignore errors - there is not much that can be done in the cleanup.
130 | _ = sigaction(signal, &disposition, nil)
| `- error: 'nil' requires a contextual type
131 | }
132 | handlers.removeValue(forKey: signal)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:145:23: error: cannot find 'sigaction' in scope
143 |
144 | // Save the original signal action
145 | var disposition = sigaction()
| `- error: cannot find 'sigaction' in scope
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
147 | dispositions[signal] = disposition
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:11: error: cannot find 'sigaction' in scope
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:146:29: error: 'nil' requires a contextual type
144 | // Save the original signal action
145 | var disposition = sigaction()
146 | guard sigaction(signal, nil, &disposition) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
147 | dispositions[signal] = disposition
148 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:150:18: error: cannot find 'sigaction' in scope
148 |
149 | // Install minimal signal handler
150 | var action = sigaction()
| `- error: cannot find 'sigaction' in scope
151 | let handler: @convention(c) (CInt) -> Void = { signal in
152 | // Ignore errors - there is not much that can be done safely in the
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:155:11: error: cannot find 'write' in scope
153 | // signal context.
154 | var signal = UInt8(signal)
155 | _ = write(Registry.fdBox.fds[1], &signal, 1)
| `- error: cannot find 'write' in scope
156 | }
157 | #if os(Linux)
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:168:11: error: cannot find 'sigemptyset' in scope
166 | action.__sigaction_u.__sa_handler = handler
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigemptyset' in scope
169 | action.sa_flags = SA_RESTART
170 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:169:23: error: cannot find 'SA_RESTART' in scope
167 | #endif
168 | guard sigemptyset(&action.sa_mask) == 0 else { throw POSIXError() }
169 | action.sa_flags = SA_RESTART
| `- error: cannot find 'SA_RESTART' in scope
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:11: error: cannot find 'sigaction' in scope
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: cannot find 'sigaction' in scope
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:171:38: error: 'nil' requires a contextual type
169 | action.sa_flags = SA_RESTART
170 |
171 | guard sigaction(signal, &action, nil) == 0 else { throw POSIXError() }
| `- error: 'nil' requires a contextual type
172 | }
173 |
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:16: error: cannot find 'sysconf' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find 'sysconf' in scope
9 | }
10 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SystemInfo+POSIX.swift:8:24: error: cannot find '_SC_PAGESIZE' in scope
6 | public enum SystemInfo {
7 | public static var PageSize: Int {
8 | return Int(sysconf(_SC_PAGESIZE))
| `- error: cannot find '_SC_PAGESIZE' in scope
9 | }
10 | }
[268/383] Compiling SwiftTUI ASCII.swift
[269/383] Compiling SwiftTUI ArrowKeyParser.swift
[270/383] Compiling SwiftTUI Dump.swift
[271/383] Compiling SwiftTUI LineBreakEngine.swift
[272/383] Compiling SwiftTUI ComposedView.swift
[273/383] Compiling SwiftTUI ContiguousChildSource.swift
[274/383] Compiling SwiftTUI GenericView.swift
[275/383] Compiling SwiftTUI LayoutRootView.swift
[276/383] Compiling SwiftTUI ModifierView.swift
[277/383] Compiling SwiftTUI Node.swift
[278/383] Compiling SwiftTUI PrimitiveView.swift
[279/383] Compiling SwiftTUI View.swift
[280/383] Compiling SwiftTUI Weak.swift
[281/383] Compiling SwiftTUI WeakSet.swift
[282/383] Compiling SwiftTUI AnyView.swift
[283/383] Compiling SwiftTUI Button.swift
[284/383] Compiling SwiftTUI ButtonRole.swift
[285/383] Compiling SwiftTUI Color+View.swift
[286/383] Compiling SwiftTUI Divider.swift
[287/383] Compiling SwiftTUI GeometryReader.swift
[288/383] Compiling SwiftTUI LazyElement.swift
[289/383] Compiling SwiftTUI LazyVStack.swift
[290/383] Compiling SwiftTUI Menu.swift
[291/383] Compiling SwiftTUI PinnedScrollableViews.swift
[292/383] Compiling SwiftTUI AllowsHitTesting.swift
[293/383] Compiling SwiftTUI Background.swift
[294/383] Compiling SwiftTUI Bold.swift
[295/383] Compiling SwiftTUI Border.swift
[296/383] Compiling SwiftTUI Disabled.swift
[297/383] Compiling SwiftTUI DragGesture.swift
[298/383] Compiling SwiftTUI EquatableView.swift
[299/383] Compiling SwiftTUI FixedFrame.swift
[300/383] Compiling SwiftTUI FixedSizeLayoutPriority.swift
[301/383] Compiling SwiftTUI FlexibleFrame.swift
[302/383] Compiling SwiftTUI Focused.swift
[303/383] Compiling SwiftTUI ForegroundColor.swift
[304/383] Compiling SwiftTUI Hidden.swift
[305/383] Compiling SwiftTUI HitTestPassthrough.swift
[306/383] Compiling SwiftTUI Italic.swift
[307/383] Compiling SwiftTUI LineLimit.swift
[308/383] Compiling SwiftTUI OnAppear.swift
[309/383] Compiling SwiftTUI OnChange.swift
[310/383] Compiling SwiftTUI OnDisappear.swift
[311/383] Compiling SwiftTUI OnHover.swift
[312/383] Compiling SwiftTUI OnTapGesture.swift
[313/383] Compiling SwiftTUI OverlayBackground.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[314/383] Compiling SwiftTUI View+Alert.swift
[315/383] Compiling SwiftTUI View+ConfirmationDialog.swift
[316/383] Compiling SwiftTUI View+SheetPopover.swift
[317/383] Compiling SwiftTUI Section.swift
[318/383] Compiling SwiftTUI Alignment.swift
[319/383] Compiling SwiftTUI Axis.swift
[320/383] Compiling SwiftTUI HStack.swift
[321/383] Compiling SwiftTUI VStack.swift
[322/383] Compiling SwiftTUI ZStack.swift
[323/383] Compiling SwiftTUI StateEquality.swift
[324/383] Compiling SwiftTUI TupleView.swift
[325/383] Compiling SwiftTUI ViewBuilder.swift
[326/383] Compiling SwiftTUI _ConditionalView.swift
[327/383] Compiling SwiftTUI TextMetrics.swift
[328/383] Compiling SwiftTUI VTBuffer.swift
[329/383] Compiling SwiftTUI VTCell.swift
[330/383] Compiling SwiftTUI VTPosition.swift
[331/383] Compiling SwiftTUI VTStyle.swift
[332/383] Compiling SwiftTUI Duration+Extensions.swift
[333/383] Compiling SwiftTUI Task+Extensions.swift
[334/383] Compiling SwiftTUI VTEvent.swift
[335/383] Compiling SwiftTUI VTEventStream.swift
[336/383] Compiling SwiftTUI VTInputParser.swift
[337/383] Compiling SwiftTUI Padding.swift
[338/383] Compiling SwiftTUI ScrollViewReader.swift
[339/383] Compiling SwiftTUI Selectable.swift
[340/383] Compiling SwiftTUI SelectionDisabled.swift
[341/383] Compiling SwiftTUI SetEnvironment.swift
[342/383] Compiling SwiftTUI Strikethrough.swift
[343/383] Compiling SwiftTUI Tag.swift
[344/383] Compiling SwiftTUI TaskModifier.swift
[345/383] Compiling SwiftTUI TruncationMode.swift
[346/383] Compiling SwiftTUI Underline.swift
[347/383] Compiling SwiftTUI Visibility.swift
[348/383] Compiling SwiftTUI NavigationContext.swift
[349/383] Compiling SwiftTUI NavigationLink.swift
[350/383] Compiling SwiftTUI NavigationPath.swift
[351/383] Compiling SwiftTUI NavigationStack.swift
[352/383] Compiling SwiftTUI ToolbarContent.swift
[353/383] Compiling SwiftTUI ToolbarItemPlacement.swift
[354/383] Compiling SwiftTUI View+Toolbar.swift
[355/383] Compiling SwiftTUI View+NavigationBarBackButtonHidden.swift
[356/383] Compiling SwiftTUI View+NavigationDestination.swift
[357/383] Compiling SwiftTUI View+NavigationTitle.swift
[358/383] Compiling SwiftTUI Optional+View.swift
[359/383] Compiling SwiftTUI PresentationModifiers.swift
[360/383] Emitting module SwiftTUI
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/POSIXError.swift:9:30: error: cannot find 'errno' in scope
7 | internal let code: CInt
8 |
9 | public init(_ code: CInt = errno) {
| `- error: cannot find 'errno' in scope
10 | self.code = code
11 | }
/host/spi-builder-workspace/Sources/SwiftTUI/POSIXCore/SignalHandler.swift:22:35: error: cannot find type 'sigaction' in scope
20 |
21 | private var handlers: [CInt:[ObjectIdentifier:Handler]] = [:]
22 | private var dispositions: [CInt:sigaction] = [:]
| `- error: cannot find type 'sigaction' in scope
23 | #if $InlineArray
24 | private static var fds = InlineArray<2, CInt>(repeating: -1)
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:91:28: error: cannot find type 'termios' in scope
89 | private let hIn: CInt
90 | private let hOut: CInt
91 | private let sAttributes: termios
| `- error: cannot find type 'termios' in scope
92 |
93 | /// Stream of terminal input events parsed from POSIX terminal input.
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:173:16: error: cannot find 'STDIN_FILENO' in scope
171 | /// terminal is deallocated, ensuring the shell remains usable.
172 | public init(mode: VTMode) async throws {
173 | self.hIn = STDIN_FILENO
| `- error: cannot find 'STDIN_FILENO' in scope
174 | self.hOut = STDOUT_FILENO
175 |
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:174:17: error: cannot find 'STDOUT_FILENO' in scope
172 | public init(mode: VTMode) async throws {
173 | self.hIn = STDIN_FILENO
174 | self.hOut = STDOUT_FILENO
| `- error: cannot find 'STDOUT_FILENO' in scope
175 |
176 | var attr: termios = termios()
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:176:15: error: cannot find type 'termios' in scope
174 | self.hOut = STDOUT_FILENO
175 |
176 | var attr: termios = termios()
| `- error: cannot find type 'termios' in scope
177 | guard tcgetattr(hIn, &attr) == 0 else {
178 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:176:25: error: cannot find 'termios' in scope
174 | self.hOut = STDOUT_FILENO
175 |
176 | var attr: termios = termios()
| `- error: cannot find 'termios' in scope
177 | guard tcgetattr(hIn, &attr) == 0 else {
178 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:177:11: error: cannot find 'tcgetattr' in scope
175 |
176 | var attr: termios = termios()
177 | guard tcgetattr(hIn, &attr) == 0 else {
| `- error: cannot find 'tcgetattr' in scope
178 | throw POSIXError()
179 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:18: error: cannot find 'tcflag_t' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'tcflag_t' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:27: error: cannot find 'ICANON' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'ICANON' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:37: error: cannot find 'tcflag_t' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'tcflag_t' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:46: error: cannot find 'ECHO' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'ECHO' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:54: error: cannot find 'tcflag_t' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'tcflag_t' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:63: error: cannot find 'IXON' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'IXON' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:71: error: cannot find 'tcflag_t' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'tcflag_t' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:80: error: cannot find 'ICRNL' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'ICRNL' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:89: error: cannot find 'tcflag_t' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'tcflag_t' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:187:98: error: cannot find 'ISIG' in scope
185 | case .raw:
186 | // Disable canonical mode, echo, XON/XOFF, CR to NL translation, and signal generation
187 | let mask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL) | tcflag_t(ISIG)
| `- error: cannot find 'ISIG' in scope
188 | attr.c_lflag &= ~mask
189 | case .canonical:
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:23: error: cannot find 'tcflag_t' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'tcflag_t' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:32: error: cannot find 'ICANON' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'ICANON' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:42: error: cannot find 'tcflag_t' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'tcflag_t' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:51: error: cannot find 'ECHO' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'ECHO' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:59: error: cannot find 'tcflag_t' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'tcflag_t' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:68: error: cannot find 'IXON' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'IXON' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:76: error: cannot find 'tcflag_t' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'tcflag_t' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:191:85: error: cannot find 'ICRNL' in scope
189 | case .canonical:
190 | // Enable canonical mode, echo, XON/XOFF, and CR to NL translation
191 | let canonMask = tcflag_t(ICANON) | tcflag_t(ECHO) | tcflag_t(IXON) | tcflag_t(ICRNL)
| `- error: cannot find 'ICRNL' in scope
192 | attr.c_lflag |= canonMask
193 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:195:11: error: cannot find 'tcsetattr' in scope
193 | }
194 |
195 | guard tcsetattr(hOut, TCSANOW, &attr) == 0 else {
| `- error: cannot find 'tcsetattr' in scope
196 | throw POSIXError()
197 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:195:27: error: cannot find 'TCSANOW' in scope
193 | }
194 |
195 | guard tcsetattr(hOut, TCSANOW, &attr) == 0 else {
| `- error: cannot find 'TCSANOW' in scope
196 | throw POSIXError()
197 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:199:14: error: cannot find 'winsize' in scope
197 | }
198 |
199 | var ws = winsize()
| `- error: cannot find 'winsize' in scope
200 | guard ioctl(hOut, TIOCGWINSZ, &ws) == 0 else {
201 | throw POSIXError()
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:200:11: error: cannot find 'ioctl' in scope
198 |
199 | var ws = winsize()
200 | guard ioctl(hOut, TIOCGWINSZ, &ws) == 0 else {
| `- error: cannot find 'ioctl' in scope
201 | throw POSIXError()
202 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:200:23: error: cannot find 'TIOCGWINSZ' in scope
198 |
199 | var ws = winsize()
200 | guard ioctl(hOut, TIOCGWINSZ, &ws) == 0 else {
| `- error: cannot find 'TIOCGWINSZ' in scope
201 | throw POSIXError()
202 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:206:24: error: cannot find 'EINVAL' in scope
204 | let size = Size(width: Int(ws.ws_col), height: Int(ws.ws_row))
205 | guard size.width > 0 && size.height > 0 else {
206 | throw POSIXError(EINVAL)
| `- error: cannot find 'EINVAL' in scope
207 | }
208 | _size = Mutex(size)
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:211:5: error: cannot find 'signal' in scope
209 |
210 | // setup SIGWINCH handler to update size
211 | signal(SIGWINCH, SIG_IGN)
| `- error: cannot find 'signal' in scope
212 | installCrashHandler()
213 |
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:211:12: error: cannot find 'SIGWINCH' in scope
209 |
210 | // setup SIGWINCH handler to update size
211 | signal(SIGWINCH, SIG_IGN)
| `- error: cannot find 'SIGWINCH' in scope
212 | installCrashHandler()
213 |
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:211:22: error: cannot find 'SIG_IGN' in scope
209 |
210 | // setup SIGWINCH handler to update size
211 | signal(SIGWINCH, SIG_IGN)
| `- error: cannot find 'SIG_IGN' in scope
212 | installCrashHandler()
213 |
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:212:5: error: cannot find 'installCrashHandler' in scope
210 | // setup SIGWINCH handler to update size
211 | signal(SIGWINCH, SIG_IGN)
212 | installCrashHandler()
| `- error: cannot find 'installCrashHandler' in scope
213 |
214 | // Unbounded: `.bufferingNewest(N)` drops *oldest* batches when the consumer
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:224:68: error: cannot find 'SIGWINCH' in scope
222 |
223 | self.input = VTEventStream(AsyncThrowingStream(bufferingPolicy: .unbounded) { [hIn, hOut] continuation in
224 | let sigwinchSource = DispatchSource.makeSignalSource(signal: SIGWINCH, queue: .main)
| `- error: cannot find 'SIGWINCH' in scope
225 | sigwinchSource.setEventHandler {
226 | var ws = winsize()
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:226:18: error: cannot find 'winsize' in scope
224 | let sigwinchSource = DispatchSource.makeSignalSource(signal: SIGWINCH, queue: .main)
225 | sigwinchSource.setEventHandler {
226 | var ws = winsize()
| `- error: cannot find 'winsize' in scope
227 | if ioctl(hOut, TIOCGWINSZ, &ws) == 0 {
228 | let size = Size(width: Int(ws.ws_col), height: Int(ws.ws_row))
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:227:12: error: cannot find 'ioctl' in scope
225 | sigwinchSource.setEventHandler {
226 | var ws = winsize()
227 | if ioctl(hOut, TIOCGWINSZ, &ws) == 0 {
| `- error: cannot find 'ioctl' in scope
228 | let size = Size(width: Int(ws.ws_col), height: Int(ws.ws_row))
229 | if size.width > 0 && size.height > 0 {
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:227:24: error: cannot find 'TIOCGWINSZ' in scope
225 | sigwinchSource.setEventHandler {
226 | var ws = winsize()
227 | if ioctl(hOut, TIOCGWINSZ, &ws) == 0 {
| `- error: cannot find 'TIOCGWINSZ' in scope
228 | let size = Size(width: Int(ws.ws_col), height: Int(ws.ws_row))
229 | if size.width > 0 && size.height > 0 {
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:242:23: error: cannot find 'pollfd' in scope
240 | do {
241 | // Poll so cancel / generation bump can stop a stuck `read`.
242 | var pfd = pollfd(fd: hIn, events: Int16(POLLIN), revents: 0)
| `- error: cannot find 'pollfd' in scope
243 | let pr = poll(&pfd, 1, 50)
244 | if Task.isCancelled || !StdinReaderGate.owns(stdinGeneration) {
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:242:53: error: cannot find 'POLLIN' in scope
240 | do {
241 | // Poll so cancel / generation bump can stop a stuck `read`.
242 | var pfd = pollfd(fd: hIn, events: Int16(POLLIN), revents: 0)
| `- error: cannot find 'POLLIN' in scope
243 | let pr = poll(&pfd, 1, 50)
244 | if Task.isCancelled || !StdinReaderGate.owns(stdinGeneration) {
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:243:22: error: cannot find 'poll' in scope
241 | // Poll so cancel / generation bump can stop a stuck `read`.
242 | var pfd = pollfd(fd: hIn, events: Int16(POLLIN), revents: 0)
243 | let pr = poll(&pfd, 1, 50)
| `- error: cannot find 'poll' in scope
244 | if Task.isCancelled || !StdinReaderGate.owns(stdinGeneration) {
245 | break
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:248:18: error: cannot find 'errno' in scope
246 | }
247 | if pr < 0 {
248 | if errno == EINTR { continue }
| `- error: cannot find 'errno' in scope
249 | throw POSIXError()
250 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:248:27: error: cannot find 'EINTR' in scope
246 | }
247 | if pr < 0 {
248 | if errno == EINTR { continue }
| `- error: cannot find 'EINTR' in scope
249 | throw POSIXError()
250 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:255:27: error: cannot find 'read' in scope
253 | let events = try withUnsafeTemporaryAllocation(of: CChar.self, capacity: 8192) {
254 | guard let baseAddress = $0.baseAddress else { throw POSIXError() }
255 | let count = read(hIn, baseAddress, $0.count)
| `- error: cannot find 'read' in scope
256 | guard count > 0 else {
257 | if count == 0 { throw CancellationError() }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:258:20: error: cannot find 'errno' in scope
256 | guard count > 0 else {
257 | if count == 0 { throw CancellationError() }
258 | if errno == EINTR { return [VTEvent]() }
| `- error: cannot find 'errno' in scope
259 | throw POSIXError()
260 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:258:29: error: cannot find 'EINTR' in scope
256 | guard count > 0 else {
257 | if count == 0 { throw CancellationError() }
258 | if errno == EINTR { return [VTEvent]() }
| `- error: cannot find 'EINTR' in scope
259 | throw POSIXError()
260 | }
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:344:9: error: cannot find 'Darwin' in scope
342 | _ = Musl.write(self.hOut, "\u{1B}[?1006h", 8)
343 | #else
344 | _ = Darwin.write(self.hOut, "\u{1B}[?1000h", 8)
| `- error: cannot find 'Darwin' in scope
345 | _ = Darwin.write(self.hOut, "\u{1B}[?1002h", 8)
346 | _ = Darwin.write(self.hOut, "\u{1B}[?1003h", 8)
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:345:9: error: cannot find 'Darwin' in scope
343 | #else
344 | _ = Darwin.write(self.hOut, "\u{1B}[?1000h", 8)
345 | _ = Darwin.write(self.hOut, "\u{1B}[?1002h", 8)
| `- error: cannot find 'Darwin' in scope
346 | _ = Darwin.write(self.hOut, "\u{1B}[?1003h", 8)
347 | _ = Darwin.write(self.hOut, "\u{1B}[?1006h", 8)
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:346:9: error: cannot find 'Darwin' in scope
344 | _ = Darwin.write(self.hOut, "\u{1B}[?1000h", 8)
345 | _ = Darwin.write(self.hOut, "\u{1B}[?1002h", 8)
346 | _ = Darwin.write(self.hOut, "\u{1B}[?1003h", 8)
| `- error: cannot find 'Darwin' in scope
347 | _ = Darwin.write(self.hOut, "\u{1B}[?1006h", 8)
348 | #endif
/host/spi-builder-workspace/Sources/SwiftTUI/VirtualTerminal/Platform/POSIXTerminal.swift:347:9: error: cannot find 'Darwin' in scope
345 | _ = Darwin.write(self.hOut, "\u{1B}[?1002h", 8)
346 | _ = Darwin.write(self.hOut, "\u{1B}[?1003h", 8)
347 | _ = Darwin.write(self.hOut, "\u{1B}[?1006h", 8)
| `- error: cannot find 'Darwin' in scope
348 | #endif
349 | }
[361/383] Compiling SwiftTUI MenuStyle.swift
[362/383] Compiling SwiftTUI PopupAnchorButton.swift
[363/383] Compiling SwiftTUI PopupPresenter.swift
[364/383] Compiling SwiftTUI Picker.swift
[365/383] Compiling SwiftTUI PickerStyle.swift
[366/383] Compiling SwiftTUI ProgressView.swift
[367/383] Compiling SwiftTUI ScrollView.swift
[368/383] Compiling SwiftTUI SecureField.swift
[369/383] Compiling SwiftTUI Slider.swift
[370/383] Compiling SwiftTUI Spacer.swift
[371/383] Compiling SwiftTUI Stepper.swift
[372/383] Compiling SwiftTUI Text.swift
[373/383] Compiling SwiftTUI TextEdit.swift
[374/383] Compiling SwiftTUI TextField.swift
[375/383] Compiling SwiftTUI TextFieldStyle.swift
[376/383] Compiling SwiftTUI Toggle.swift
[377/383] Compiling SwiftTUI ToggleStyle.swift
[378/383] Compiling SwiftTUI WidthReader.swift
[379/383] Compiling SwiftTUI EmptyView.swift
[380/383] Compiling SwiftTUI ForEach.swift
[381/383] Compiling SwiftTUI Group.swift
[382/383] Compiling SwiftTUI GridItem.swift
[383/383] Compiling SwiftTUI LazyVGrid.swift
BUILD FAILURE 6.3 android