The Swift Package Index logo.Swift Package Index

Build Information

Failed to build BaseMath with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/jph00/basemath.git
Reference: master
Cloned https://github.com/jph00/basemath.git into spi-builder-workspace
SUCCESS checkout https://github.com/jph00/basemath.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
[0/5] Compiling CBaseMath CBaseMath.cpp
[1/5] Compiling CBaseMath CDistribution.cpp
[3/13] Compiling BaseMath CBaseRand.swift
[4/13] Compiling BaseMath BaseVector.swift
[5/13] Compiling BaseMath Utils.swift
[6/13] Compiling BaseMath Storage.swift
/host/spi-builder-workspace/Sources/BaseMath/Storage.swift:11:59: warning: initialization of 'UnsafeMutablePointer<Element>' results in a dangling pointer
  public var p:UnsafeMutablePointer<Element> {get {return UnsafeMutablePointer(mutating: self)}}
                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/BaseMath/Storage.swift:11:90: note: implicit argument conversion from 'Array<Element>' to 'UnsafePointer<Element>' produces a pointer valid only for the duration of the call to 'init(mutating:)'
  public var p:UnsafeMutablePointer<Element> {get {return UnsafeMutablePointer(mutating: self)}}
                                                                                         ^~~~
/host/spi-builder-workspace/Sources/BaseMath/Storage.swift:11:90: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
  public var p:UnsafeMutablePointer<Element> {get {return UnsafeMutablePointer(mutating: self)}}
                                                                                         ^
[7/13] Compiling BaseMath BaseMath.swift
[8/13] Compiling BaseMath BaseRand.swift
[9/13] Emitting module BaseMath
[10/13] Compiling BaseMath FloatVector.swift
[12/15] Wrapping AST for BaseMath for debugging
error: emit-module command failed with exit code 1 (use -v to see invocation)
[14/17] Emitting module bench
/host/spi-builder-workspace/Sources/bench/main.swift:113:27: error: cannot find 'sm_add_float' in scope
benchmark(title:"C add") {sm_add_float(ar1.p, 2.0, ar2.p, ar1.c)}
                          ^~~~~~~~~~~~
/host/spi-builder-workspace/Sources/bench/main.swift:127:27: error: cannot find 'sm_sin_float' in scope
benchmark(title:"C sin") {sm_sin_float(ar1.p, ar2.p, ar1.c)}
                          ^~~~~~~~~~~~
/host/spi-builder-workspace/Sources/bench/main.swift:136:35: error: cannot find 'smSum_sqr_float' in scope
benchmark(title:"c sumsqr") {a1 = smSum_sqr_float(ar1.p, ar1.c)}
                                  ^~~~~~~~~~~~~~~
[15/17] Compiling bench main.swift
/host/spi-builder-workspace/Sources/bench/main.swift:113:27: error: cannot find 'sm_add_float' in scope
benchmark(title:"C add") {sm_add_float(ar1.p, 2.0, ar2.p, ar1.c)}
                          ^~~~~~~~~~~~
/host/spi-builder-workspace/Sources/bench/main.swift:127:27: error: cannot find 'sm_sin_float' in scope
benchmark(title:"C sin") {sm_sin_float(ar1.p, ar2.p, ar1.c)}
                          ^~~~~~~~~~~~
/host/spi-builder-workspace/Sources/bench/main.swift:136:35: error: cannot find 'smSum_sqr_float' in scope
benchmark(title:"c sumsqr") {a1 = smSum_sqr_float(ar1.p, ar1.c)}
                                  ^~~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1