-
Notifications
You must be signed in to change notification settings - Fork 7
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
Doesn't work on arm64 despite having package for it #66
Comments
Huh, I'm not too sure, but I thought it was java / libGDX and thus crossplatform. Is libGDX not on arm...? |
It is unfortunate, but the developer is completely uninterested in bringing ARM support. There were a lot of issues open in the upstream repo about ARM support. All of them end like this one Anuken/Mindustry#4854 |
The game uses a game framework based on libGDX called arc. Anuken/Arc#167 This is the real blocker. |
Mindustry does not support arm[0]. This enables only the build for x86_64[1]. Fixes flathub#66. [0]: Anuken/Arc#167 [1]: https://docs.flathub.org/docs/for-app-authors/maintenance#limiting-the-set-of-architectures-to-build-on
Ok, thanks for collecting the links/infos. Submitted a PR to fix this. If aarch64 will be supported in the future, a new issue can be opened. (btw, the issue may just go away if we can someday build it from source. It is not clear whether there are actual build issues when building for aarch64, there was an attempt, but I abandoned it because gradle is a PITA to generate flatpak modules from.) |
Building from source is preferred for Flatpak afaik, but I get it. IIRC I tried building the game on bare metal on x86_64 at some point but eventually gave up as well. |
I couldn't let this go so I tried getting an ARM build going today. My Arc fork with the necessary changes is here: https://github.com/k8ieone/Arc I also found https://github.com/flatpak/flatpak-builder-tools/tree/master/gradle which means we should be able to build the Flatpak from source. So far I was able to generate resources for both Arc and Mindustry. Unfortunately I wasn't able to generate it from the last release tag, only from the master branch. But at least it's a start. I'll try to move this along and modify the Flatpak manifest to build from source hopefully later this week. You can find the generated resources in my fork: https://github.com/k8ieone/com.github.Anuken.Mindustry Unfortunately I wasn't able to test the built jar file on my hardware. All my ARM systems run Alpine which is not supported so I won't be able to try this until I'm able to run it in Flatpak to avoid the musl incompatibility. |
Wow, nice job getting Arc to compile on aarch64 too! Did you get it to work outside of Flatpak? If yes, then it would be nice if you submitted the PR to Arc. A few while ago I already tried building the Flatpak from source (#39). The gradle module from flatpak-builder-tools was still a PR then and I used a modified script instead (instead of parsing the gradle stdio output, I tried listing the gradle cache after a build). However Mindustry uses (used?) some weird dynamic dependency injection and the build tool didn't catch on. I'd recommend to not get your hopes high before you can test the flatpak. |
Damn, thanks for letting me know. I'll still probably try it put while keeping in mind that it could end up not working. About Arc, I did some more thinking on this and in its current state it needs to be built on ARM because I had issues getting SDL2 cross-compiled. If we're able to solve this one little problem, I can see this getting accepted as a PR. |
I've never not had isssues with cross-compiling :).
Hmm... Well GitHub has ARM-runners, so the CI would (should) actually work if it works on your machine. Maybe try running the GitHub actions on your own account and check if the generated jar is working on arm. If this works, it is possible that the PR can still be accepted, even though x-compiling doesn't work. |
Good point, I'll try that out. |
@TobTobXX Do you have a device that is a bit more modern where you could test it? The only device where I can easily try this is a Pinephone. I got I had to set GitHub didn't allow uploading it here, so here's a link to a file share. |
Jumping through a whole bunch of hoops, I was eventually able to launch the game inside an ARM Docker container running on my x86 PC as well. Screencast.From.2024-10-27.20-11-13.webmOf course it was extremely slow. Not only was it using software rendering (the ARM build of Mesa didn't have support for Iris graphics, because why would it xd) but it was going through QEMU so the emulation overhead killed it even more. But it works. |
Wait... you can run Docker apps with a GUI??? But well done! Unfortunately I don't have any ARM devices. @micr0-dev opened the issue, so I suppose they have an arm-device. @micr0-dev if you could help k8ieone test this, that'd be nice. |
yeah I do! I have an m2 macbook air running asahi linux fedora, i could test it! I have both hyprland and gnome installed on it |
@TobTobXX It's janky, but you can 😄 @micr0-dev Awesome! I feel like I should warn you about installing random packages from the internet 😅 You can check the Flatpak's permissions by opening it in GNOME Software. I left them the same as the currently published Flatpak and those seem pretty tight to me. Pinky promise it won't do anything evil 😉 |
@micr0-dev Oh yea, it's built from the last git commit, so it could break your save. But I haven't tested that. |
I have hardware rendering support on the Raspberry Pi 4 if that helps. @k8ieone |
No way, that's awesome! Seeing it actually running without any hacks. I'll report back to the PR that it's been successfully tested. Did you have to tweak anything to get it running? How is the performance? |
@k8ieone I was not expecting high performance in the first place... but turning off display effects will have it average around ~50-80 fps in multiple different maps I tested. I will note I dedicated a bit more vram (256mb total now) to the Pi 4's Broadcom VideoCore VI, but otherwise nothing else! I can't wait for the Arc PR. |
That's awesome! Thanks for testing it out! |
any time! |
PR is open 🚀 Anuken/Arc#181 |
@k8ieone you absolute legend, thanks a lot for working on it! For the record, I have a Xiaomi Redmi 5 Plus running postmarketOS, so I'll be able to test Mindustry on my phone once the arm64 package is working and submitted as a PR :) |
My PineTab 2 just arrived and I was able to properly test this myself. I was really excited to see the game launch and run smoothly on an ARM device. That being said, Mindustry doesn't expect touch input on Linux devices. Navigating around menus works as expected but touch gestures like pinch zooming are ignored. Dragging in game is the same as clicking and holding with a mouse so there's no way to move around. The game tells you to use WASD to move around 😄 So currently the game is unplayable without a mouse and keyboard. A gamepad sounds like the most portable option but I'm not sure if those are supported by the game, I haven't tested that yet. I'm thinking even when the PR gets merged, we'll have to wait until the next release before the ARM natives get included. We could "patch" the jar file here on Flathub to include them, but I don't know if that's going to work. The current Mindustry wasn't built against Arc I'll try to come up with a PR that includes the ARM natives in the latest Mindustry release. When the next version comes out we can remove this workaround. |
Quick update: I tried using my Arc build with the latest Mindustry release and it doesn't work. I guess we'll have to wait until the next release. |
try with Vars.mobile=true or Vars.testMobile=true |
Arm package should probably be removed until the project actually supports it
The text was updated successfully, but these errors were encountered: