The Swift Package Index logo.Swift Package Index

Build Information

Failed to build S3Kit with Swift 5.8 for Linux.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.22.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/saltzmanjoelh/S3Kit.git
Reference: 1.0.21
Cloned https://github.com/saltzmanjoelh/S3Kit.git into spi-builder-workspace
SUCCESS checkout https://github.com/saltzmanjoelh/S3Kit.git at 1.0.21
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.8
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.8-latest swift build 2>&1
Building for debugging...
[1/6] Compiling S3Kit S3V4Signer.swift
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:67:54: error: cannot find 'CC_SHA256_DIGEST_LENGTH' in scope
        var hash =  [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))
                                                     ^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:69:13: error: cannot find 'CC_SHA256' in scope
            CC_SHA256($0, CC_LONG(data.count), &hash)
            ^~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:69:27: error: cannot find 'CC_LONG' in scope
            CC_SHA256($0, CC_LONG(data.count), &hash)
                          ^~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:72:51: error: cannot find 'CC_SHA256_DIGEST_LENGTH' in scope
        let res = NSData(bytes: hash, length: Int(CC_SHA256_DIGEST_LENGTH))
                                                  ^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:79:29: error: cannot find 'CC_SHA256_DIGEST_LENGTH' in scope
        let digestLen = Int(CC_SHA256_DIGEST_LENGTH)
                            ^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:81:9: error: cannot find 'CCHmac' in scope
        CCHmac(CCHmacAlgorithm(kCCHmacAlgSHA256), key.bytes, key.length, data, dataLen, result);
        ^~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:81:16: error: cannot find 'CCHmacAlgorithm' in scope
        CCHmac(CCHmacAlgorithm(kCCHmacAlgSHA256), key.bytes, key.length, data, dataLen, result);
               ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3V4Signer.swift:81:32: error: cannot find 'kCCHmacAlgSHA256' in scope
        CCHmac(CCHmacAlgorithm(kCCHmacAlgSHA256), key.bytes, key.length, data, dataLen, result);
                               ^~~~~~~~~~~~~~~~
[2/6] Compiling S3Kit S3Kit.swift
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:62:131: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public func upload(file fileURL: URL, to bucket: String, in region: String = "us-east-1") throws -> (data: NSData?, response: HTTPURLResponse) {
                                                                                                                                  ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:177:131: error: cannot find type 'URLRequest' in scope
    public func downloadRequest(forFile fileURL: URL, fromBucket bucket: String, inRegion region: String = "us-east-1") throws -> URLRequest {
                                                                                                                                  ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:74:23: error: cannot find 'NSMutableURLRequest' in scope
        let request = NSMutableURLRequest(url: s3URL)
                      ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:75:32: error: cannot infer contextual base in reference to member 'reloadIgnoringCacheData'
        request.cachePolicy = .reloadIgnoringCacheData
                              ~^~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:92:36: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        var data: Data?, response: URLResponse?, error: NSError?
                                   ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:94:53: error: cannot find type 'URLRequest' in scope
        URLSession.shared.dataTask(with: request as URLRequest) { (d:Data?, r:URLResponse?, e:Error?) -> Void in
                                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:94:20: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        URLSession.shared.dataTask(with: request as URLRequest) { (d:Data?, r:URLResponse?, e:Error?) -> Void in
        ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:110:42: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
        guard let urlResponse = response as? HTTPURLResponse else {
                                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
                                        
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:110:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        guard let urlResponse = response as? HTTPURLResponse else {
                                             ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:113:24: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        if urlResponse.statusCode != 200 {
           ~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:138:23: error: cannot find 'NSMutableURLRequest' in scope
        let request = NSMutableURLRequest(url: s3URL)
                      ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:150:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        var response: URLResponse?, error: NSError?
                      ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:152:53: error: cannot find type 'URLRequest' in scope
        URLSession.shared.dataTask(with: request as URLRequest) {
                                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:152:20: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        URLSession.shared.dataTask(with: request as URLRequest) {
        ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:153:24: error: cannot assign value of type '_' to type 'URLResponse?' (aka 'Optional<AnyObject>')
            response = $1; error = $2 as NSError?
                       ^~
                          as URLResponse
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:171:42: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
        guard let urlResponse = response as? HTTPURLResponse else {
                                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
                                        
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:171:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        guard let urlResponse = response as? HTTPURLResponse else {
                                             ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:174:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        return urlResponse.statusCode == 200
               ~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:183:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: s3URL)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:185:32: error: cannot infer contextual base in reference to member 'reloadIgnoringCacheData'
        request.cachePolicy = .reloadIgnoringCacheData
                              ~^~~~~~~~~~~~~~~~~~~~~~~
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling S3Kit Data+SHA256.swift
/host/spi-builder-workspace/Sources/S3Kit/Data+SHA256.swift:39:32: error: missing argument for parameter 'capacity' in call
    let hash = NSMutableString()
                               ^
                               capacity: <#Int#>
Foundation.NSMutableString:4:21: note: 'init(capacity:)' declared here
    required public init(capacity: Int)
                    ^
/host/spi-builder-workspace/Sources/S3Kit/Data+SHA256.swift:40:17: error: cannot find 'bytes' in scope
    for byte in bytes {
                ^~~~~
[4/6] Emitting module S3Kit
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:62:131: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public func upload(file fileURL: URL, to bucket: String, in region: String = "us-east-1") throws -> (data: NSData?, response: HTTPURLResponse) {
                                                                                                                                  ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/S3Kit/S3Kit.swift:177:131: error: cannot find type 'URLRequest' in scope
    public func downloadRequest(forFile fileURL: URL, fromBucket bucket: String, inRegion region: String = "us-east-1") throws -> URLRequest {
                                                                                                                                  ^~~~~~~~~~
BUILD FAILURE 5.8 linux

Build Machine: Linux 1