-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arch Linux: Swift bug; malformed input json, build tool plugins #15
Comments
Hey! Thanks for your interest in the SwiftUSD project. This should build fine on Linux, however it’s quite a strange error that you’ve run into on Arch Linux! Out of curiosity what is the output of: swift —-version Perhaps you can get away with simply commenting out the plugin tool(s) [I believe there’s two] in the Package.swift manifest, but I’d like to ensure this works “out of the box” on Arch Linux as it does on Ubuntu and CentOS, so hopefully we can find a solution if this is a widespread issue occurring on Arch. |
Totally understandable! What I should do is take the fork of the project and try to rebuild. I think it should be to try that to test. Gets me an excuse as well to try and build the same copy, but using git instead of swift 🤷 I believe so too btw, strange error. I took it out of my personal package pm right now, but It literally built everything until it got to that part so that was just...odd. EDIT: Update, so I decided to do a naive fork and swift build see what might tell me more about how the project is structured. This popped out much earlier, I don't want to copy all the errors yet, it would just be spam otherwise. |
I tried to do a few things on my own repo, but to not luck. Do you have a community or are part of a swift community I can link with? I genuinely want to help So I figured galah might be tripping the compiler since A. I am 5.10 and B. I think the swift pm does not build macros well (just my opinion, this isnt my first problem with the PM with specifically a macro or build tool on linux, god help me if I tried on Windows.) |
There is the ASWF slack, then go to the wg-swift channel. And/or Swift Discord. |
@UltimaTerra much easier to talk through those communities linked above than over GitHub. |
I also reviewed your fork revision, I noticed a couple issues with your commenting out of the Package.swift manifest file that SwiftPM is now timing out and giving you that error message because the manifest syntax from that edit is incorrect. With these massive SwiftPM Package.swift manifest files, you get almost zero help from the compiler or linter when errors do exist, which tends to add some confusion. |
I am sorry for getting back to you late, I totally understand. Yeah, to be honest, I kind of am/still struggling with the swift package manager. Not just with this project, I am also on a new system so I can try a rebuild soon. |
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
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 toBuildToolPlugin
protocolerror: 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?
The text was updated successfully, but these errors were encountered: