The Swift Package Index logo.Swift Package Index

Build Information

Failed to build alpaca.swift, reference v0.1.0 (e89aff), with Swift 6.4 for Android on 3 Nov 2026 06:17:58 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-54344843-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.4-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/torinriley/alpaca.git
Reference: v0.1.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/torinriley/alpaca
 * tag               v0.1.0     -> FETCH_HEAD
HEAD is now at e89affe Prepare 0.1.0: install via version tag, citation metadata, changelog, release notes
Cloned https://github.com/torinriley/alpaca.git
Revision (git rev-parse @):
e89affe14b1576f47856f1a1a9472f2f17a8e3bf
SUCCESS checkout https://github.com/torinriley/alpaca.git at v0.1.0
========================================
Build
========================================
Selected platform:         android
Swift version:             6.4
Building package at path:  $PWD
https://github.com/torinriley/alpaca.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-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.4-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.4-latest: Pulling from saguaro1/spi-images
Digest: sha256:1ec638249ee9496bfd8413990a8663326bfd4883adb2b1d6b616fd753c8ff99b
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:android-6.4-latest
Building for debugging...
[Pre-planning 1 / 327]
[Starting]
[78 / 121] AlpacaCore
[89 / 121] AlpacaModels
[90 / 121] AlpacaModels
[91 / 121]
[94 / 130] AlpacaMetal
error: SwiftCompile normal aarch64 /host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift failed with a nonzero exit code. Command line:     cd /host
    builtin-SwiftPerFileCompile CPUOps.swift
[96 / 136] AlpacaCore
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:51:47: error: binary operator '/' cannot be applied to two 'Float' operands
 49 |     public static func silu(_ x: Tensor) throws -> Tensor {
 50 |         try requireF32(x, name: "silu")
 51 |         let v = try x.toFloatArray().map { $0 / (1 + exp(-$0)) }
    |                                               |- error: binary operator '/' cannot be applied to two 'Float' operands
    |                                               `- note: overloads for '/' exist with these partially matching parameter lists: (CGFloat, CGFloat), (Double, Double), (Duration, Double), (Float, Float)
 52 |         return try Tensor(v, shape: x.shape)
 53 |     }
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:51:58: error: unary operator '-' cannot be applied to an operand of type 'Float'
 49 |     public static func silu(_ x: Tensor) throws -> Tensor {
 50 |         try requireF32(x, name: "silu")
 51 |         let v = try x.toFloatArray().map { $0 / (1 + exp(-$0)) }
    |                                                          |- error: unary operator '-' cannot be applied to an operand of type 'Float'
    |                                                          `- note: overloads for '-' exist with these partially matching parameter lists: (Float)
 52 |         return try Tensor(v, shape: x.shape)
 53 |     }
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:51:52: error: binary operator '+' cannot be applied to operands of type 'Float' and 'CGFloat'
 49 |     public static func silu(_ x: Tensor) throws -> Tensor {
 50 |         try requireF32(x, name: "silu")
 51 |         let v = try x.toFloatArray().map { $0 / (1 + exp(-$0)) }
    |                                                    |- error: binary operator '+' cannot be applied to operands of type 'Float' and 'CGFloat'
    |                                                    `- note: overloads for '+' exist with these partially matching parameter lists: (CGFloat, CGFloat), (Double, Double), (Float, Float)
 52 |         return try Tensor(v, shape: x.shape)
 53 |     }
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:51:54: error: no exact matches in call to global function 'exp'
 49 |     public static func silu(_ x: Tensor) throws -> Tensor {
 50 |         try requireF32(x, name: "silu")
 51 |         let v = try x.toFloatArray().map { $0 / (1 + exp(-$0)) }
    |                                                      `- error: no exact matches in call to global function 'exp'
 52 |         return try Tensor(v, shape: x.shape)
 53 |     }
Foundation.exp:1:13: note: candidate expects value of type 'CGFloat' for parameter #1 (got 'Float')
1 | public func exp(_ x: CGFloat) -> CGFloat
  |             `- note: candidate expects value of type 'CGFloat' for parameter #1 (got 'Float')
/android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:125:8: note: candidate expects value of type 'Double' for parameter #1 (got 'Float')
123 | long double tanhl(long double __x);
124 |
125 | double exp(double __x);
    |        `- note: candidate expects value of type 'Double' for parameter #1 (got 'Float')
126 | float expf(float __x);
127 | long double expl(long double __x);
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:171:44: error: no exact matches in call to global function 'exp'
169 |             for i in 0..<d { mx = max(mx, v[base + i]) }
170 |             var sum: Float = 0
171 |             for i in 0..<d { v[base + i] = exp(v[base + i] - mx); sum += v[base + i] }
    |                                            `- error: no exact matches in call to global function 'exp'
172 |             for i in 0..<d { v[base + i] /= sum }
173 |         }
Foundation.exp:1:13: note: candidate expects value of type 'CGFloat' for parameter #1 (got 'Float')
1 | public func exp(_ x: CGFloat) -> CGFloat
  |             `- note: candidate expects value of type 'CGFloat' for parameter #1 (got 'Float')
/android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:125:8: note: candidate expects value of type 'Double' for parameter #1 (got 'Float')
123 | long double tanhl(long double __x);
124 |
125 | double exp(double __x);
    |        `- note: candidate expects value of type 'Double' for parameter #1 (got 'Float')
126 | float expf(float __x);
127 | long double expl(long double __x);
/host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift:171:44: error: no 'exp' candidates produce the expected contextual result type 'Float'
169 |             for i in 0..<d { mx = max(mx, v[base + i]) }
170 |             var sum: Float = 0
171 |             for i in 0..<d { v[base + i] = exp(v[base + i] - mx); sum += v[base + i] }
    |                                            `- error: no 'exp' candidates produce the expected contextual result type 'Float'
172 |             for i in 0..<d { v[base + i] /= sum }
173 |         }
Foundation.exp:1:13: note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
1 | public func exp(_ x: CGFloat) -> CGFloat
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             |- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
  |             `- note: 'exp' produces 'CGFloat', not the expected contextual result type 'Float'
/android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:125:8: note: 'exp' produces 'Double', not the expected contextual result type 'Float'
123 | long double tanhl(long double __x);
124 |
125 | double exp(double __x);
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        |- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
    |        `- note: 'exp' produces 'Double', not the expected contextual result type 'Float'
126 | float expf(float __x);
127 | long double expl(long double __x);
Failed frontend command:
/root/.local/share/swiftly/toolchains/6.4.0/usr/bin/swift-frontend -frontend -c -primary-file /host/spi-builder-workspace/Sources/AlpacaCore/Memory/MemoryBudget.swift -primary-file /host/spi-builder-workspace/Sources/AlpacaCore/Operations/CPUOps.swift /host/spi-builder-workspace/Sources/AlpacaCore/Operations/Quantization.swift /host/spi-builder-workspace/Sources/AlpacaCore/Runtime/ErrorMetrics.swift /host/spi-builder-workspace/Sources/AlpacaCore/Runtime/Sampler.swift /host/spi-builder-workspace/Sources/AlpacaCore/Tensor/DType.swift /host/spi-builder-workspace/Sources/AlpacaCore/Tensor/Tensor.swift /host/spi-builder-workspace/Sources/AlpacaCore/Tensor/TensorError.swift /host/spi-builder-workspace/Sources/AlpacaCore/Tensor/TensorStorage.swift /host/spi-builder-workspace/Sources/AlpacaCore/Transformer/KVCache.swift /host/spi-builder-workspace/Sources/AlpacaCore/Transformer/LlamaCPUModel.swift /host/spi-builder-workspace/Sources/AlpacaCore/Transformer/LlamaConfig.swift /host/spi-builder-workspace/Sources/AlpacaCore/Transformer/LlamaWeights.swift -emit-dependencies-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.d -emit-const-values-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.swiftconstvalues -emit-reference-dependencies-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.swiftdeps -serialize-diagnostics-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.dia -emit-dependencies-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.d -emit-const-values-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.swiftconstvalues -emit-reference-dependencies-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.swiftdeps -serialize-diagnostics-path /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.dia -target aarch64-unknown-linux-android28 -Xllvm -aarch64-use-tbi -disable-objc-interop -sdk /android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/sysroot -sysroot /android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/sysroot -I /host/spi-builder-workspace/.build/out/Products/Debug-android-aarch64 -module-cache-path /host/spi-builder-workspace/.build/out/ModuleCache.noindex -color-diagnostics -Xcc -fcolor-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -swift-version 6 -Onone -D SWIFT_PACKAGE -D DEBUG -D SWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -D Xcode -serialize-debugging-options -enable-experimental-feature DebugDescriptionMacro -empty-abi-descriptor -external-plugin-path /root/.local/share/swiftly/toolchains/6.4.0/usr/lib/swift/host/plugins/testing\#/root/.local/share/swiftly/toolchains/6.4.0/usr/bin/swift-plugin-server -validate-clang-modules-once -clang-build-session-file /host/spi-builder-workspace/.build/out/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /host -resource-dir /root/.swiftpm/swift-sdks/swift-6.4.0-RELEASE_android.artifactbundle/swift-android/swift-resources/usr/lib/swift-aarch64 -enable-anonymous-context-mangled-names -file-compilation-dir /host -Xcc -resource-dir -Xcc /android-ndk/android-ndk-r30/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21 -Xcc -fno-omit-frame-pointer -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -Xcc -I/host/spi-builder-workspace/.build/out/Products/Debug-android-aarch64/include -Xcc -I/host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/DerivedSources-normal/aarch64 -Xcc -I/host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/DerivedSources/aarch64 -Xcc -I/host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name AlpacaCore -package-name spi_builder_workspace -const-gather-protocols-file /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/AlpacaCore_const_extract_protocols.json -in-process-plugin-server-path /root/.local/share/swiftly/toolchains/6.4.0/usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /root/.local/share/swiftly/toolchains/6.4.0/usr/lib/swift/host/plugins -plugin-path /root/.local/share/swiftly/toolchains/6.4.0/usr/local/lib/swift/host/plugins -parse-as-library -o /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.o -o /host/spi-builder-workspace/.build/out/Intermediates.noindex/alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.o -index-unit-output-path /alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/MemoryBudget.o -index-unit-output-path /alpaca.swift.build/Debug-android-aarch64/AlpacaCore-t.build/Objects-normal/aarch64/CPUOps.o -index-store-path /host/spi-builder-workspace/.build/out -index-system-modules
error: Build failed
BUILD FAILURE 6.4 android