SwiftUSD icon indicating copy to clipboard operation
SwiftUSD copied to clipboard

Arch Linux: Swift bug; malformed input json, build tool plugins

Open UltimaTerra opened this issue 5 months ago • 7 comments

Description of Issue

It seems after all the checkouts, the last part of the build stage flops on linux becuase of bad json data.

Steps to Reproduce

  1. I don't think I can reproduce, this looks like a build failure. (Maybe because I am using Arch Linux?) I did try package clean as a first step to troubleshoot, the build produces a similar error.

(Possibly?) I could cross-compare the package.swift, I have never seen the linking strategy the project uses. Usually, it is a var Cxx linker that binds the c/c++ .h or .hpp files.

System Information (OS, Hardware)

I am on Arch Linux, Garuda specifically. I am on an i5 7600k and x86. This could just be as simple as 'I am not supported on Linux'. (lts 6.6.47) and using XCFE on 4.18. Also in my experienced, build tools with my swift install have not been pleasant, hence the issue. Maybe the protocol just doesn't specify linux/windows? (even though I tried in the past to specify these versions in the past and the swift PM does not work.

Package Versions

I am using the most recent version with Swift 5.10

Build Log

/run/media/nicolt/853438f4-0e84-4b7b-afa3-c1fe74a31ff1/EXIT/MAIN PROJECTS/Sh7rine/Zahard/.build/checkouts/MetaverseKit/Package.swift:1661:16: note: did you mean 'Windows'? #elseif os(visionOS) ^~~~~~~~ Windows error: Malformed input JSON: Plugin declared with buildTool capability but doesn't conform to BuildToolPlugin protocol error: build stopped due to build-tool plugin failures

So if you run swift package clean and try to build again, you get this. 'rainbow': /run/media/nicolt/853438f4-0e84-4b7b-afa3-c1fe74a31ff1/EXIT/MAIN PROJECTS/Sh7rine/Zahard/.build/repositories/Rainbow-64aa5363 is not valid git repository for 'https://github.com/onevcat/Rainbow.git', will fetch again. warning: 'swift-syntax': /run/media/nicolt/853438f4-0e84-4b7b-afa3-c1fe74a31ff1/EXIT/MAIN PROJECTS/Sh7rine/Zahard/.build/repositories/swift-syntax-463e60c9 is not valid git repository for 'https://github.com/apple/swift-syntax.git', will fetch again.

(rainbow/swift syntax are valid repos though, so not sure what is about)

Edit: My deepest apologies, I know this is basically 'this doesnt work on my machine!', This might be an impatience issue on my part. I do have no idea what I am doing though. I could fork and try to build a local copy, see if something similar is produced.

EDIT 2: Okay, so this is what I get for not reading documentation. So if I read the SPM right, basically this is having trouble build in general with newer swift package manager? Is there a script instead I use?

UltimaTerra avatar Sep 03 '24 19:09 UltimaTerra