The Swift Package Index logo.Swift Package Index

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

Build Information

Failed to build PythonKit, reference master (d5ba1b), with Swift 6.1 for Android on 9 Jun 2025 18:04:07 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/pvieito/PythonKit.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/pvieito/PythonKit
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at d5ba1b3 Use dlerror() when dlopen() fails.
Cloned https://github.com/pvieito/PythonKit.git
Revision (git rev-parse @):
d5ba1b3b4834e8c47e0cdf0989f458bc59ab0b45
SUCCESS checkout https://github.com/pvieito/PythonKit.git at master
========================================
Build
========================================
Selected platform:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/pvieito/PythonKit.git
https://github.com/pvieito/PythonKit.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "PythonKit",
  "name" : "PythonKit",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "PythonKit",
      "targets" : [
        "PythonKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PythonKitTests",
      "module_type" : "SwiftTarget",
      "name" : "PythonKitTests",
      "path" : "Tests/PythonKitTests",
      "sources" : [
        "NumpyConversionTests.swift",
        "PythonFunctionTests.swift",
        "PythonRuntimeTests.swift"
      ],
      "target_dependencies" : [
        "PythonKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "PythonKit",
      "module_type" : "SwiftTarget",
      "name" : "PythonKit",
      "path" : "PythonKit",
      "product_memberships" : [
        "PythonKit"
      ],
      "sources" : [
        "NumpyConversion.swift",
        "Python.swift",
        "PythonLibrary+Symbols.swift",
        "PythonLibrary.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.1"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/7] Compiling PythonKit PythonLibrary.swift
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:53:24: warning: static property 'defaultLibraryHandle' is not concurrency-safe because non-'Sendable' type 'UnsafeMutableRawPointer?' may have shared mutable state; this is an error in the Swift 6 language mode
 51 |     private static let defaultLibraryHandle = UnsafeMutableRawPointer(bitPattern: -2)  // RTLD_DEFAULT
 52 | #else
 53 |     private static let defaultLibraryHandle: UnsafeMutableRawPointer? = nil  // RTLD_DEFAULT
    |                        |- warning: static property 'defaultLibraryHandle' is not concurrency-safe because non-'Sendable' type 'UnsafeMutableRawPointer?' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'defaultLibraryHandle' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 54 | #endif
 55 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:56:24: warning: static property 'isPythonLibraryLoaded' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 54 | #endif
 55 |
 56 |     private static var isPythonLibraryLoaded = false
    |                        |- warning: static property 'isPythonLibraryLoaded' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'isPythonLibraryLoaded' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'isPythonLibraryLoaded' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 57 |     private static var _pythonLibraryHandle: UnsafeMutableRawPointer?
 58 |     private static var pythonLibraryHandle: UnsafeMutableRawPointer? {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:57:24: warning: static property '_pythonLibraryHandle' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 55 |
 56 |     private static var isPythonLibraryLoaded = false
 57 |     private static var _pythonLibraryHandle: UnsafeMutableRawPointer?
    |                        |- warning: static property '_pythonLibraryHandle' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert '_pythonLibraryHandle' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property '_pythonLibraryHandle' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |     private static var pythonLibraryHandle: UnsafeMutableRawPointer? {
 59 |         try! PythonLibrary.loadLibrary()
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:120:34: error: cannot find 'librarySearchPaths' in scope
118 |     private static let libraryPaths: [String] = {
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
    |                                  `- error: cannot find 'librarySearchPaths' in scope
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:121:32: error: cannot find 'libraryNames' in scope
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
    |                                `- error: cannot find 'libraryNames' in scope
122 |                 for libraryPathExtension in libraryPathExtensions {
123 |                     let libraryPath =
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:122:45: error: cannot find 'libraryPathExtensions' in scope
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
    |                                             `- error: cannot find 'libraryPathExtensions' in scope
123 |                     let libraryPath =
124 |                     librarySearchPath + libraryName + libraryPathExtension
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:141:20: error: cannot find 'dlsym' in scope
139 |             return unsafeBitCast(moduleSymbol, to: UnsafeMutableRawPointer?.self)
140 | #else
141 |             return dlsym(libraryHandle, name)
    |                    `- error: cannot find 'dlsym' in scope
142 | #endif
143 |         }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:194:36: error: cannot find 'libraryVersionSeparator' in scope
192 |             let libraryVersionString = versionString
193 |                 .split(separator: PythonVersion.versionSeparator)
194 |                 .joined(separator: libraryVersionSeparator)
    |                                    `- error: cannot find 'libraryVersionSeparator' in scope
195 |             let path = path.split(separator: libraryPathVersionCharacter)
196 |                 .joined(separator: libraryVersionString)
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:35: error: cannot find 'dlopen' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                   `- error: cannot find 'dlopen' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:48: error: cannot find 'RTLD_LAZY' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                                `- error: cannot find 'RTLD_LAZY' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:60: error: cannot find 'RTLD_GLOBAL' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                                            `- error: cannot find 'RTLD_GLOBAL' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:210:35: error: cannot find 'dlerror' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
210 |             if let errorCString = dlerror() {
    |                                   `- error: cannot find 'dlerror' in scope
211 |                 let errorString = String(cString: errorCString)
212 |                 self.log("Reason for failure: \(errorString)")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:294:33: error: cannot find 'getenv' in scope
292 |
293 |         var value: String? {
294 |             guard let cString = getenv(key) else { return nil }
    |                                 `- error: cannot find 'getenv' in scope
295 |             let value = String(cString: cString)
296 |             guard !value.isEmpty else { return nil }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:304:13: error: cannot find 'setenv' in scope
302 |             _putenv_s(key, value)
303 | #else
304 |             setenv(key, value, 1)
    |             `- error: cannot find 'setenv' in scope
305 | #endif
306 |         }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:314:9: error: cannot find 'fputs' in scope
312 |     private static func log(_ message: String) {
313 |         guard Environment.loaderLogging.value != nil else { return }
314 |         fputs(message + "\n", stderr)
    |         `- error: cannot find 'fputs' in scope
315 |     }
316 | }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:314:31: error: cannot find 'stderr' in scope
312 |     private static func log(_ message: String) {
313 |         guard Environment.loaderLogging.value != nil else { return }
314 |         fputs(message + "\n", stderr)
    |                               `- error: cannot find 'stderr' in scope
315 |     }
316 | }
[4/7] Compiling PythonKit PythonLibrary+Symbols.swift
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:228:5: warning: let '_Py_ZeroStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
226 |         legacyName: "PyString_AsStringAndSize")
227 |
228 | let _Py_ZeroStruct: PyObjectPointer =
    |     |- warning: let '_Py_ZeroStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let '_Py_ZeroStruct' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
229 |     PythonLibrary.loadSymbol(name: "_Py_ZeroStruct")
230 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:231:5: warning: let '_Py_TrueStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
229 |     PythonLibrary.loadSymbol(name: "_Py_ZeroStruct")
230 |
231 | let _Py_TrueStruct: PyObjectPointer =
    |     |- warning: let '_Py_TrueStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let '_Py_TrueStruct' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
232 |     PythonLibrary.loadSymbol(name: "_Py_TrueStruct")
233 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:234:5: warning: let 'PyBool_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
232 |     PythonLibrary.loadSymbol(name: "_Py_TrueStruct")
233 |
234 | let PyBool_Type: PyObjectPointer =
    |     |- warning: let 'PyBool_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let 'PyBool_Type' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
235 |     PythonLibrary.loadSymbol(name: "PyBool_Type")
236 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:237:5: warning: let 'PySlice_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
235 |     PythonLibrary.loadSymbol(name: "PyBool_Type")
236 |
237 | let PySlice_Type: PyObjectPointer =
    |     |- warning: let 'PySlice_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let 'PySlice_Type' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
238 |     PythonLibrary.loadSymbol(name: "PySlice_Type")
239 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/7] Compiling PythonKit Python.swift
/host/spi-builder-workspace/PythonKit/Python.swift:663:12: warning: let 'Python' is not concurrency-safe because non-'Sendable' type 'PythonInterface' may have shared mutable state; this is an error in the Swift 6 language mode
 661 | ///     print(Python.type(list) == Python.list) // Prints true.
 662 | @_fixed_layout
 663 | public let Python = PythonInterface()
     |            |- warning: let 'Python' is not concurrency-safe because non-'Sendable' type 'PythonInterface' may have shared mutable state; this is an error in the Swift 6 language mode
     |            |- note: add '@MainActor' to make let 'Python' part of global actor 'MainActor'
     |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 664 |
 665 | /// An interface for Python.
     :
 671 | ///   called `Python`.
 672 | @dynamicMemberLookup
 673 | public struct PythonInterface {
     |               `- note: consider making struct 'PythonInterface' conform to the 'Sendable' protocol
 674 |     /// A dictionary of the Python builtins.
 675 |     public let builtins: PythonObject
/host/spi-builder-workspace/PythonKit/Python.swift:1733:16: warning: static property 'sharedMethodDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
1731 |
1732 | fileprivate extension PythonFunction {
1733 |     static let sharedMethodDefinition: UnsafeMutablePointer<PyMethodDef> = {
     |                |- warning: static property 'sharedMethodDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
     |                |- note: add '@MainActor' to make static property 'sharedMethodDefinition' part of global actor 'MainActor'
     |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1734 |         let name: StaticString = "pythonkit_swift_function"
1735 |         // `utf8Start` is a property of StaticString, thus, it has a stable pointer.
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
/host/spi-builder-workspace/PythonKit/Python.swift:1755:16: warning: static property 'sharedMethodWithKeywordsDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
1753 |     }()
1754 |
1755 |     static let sharedMethodWithKeywordsDefinition: UnsafeMutablePointer<PyMethodDef> = {
     |                |- warning: static property 'sharedMethodWithKeywordsDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
     |                |- note: add '@MainActor' to make static property 'sharedMethodWithKeywordsDefinition' part of global actor 'MainActor'
     |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1756 |         let name: StaticString = "pythonkit_swift_function_with_keywords"
1757 |         // `utf8Start` is a property of StaticString, thus, it has a stable pointer.
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
/host/spi-builder-workspace/PythonKit/Python.swift:92:21: warning: stored property 'reference' of 'Sendable'-conforming struct 'PythonObject' has non-sendable type 'PyReference'; this is an error in the Swift 6 language mode
  38 | //   implement move semantics.
  39 | @usableFromInline @_fixed_layout
  40 | final class PyReference {
     |             `- note: class 'PyReference' does not conform to the 'Sendable' protocol
  41 |     private var pointer: OwnedPyObjectPointer
  42 |
     :
  90 | public struct PythonObject {
  91 |     /// The underlying `PyReference`.
  92 |     fileprivate var reference: PyReference
     |                     `- warning: stored property 'reference' of 'Sendable'-conforming struct 'PythonObject' has non-sendable type 'PyReference'; this is an error in the Swift 6 language mode
  93 |
  94 |     @usableFromInline
[6/7] Compiling PythonKit NumpyConversion.swift
[7/7] Emitting module PythonKit
/host/spi-builder-workspace/PythonKit/Python.swift:663:12: warning: let 'Python' is not concurrency-safe because non-'Sendable' type 'PythonInterface' may have shared mutable state; this is an error in the Swift 6 language mode
 661 | ///     print(Python.type(list) == Python.list) // Prints true.
 662 | @_fixed_layout
 663 | public let Python = PythonInterface()
     |            |- warning: let 'Python' is not concurrency-safe because non-'Sendable' type 'PythonInterface' may have shared mutable state; this is an error in the Swift 6 language mode
     |            |- note: add '@MainActor' to make let 'Python' part of global actor 'MainActor'
     |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 664 |
 665 | /// An interface for Python.
     :
 671 | ///   called `Python`.
 672 | @dynamicMemberLookup
 673 | public struct PythonInterface {
     |               `- note: consider making struct 'PythonInterface' conform to the 'Sendable' protocol
 674 |     /// A dictionary of the Python builtins.
 675 |     public let builtins: PythonObject
/host/spi-builder-workspace/PythonKit/Python.swift:1733:16: warning: static property 'sharedMethodDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
1731 |
1732 | fileprivate extension PythonFunction {
1733 |     static let sharedMethodDefinition: UnsafeMutablePointer<PyMethodDef> = {
     |                |- warning: static property 'sharedMethodDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
     |                |- note: add '@MainActor' to make static property 'sharedMethodDefinition' part of global actor 'MainActor'
     |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1734 |         let name: StaticString = "pythonkit_swift_function"
1735 |         // `utf8Start` is a property of StaticString, thus, it has a stable pointer.
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
/host/spi-builder-workspace/PythonKit/Python.swift:1755:16: warning: static property 'sharedMethodWithKeywordsDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
1753 |     }()
1754 |
1755 |     static let sharedMethodWithKeywordsDefinition: UnsafeMutablePointer<PyMethodDef> = {
     |                |- warning: static property 'sharedMethodWithKeywordsDefinition' is not concurrency-safe because non-'Sendable' type 'UnsafeMutablePointer<PyMethodDef>' may have shared mutable state; this is an error in the Swift 6 language mode
     |                |- note: add '@MainActor' to make static property 'sharedMethodWithKeywordsDefinition' part of global actor 'MainActor'
     |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
1756 |         let name: StaticString = "pythonkit_swift_function_with_keywords"
1757 |         // `utf8Start` is a property of StaticString, thus, it has a stable pointer.
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
  |                       `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 |     public let _rawValue: Builtin.RawPointer
3 |     public init(_ _rawValue: Builtin.RawPointer)
/host/spi-builder-workspace/PythonKit/Python.swift:92:21: warning: stored property 'reference' of 'Sendable'-conforming struct 'PythonObject' has non-sendable type 'PyReference'; this is an error in the Swift 6 language mode
  38 | //   implement move semantics.
  39 | @usableFromInline @_fixed_layout
  40 | final class PyReference {
     |             `- note: class 'PyReference' does not conform to the 'Sendable' protocol
  41 |     private var pointer: OwnedPyObjectPointer
  42 |
     :
  90 | public struct PythonObject {
  91 |     /// The underlying `PyReference`.
  92 |     fileprivate var reference: PyReference
     |                     `- warning: stored property 'reference' of 'Sendable'-conforming struct 'PythonObject' has non-sendable type 'PyReference'; this is an error in the Swift 6 language mode
  93 |
  94 |     @usableFromInline
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:228:5: warning: let '_Py_ZeroStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
226 |         legacyName: "PyString_AsStringAndSize")
227 |
228 | let _Py_ZeroStruct: PyObjectPointer =
    |     |- warning: let '_Py_ZeroStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let '_Py_ZeroStruct' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
229 |     PythonLibrary.loadSymbol(name: "_Py_ZeroStruct")
230 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:231:5: warning: let '_Py_TrueStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
229 |     PythonLibrary.loadSymbol(name: "_Py_ZeroStruct")
230 |
231 | let _Py_TrueStruct: PyObjectPointer =
    |     |- warning: let '_Py_TrueStruct' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let '_Py_TrueStruct' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
232 |     PythonLibrary.loadSymbol(name: "_Py_TrueStruct")
233 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:234:5: warning: let 'PyBool_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
232 |     PythonLibrary.loadSymbol(name: "_Py_TrueStruct")
233 |
234 | let PyBool_Type: PyObjectPointer =
    |     |- warning: let 'PyBool_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let 'PyBool_Type' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
235 |     PythonLibrary.loadSymbol(name: "PyBool_Type")
236 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary+Symbols.swift:237:5: warning: let 'PySlice_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
235 |     PythonLibrary.loadSymbol(name: "PyBool_Type")
236 |
237 | let PySlice_Type: PyObjectPointer =
    |     |- warning: let 'PySlice_Type' is not concurrency-safe because non-'Sendable' type 'PyObjectPointer' (aka 'UnsafeMutableRawPointer') may have shared mutable state; this is an error in the Swift 6 language mode
    |     |- note: add '@MainActor' to make let 'PySlice_Type' part of global actor 'MainActor'
    |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
238 |     PythonLibrary.loadSymbol(name: "PySlice_Type")
239 |
Swift.UnsafeMutableRawPointer:1:23: note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutableRawPointer : _Pointer {
  |                       `- note: struct 'UnsafeMutableRawPointer' does not conform to the 'Sendable' protocol
2 |     public typealias Pointee = UInt8
3 |     public let _rawValue: Builtin.RawPointer
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:53:24: warning: static property 'defaultLibraryHandle' is not concurrency-safe because non-'Sendable' type 'UnsafeMutableRawPointer?' may have shared mutable state; this is an error in the Swift 6 language mode
 51 |     private static let defaultLibraryHandle = UnsafeMutableRawPointer(bitPattern: -2)  // RTLD_DEFAULT
 52 | #else
 53 |     private static let defaultLibraryHandle: UnsafeMutableRawPointer? = nil  // RTLD_DEFAULT
    |                        |- warning: static property 'defaultLibraryHandle' is not concurrency-safe because non-'Sendable' type 'UnsafeMutableRawPointer?' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'defaultLibraryHandle' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 54 | #endif
 55 |
Swift.Optional:1:21: note: generic enum 'Optional' does not conform to the 'Sendable' protocol
1 | @frozen public enum Optional<Wrapped> : ~Copyable where Wrapped : ~Copyable {
  |                     `- note: generic enum 'Optional' does not conform to the 'Sendable' protocol
2 |     case none
3 |     case some(Wrapped)
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:56:24: warning: static property 'isPythonLibraryLoaded' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 54 | #endif
 55 |
 56 |     private static var isPythonLibraryLoaded = false
    |                        |- warning: static property 'isPythonLibraryLoaded' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'isPythonLibraryLoaded' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'isPythonLibraryLoaded' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 57 |     private static var _pythonLibraryHandle: UnsafeMutableRawPointer?
 58 |     private static var pythonLibraryHandle: UnsafeMutableRawPointer? {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:57:24: warning: static property '_pythonLibraryHandle' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 55 |
 56 |     private static var isPythonLibraryLoaded = false
 57 |     private static var _pythonLibraryHandle: UnsafeMutableRawPointer?
    |                        |- warning: static property '_pythonLibraryHandle' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert '_pythonLibraryHandle' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property '_pythonLibraryHandle' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |     private static var pythonLibraryHandle: UnsafeMutableRawPointer? {
 59 |         try! PythonLibrary.loadLibrary()
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:120:34: error: cannot find 'librarySearchPaths' in scope
118 |     private static let libraryPaths: [String] = {
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
    |                                  `- error: cannot find 'librarySearchPaths' in scope
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:121:32: error: cannot find 'libraryNames' in scope
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
    |                                `- error: cannot find 'libraryNames' in scope
122 |                 for libraryPathExtension in libraryPathExtensions {
123 |                     let libraryPath =
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:122:45: error: cannot find 'libraryPathExtensions' in scope
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
    |                                             `- error: cannot find 'libraryPathExtensions' in scope
123 |                     let libraryPath =
124 |                     librarySearchPath + libraryName + libraryPathExtension
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/6] Compiling PythonKit PythonLibrary+Symbols.swift
[3/6] Compiling PythonKit PythonLibrary.swift
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:120:34: error: cannot find 'librarySearchPaths' in scope
118 |     private static let libraryPaths: [String] = {
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
    |                                  `- error: cannot find 'librarySearchPaths' in scope
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:121:32: error: cannot find 'libraryNames' in scope
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
    |                                `- error: cannot find 'libraryNames' in scope
122 |                 for libraryPathExtension in libraryPathExtensions {
123 |                     let libraryPath =
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:122:45: error: cannot find 'libraryPathExtensions' in scope
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
    |                                             `- error: cannot find 'libraryPathExtensions' in scope
123 |                     let libraryPath =
124 |                     librarySearchPath + libraryName + libraryPathExtension
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:141:20: error: cannot find 'dlsym' in scope
139 |             return unsafeBitCast(moduleSymbol, to: UnsafeMutableRawPointer?.self)
140 | #else
141 |             return dlsym(libraryHandle, name)
    |                    `- error: cannot find 'dlsym' in scope
142 | #endif
143 |         }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:194:36: error: cannot find 'libraryVersionSeparator' in scope
192 |             let libraryVersionString = versionString
193 |                 .split(separator: PythonVersion.versionSeparator)
194 |                 .joined(separator: libraryVersionSeparator)
    |                                    `- error: cannot find 'libraryVersionSeparator' in scope
195 |             let path = path.split(separator: libraryPathVersionCharacter)
196 |                 .joined(separator: libraryVersionString)
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:35: error: cannot find 'dlopen' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                   `- error: cannot find 'dlopen' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:48: error: cannot find 'RTLD_LAZY' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                                `- error: cannot find 'RTLD_LAZY' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:207:60: error: cannot find 'RTLD_GLOBAL' in scope
205 |         // Must be RTLD_GLOBAL because subsequent .so files from the imported python
206 |         // modules may depend on this .so file.
207 |         let pythonLibraryHandle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)
    |                                                            `- error: cannot find 'RTLD_GLOBAL' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:210:35: error: cannot find 'dlerror' in scope
208 |         if pythonLibraryHandle == nil {
209 |             self.log("Failed to load library at '\(path)'.")
210 |             if let errorCString = dlerror() {
    |                                   `- error: cannot find 'dlerror' in scope
211 |                 let errorString = String(cString: errorCString)
212 |                 self.log("Reason for failure: \(errorString)")
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:294:33: error: cannot find 'getenv' in scope
292 |
293 |         var value: String? {
294 |             guard let cString = getenv(key) else { return nil }
    |                                 `- error: cannot find 'getenv' in scope
295 |             let value = String(cString: cString)
296 |             guard !value.isEmpty else { return nil }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:304:13: error: cannot find 'setenv' in scope
302 |             _putenv_s(key, value)
303 | #else
304 |             setenv(key, value, 1)
    |             `- error: cannot find 'setenv' in scope
305 | #endif
306 |         }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:314:9: error: cannot find 'fputs' in scope
312 |     private static func log(_ message: String) {
313 |         guard Environment.loaderLogging.value != nil else { return }
314 |         fputs(message + "\n", stderr)
    |         `- error: cannot find 'fputs' in scope
315 |     }
316 | }
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:314:31: error: cannot find 'stderr' in scope
312 |     private static func log(_ message: String) {
313 |         guard Environment.loaderLogging.value != nil else { return }
314 |         fputs(message + "\n", stderr)
    |                               `- error: cannot find 'stderr' in scope
315 |     }
316 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/6] Compiling PythonKit NumpyConversion.swift
[5/6] Compiling PythonKit Python.swift
[6/6] Emitting module PythonKit
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:120:34: error: cannot find 'librarySearchPaths' in scope
118 |     private static let libraryPaths: [String] = {
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
    |                                  `- error: cannot find 'librarySearchPaths' in scope
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:121:32: error: cannot find 'libraryNames' in scope
119 |         var libraryPaths: [String] = []
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
    |                                `- error: cannot find 'libraryNames' in scope
122 |                 for libraryPathExtension in libraryPathExtensions {
123 |                     let libraryPath =
/host/spi-builder-workspace/PythonKit/PythonLibrary.swift:122:45: error: cannot find 'libraryPathExtensions' in scope
120 |         for librarySearchPath in librarySearchPaths {
121 |             for libraryName in libraryNames {
122 |                 for libraryPathExtension in libraryPathExtensions {
    |                                             `- error: cannot find 'libraryPathExtensions' in scope
123 |                     let libraryPath =
124 |                     librarySearchPath + libraryName + libraryPathExtension
BUILD FAILURE 6.1 android