Closed lf-araujo closed 6 years ago
@lf-araujo I did encounter this too - it appears there is a version of Kitura that has incorrect dependencies, and for some weird reason this is the version that gets selected by the package manager. Try removing the Package.resolved
file and rebuilding - if that does not work, fiddling with the versions in Package.swift
might fix it. I will have a look at this later!
A clean clone + swift build
on Debian appears to work without issue. What version of Swift are you running?
Mine is Swift version 4.0 (swift-4.0-RELEASE).
. Will now try a later one...
It's 4.1.
Will try to debug following your suggestion.
Thank you!
I investigated this a bit further and indeed, it builds fine with 4.0 but fails against 4.1 or higher. Note however that it builds fine on Mac inside a recent XCode (running >=4.1) and swift package generate-xcodeproj
, which is a bit odd.
Thanks for waiting,
I found the problem, it seems latest SPM allows for calling apt, which obviously does not work in other distros. An example code from SPM is:
import PackageDescription
let package = Package(
name: "CCurl",
providers: [
.Brew("curl"),
.Apt("libcurl4-openssl-dev")
]
)
From SPM sourcecode:
extension SystemPackageProviderDescription {
public var installText: String {
switch self {
case .brew(let packages):
return " brew install \(packages.joined(separator: " "))\n"
case .apt(let packages):
return " apt-get install \(packages.joined(separator: " "))\n"
}
}
So this problem is upstream and I will close the issue. It is, however, a bit disappointing to see Apple is hardcoding apt into SPM.
Thank you
@lf-araujo as far as I know the '.apt' reference only causes the SPM to show a suggestion to obtain the required packages through apt, but does not actually call it. So this is unlikely to be the culprit here..
Building instructions are failing to find KituraTemplateEngine in Manjaro (Arch based) Linux:
I followed instructions as per project webpage: git clone & swift build
Thank you for this software.