Skip to content
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

We finally need ARM Support #167

Open
BoKa33 opened this issue May 25, 2024 · 6 comments
Open

We finally need ARM Support #167

BoKa33 opened this issue May 25, 2024 · 6 comments

Comments

@BoKa33
Copy link

BoKa33 commented May 25, 2024

ARM is rising and i wanna play mindustry on Asahi linux. (The linux for the new Macbooks). There are always coming more ARM based notebooks.

-> Raspberry Pi
-> Pinebook
-> M1/M2 Macs with Asahi

etc..

And there always comes this error:
tuxi@TuxiFedAsahiLX:~/Downloads$ java -jar Mindustry-BE-Desktop-25023.jar [E] arc.util.ArcRuntimeException: Couldn't load shared library 'libarcarm64.so' for target: Linux, 64-bit at arc.util.SharedLibraryLoader.load(SharedLibraryLoader.java:84) at arc.util.ArcNativesLoader.load(ArcNativesLoader.java:14) at arc.backend.sdl.SdlApplication.init(SdlApplication.java:107) at arc.backend.sdl.SdlApplication.<init>(SdlApplication.java:35) at mindustry.desktop.DesktopLauncher.main(DesktopLauncher.java:39) Caused by: arc.util.ArcRuntimeException: Unable to read file for extraction: libarcarm64.so at arc.util.SharedLibraryLoader.readFile(SharedLibraryLoader.java:93)

@BoKa33 BoKa33 changed the title Please we need ARM Support We finally need ARM Support May 25, 2024
@Anuken
Copy link
Owner

Anuken commented May 26, 2024

I don't have any ARM desktop devices, and I'm not interested in setting up VMs to test this. Feel free to make a PR.

@thenameisluk
Copy link

and if someone actually wants to go ahead and try
what exactly is missing/broken?
any pointers?

@k8ieone
Copy link

k8ieone commented Oct 27, 2024

@Anuken I managed to make Arc compile on ARM in GitHub's CI. See the last workflow run desktop artifacts. I can open a pull request if you're interested.

I have a question though, how do the Arc natives get into Mindustry when releasing? I'm not a Java expert, I'm still getting my bearings here. I thought it downloads the CI artifacts from GitHub, but it doesn't look like it does.

@Anuken
Copy link
Owner

Anuken commented Oct 28, 2024

It uses the natives in the natives submodule (for example, the natives for the core submodule are here).

These natives can be automatically copied into the correct folders in the postJni gradle task for the relevant submodule.

If you would like, you can make a PR for the ARM build script changes, and I'll add the natives in a commit after that.


Side note: I know storing binary blobs in git repositories is generally considered 'bad practice', but I found it to be the simplest solution, and I haven't run into any issues relating to repo clone size yet, considering how infrequently these are updated.

@k8ieone
Copy link

k8ieone commented Oct 30, 2024

I'd wait with the PR until someone has tested this with actual hardware rendering, I was only able to try with software rendering on my hardware because Mindustry uses some OpenGL feature that's not implemented on my hardware.

flathub/com.github.Anuken.Mindustry#66 (comment)

@k8ieone
Copy link

k8ieone commented Nov 14, 2024

@Anuken I'm happy to report that we were able to test on real hardware and it works!

I'll open a PR ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants