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 swift-fileio, reference main (974398), with Swift 6.1 for Android on 15 Jun 2025 18:03:41 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-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/p-x9/swift-fileio.git
Reference: main
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/p-x9/swift-fileio
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 9743989 Merge pull request #16 from p-x9/feature/precondition-fastpath
Cloned https://github.com/p-x9/swift-fileio.git
Revision (git rev-parse @):
97439890d86e707f3df49a91365d25389f5f8b6f
SUCCESS checkout https://github.com/p-x9/swift-fileio.git at main
========================================
Build
========================================
Selected platform:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/p-x9/swift-fileio.git
https://github.com/p-x9/swift-fileio.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "swift-fileio",
  "name" : "swift-fileio",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "FileIO",
      "targets" : [
        "FileIO"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FileIOTests",
      "module_type" : "SwiftTarget",
      "name" : "FileIOTests",
      "path" : "Tests/FileIOTests",
      "sources" : [
        "FileIOTests.swift"
      ],
      "target_dependencies" : [
        "FileIO"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FileIO",
      "module_type" : "SwiftTarget",
      "name" : "FileIO",
      "path" : "Sources/FileIO",
      "product_memberships" : [
        "FileIO"
      ],
      "sources" : [
        "FileIO.swift",
        "MemoryMappedFile.swift",
        "StreamedFile.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-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:d4adec85e5c000fff132a1b0de73467182c76318cbb55cea6ebedacb1b3c4ef0
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/6] Compiling FileIO StreamedFile.swift
[4/6] Compiling FileIO FileIO.swift
[5/6] Emitting module FileIO
[6/6] Compiling FileIO MemoryMappedFile.swift
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:73:32: error: cannot find 'MAP_FAILED' in scope
 71 |         let ptr = mmap(nil, Int(fileSize), prot, MAP_SHARED, fd, 0)
 72 |         guard let ptr,
 73 |               _fastPath(ptr != MAP_FAILED) else {
    |                                `- error: cannot find 'MAP_FAILED' in scope
 74 |             close(fd)
 75 |             throw POSIXError(.init(rawValue: errno)!)
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/sys/mman.h:43:9: note: macro 'MAP_FAILED' unavailable: structure not supported
 41 |
 42 | /** Return value for mmap(). */
 43 | #define MAP_FAILED __BIONIC_CAST(reinterpret_cast, void*, -1)
    |         `- note: macro 'MAP_FAILED' unavailable: structure not supported
 44 |
 45 | /**
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:72:15: error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
 70 |         if isWritable { prot |= PROT_WRITE }
 71 |         let ptr = mmap(nil, Int(fileSize), prot, MAP_SHARED, fd, 0)
 72 |         guard let ptr,
    |               `- error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
 73 |               _fastPath(ptr != MAP_FAILED) else {
 74 |             close(fd)
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:136:22: error: cannot find 'MAP_FAILED' in scope
134 |         let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
135 |         guard let ptr,
136 |               ptr != MAP_FAILED else {
    |                      `- error: cannot find 'MAP_FAILED' in scope
137 |             throw POSIXError(.init(rawValue: errno)!)
138 |         }
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/sys/mman.h:43:9: note: macro 'MAP_FAILED' unavailable: structure not supported
 41 |
 42 | /** Return value for mmap(). */
 43 | #define MAP_FAILED __BIONIC_CAST(reinterpret_cast, void*, -1)
    |         `- note: macro 'MAP_FAILED' unavailable: structure not supported
 44 |
 45 | /**
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:135:15: error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
133 |         if isWritable { prot |= PROT_WRITE }
134 |         let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
135 |         guard let ptr,
    |               `- error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
136 |               ptr != MAP_FAILED else {
137 |             throw POSIXError(.init(rawValue: errno)!)
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-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:d4adec85e5c000fff132a1b0de73467182c76318cbb55cea6ebedacb1b3c4ef0
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/5] Compiling FileIO FileIO.swift
[3/5] Emitting module FileIO
[4/5] Compiling FileIO StreamedFile.swift
[5/5] Compiling FileIO MemoryMappedFile.swift
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:73:32: error: cannot find 'MAP_FAILED' in scope
 71 |         let ptr = mmap(nil, Int(fileSize), prot, MAP_SHARED, fd, 0)
 72 |         guard let ptr,
 73 |               _fastPath(ptr != MAP_FAILED) else {
    |                                `- error: cannot find 'MAP_FAILED' in scope
 74 |             close(fd)
 75 |             throw POSIXError(.init(rawValue: errno)!)
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/sys/mman.h:43:9: note: macro 'MAP_FAILED' unavailable: structure not supported
 41 |
 42 | /** Return value for mmap(). */
 43 | #define MAP_FAILED __BIONIC_CAST(reinterpret_cast, void*, -1)
    |         `- note: macro 'MAP_FAILED' unavailable: structure not supported
 44 |
 45 | /**
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:72:15: error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
 70 |         if isWritable { prot |= PROT_WRITE }
 71 |         let ptr = mmap(nil, Int(fileSize), prot, MAP_SHARED, fd, 0)
 72 |         guard let ptr,
    |               `- error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
 73 |               _fastPath(ptr != MAP_FAILED) else {
 74 |             close(fd)
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:136:22: error: cannot find 'MAP_FAILED' in scope
134 |         let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
135 |         guard let ptr,
136 |               ptr != MAP_FAILED else {
    |                      `- error: cannot find 'MAP_FAILED' in scope
137 |             throw POSIXError(.init(rawValue: errno)!)
138 |         }
/root/.swiftpm/swift-sdks/swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/sys/mman.h:43:9: note: macro 'MAP_FAILED' unavailable: structure not supported
 41 |
 42 | /** Return value for mmap(). */
 43 | #define MAP_FAILED __BIONIC_CAST(reinterpret_cast, void*, -1)
    |         `- note: macro 'MAP_FAILED' unavailable: structure not supported
 44 |
 45 | /**
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:135:15: error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
133 |         if isWritable { prot |= PROT_WRITE }
134 |         let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
135 |         guard let ptr,
    |               `- error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
136 |               ptr != MAP_FAILED else {
137 |             throw POSIXError(.init(rawValue: errno)!)
BUILD FAILURE 6.1 android