wabiverse / MetaverseKit

Monolithic dependency encapsulating the ASWF landscape to swiftly architect the metaverse.
https://wabi.foundation
Apache License 2.0
19 stars 0 forks source link

Linux (x86/64) Support #16

Closed furby-tm closed 6 months ago

furby-tm commented 6 months ago

As far as I'm aware v1.5.8 should support Linux running on x86/64 architecture.


Noticed that SwiftUSD did not, or at least has not yet run into an issue with it's build here, currently it's failing for unrelated issues due to SPI not yet having these dependencies installed on it's Linux instance:

sudo apt install libbz2-dev
sudo apt install zlib1g-dev
sudo apt install python3-dev
sudo apt install libboost-all-dev


But the error status seen here seems strange to me, likely because if you target building of the entire package itself it'll attempt to blindly build all targets, instead of looking at the dependency graph (and sse2neon is not supposed to be built for x86/64) but there doesn't seem to be a way to tell Swift a certain target should only be built under such constraints, I might just have to resort to preprocessing out the existence of the target entirely outside this scope:

#if arch(arm64)
#endif

[!NOTE] While this is a tiny single header "library" and I could easily preprocess out the whole header itself, my question here pertains to if there's any way to do this from the Package.swift configuration level or if this is a limitation of SPM itself that should likely be addressed at some point.

Curious if anybody can confirm for me? I don't have any access to this arch on my end.

Thanks!

furby-tm commented 6 months ago

@stackotter perhaps you know of a way to remove a target entirely given some condition? Unless preprocessing the whole target out is the only option as of right now.

furby-tm commented 6 months ago

@lin72h I've went ahead and got a CI workflow together for Ubuntu x86/64 here to allow me to see what's going on for that platform. I am happy to say things are nearly there, just fixing up the last of any errors that the compiler spits out.

lin72h commented 6 months ago

excellent progress! can't believe yourself put all these together

furby-tm commented 6 months ago

Thank you! I'm happy to be doing this, giving it another go - this one might just do it! 🤞🏻

UPDATE: I missed a single dang include 😮‍💨 trying again.

furby-tm commented 6 months ago

yoohoo! We finally made it, first successful build on Linux Ubuntu x86/64. 🎉