I have a plain vanilla Ubuntu 16.04 and installed OpenSSH, Curl and Swift 4.1.2 on it. The base example (swift package init --type executable) works but when I want to use Kitura framework I got a compile error if I 'swift build' it.
The error:
/.build/checkouts/Kitura.git--4845395383860597130/Sources/Kitura/staticFileServer/FileServer.swift:138:21: error: cannot convert value of type 'ObjCBool' to expected argument type 'Bool'
if !isDirectoryBool {
^~~~~~~~~~~~~~~
error: terminated(1): /home/thewall/swift-4.1.2-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /home/thewall/zSwift/.build/debug.yaml main output:
My package.swift file looks like:
import PackageDescription
let package = Package( name: "zSwift", dependencies: [ .package(url: "https://github.com/IBM-Swift/Kitura.git", >.upToNextMinor(from: "2.1.0")), ], targets: [ .target( name: "zSwift", dependencies: ["Kitura"]), ] )
uname -a gives:
Linux thewall 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Any ideas?
Kitura is handling it correctly, see https://github.com/IBM-Swift/Kitura/blob/master/Sources/Kitura/staticFileServer/FileServer.swift#L95
However, you are using an outdated Kitura version that has not been updated for your Swift version. Please, update Kitura to the latest version which is currently 2.4.1.