can you cross-compile graalvm apps for other architectures, like ARM?
also, can you use cljfx in a graalvm app?
no, you can't crosscompile
and yes, JavaFX should work, at least, there are examples around. you'll need a java11 graalvm version
ah ok, is there a graalvm compiler for the raspberry pi then if I can't crosscompile for it, or would I have to run under JVM on the pi?
@sogaiu probably can tell you more. He made babashka and clj-kondo working on an Android tablet with the aarch64 graalvm version
i used 2 methods
in one method i built using an android tablet with a proot environment
in the other method i set up qemu to emulate an aarch64 architecture machine
for raspberry pi, some models can do aarch64 iiuc, however, i think raspbian is not aarch64 -- you may need to find a community provided distribution that is aarch64
but rpi is limited in memory -- even the highest end rpi4 only has 4gb iiuc
when i built on the android tablet that had 6gb, the os would kill the app running the proot environment if i tried to use more than 4gb iirc. a 4gb build on the tablet took 20 min for babashka.
some of these details are summarized starting here: https://github.com/borkdude/babashka/issues/241#issuecomment-610688377
ah, also, the qemu builds are much slower. despite the fact that i was able to allocate more cores, more memory, and more disk.
admittedly i was not using the latest qemu (only 4.0.0 -- i think there is now a 5.0.0rc2 or something)
so currently for raspberry pi it seems like graalvm isn't really totally viable, even though it does work? The pis I have are 1GB so would run out of memory almost immediately
which rpi do you have? is it 2, 3, or 4? i have heard those can do aarch64. for building i would guess that 1gb would not be enough -- for intel chips, too low a memory has lead to unsuccessful builds. i do not know if on arm it would just take longer and finish eventually.
currently I have a pi 3
ah, i guess there is some chance it could work. i only have an rpi2 and have not tested.
also, it may depend a bit on what exactly you are going to build.
if you don't mind going the qemu route, at least one can build successfully and transfer the binary to an rpi running an aarch64 distribution. i think it's possible that could work.
fwiw, i transferred the binary i built on android to the qemu environment and that worked.
not sure if it's relevant but according to: https://wiki.qemu.org/Documentation/Platforms/ARM -- there is support for raspi2 emulation for qemu-system-aarch64.
I'll try builds in qemu, it will be slow but I don't really fancy running them on the pi if it's just going to run out of memory
this was the best set of instructions i found for qemu with aarch64: https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/