Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
Nico 2020-04-12T11:21:06.047500Z

can you cross-compile graalvm apps for other architectures, like ARM?

Nico 2020-04-12T11:22:26.048Z

also, can you use cljfx in a graalvm app?

borkdude 2020-04-12T11:24:54.048200Z

no, you can't crosscompile

borkdude 2020-04-12T11:25:23.048800Z

and yes, JavaFX should work, at least, there are examples around. you'll need a java11 graalvm version

Nico 2020-04-12T11:35:46.049600Z

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?

borkdude 2020-04-12T11:42:40.050300Z

@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:


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)

Nico 2020-04-12T11:51:27.056600Z


Nico 2020-04-12T11:52:14.057700Z

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.

Nico 2020-04-12T11:54:25.059200Z

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: -- there is support for raspi2 emulation for qemu-system-aarch64.

Nico 2020-04-12T11:58:46.062700Z




Nico 2020-04-12T12:00:38.063800Z

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:

Nico 2020-04-12T12:41:26.065200Z

thank you!