Build Information
Failed to build swift-fileio, reference 0.9.0 (23349f
), with Swift 6.2 (beta) for Android on 23 Jun 2025 23:25:12 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.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/p-x9/swift-fileio.git
Reference: 0.9.0
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
* tag 0.9.0 -> FETCH_HEAD
HEAD is now at 23349fe Merge pull request #15 from p-x9/feature/inlinable
Cloned https://github.com/p-x9/swift-fileio.git
Revision (git rev-parse @):
23349fe1eb23c6ca2876d461a46ff60c0fa92f9c
SUCCESS checkout https://github.com/p-x9/swift-fileio.git at 0.9.0
========================================
Build
========================================
Selected platform: android
Swift version: 6.2
Building package at path: $PWD
https://github.com/p-x9/swift-fileio.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:b7c4a6b4153ff40ef9277e2157e708f835b8eb011095d53bd8db4594eb2b7798
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-8C5A4AE7A8CE2BA.txt
[3/6] Compiling FileIO MemoryMappedFile.swift
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:73:22: error: cannot find 'MAP_FAILED' in scope
71 | let ptr = mmap(nil, Int(fileSize), prot, MAP_SHARED, fd, 0)
72 | guard let ptr,
73 | 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.2-DEVELOPMENT-SNAPSHOT-2025-05-15-a-android-0.1.artifactbundle/swift-android/ndk-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 | ptr != MAP_FAILED else {
74 | close(fd)
/host/spi-builder-workspace/Sources/FileIO/MemoryMappedFile.swift:133:22: error: cannot find 'MAP_FAILED' in scope
131 | let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
132 | guard let ptr,
133 | ptr != MAP_FAILED else {
| `- error: cannot find 'MAP_FAILED' in scope
134 | throw POSIXError(.init(rawValue: errno)!)
135 | }
/root/.swiftpm/swift-sdks/swift-6.2-DEVELOPMENT-SNAPSHOT-2025-05-15-a-android-0.1.artifactbundle/swift-android/ndk-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:132:15: error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
130 | if isWritable { prot |= PROT_WRITE }
131 | let ptr = mmap(nil, newSize, prot, MAP_SHARED, fileDescriptor, 0)
132 | guard let ptr,
| `- error: initializer for conditional binding must have Optional type, not 'UnsafeMutableRawPointer'
133 | ptr != MAP_FAILED else {
134 | throw POSIXError(.init(rawValue: errno)!)
[4/6] Compiling FileIO FileIO.swift
[5/6] Emitting module FileIO
[6/6] Compiling FileIO StreamedFile.swift
BUILD FAILURE 6.2 android