graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
sb 2020-04-19T05:40:50.152400Z

I would like to use lib-python and repl via graalvm on aarch64. If that isn’t possible I use Golang or C++ but hopefully that is possible solve.

sb 2020-04-19T05:43:27.153800Z

In the past I used not the official way compile things via substratevm.. but changed lot of things..

2020-04-19T07:15:12.156200Z

to clarify, i had success with producing aarch64 binaries of clj-kondo and bb. the compilation succeeded on android via proot, but it also worked in a qemu aarch64 environment (-M virt). qemu building takes much longer -- in the case of bb it took 2 hours in qemu vs 20 mins on android.

2020-04-19T07:16:04.157100Z

iiuc, rpi 3 should be possible as well with an appropriate distribution, but iiuc memory is limited there.

2020-04-19T07:16:31.157500Z

may be that should be "should be possible to run binaries" -- building may be another story.

sb 2020-04-19T08:07:04.161300Z

@sogaiu did you use java11? Yesterday for me on Ubuntu doesn’t work with official graalvm image :/ - before this I successfully compiled with substratevm/old way.

sb 2020-04-19T08:08:14.162800Z

I added extra 4gb swap and I have 4gb. But didn’t finish within 3-4 hours. I try again..

sb 2020-04-19T08:08:25.163200Z

Maybe qemu better idea..

2020-04-19T08:10:57.164400Z

not quite sure i follow -- what i used was: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-19.3.1/graalvm-ce-java11-linux-aarch64-19.3.1.tar.gz (so that's the aarch64 build for linux that is tied to java11)

2020-04-19T08:11:23.164800Z

for qemu, the following tutorial was very helpful: https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/

2020-04-19T08:12:08.165500Z

to get bb to work some changes were necessary -- those should be summarized here: https://github.com/borkdude/babashka/issues/241#issuecomment-610908212

🍻 1
2020-04-19T08:13:53.166400Z

assuming the tutorial is followed, my qemu invocation looked like this:

qemu-system-aarch64 \
  -smp 4 \
  -M virt \
  -m 8192 \
  -cpu cortex-a53 \
  -kernel vmlinuz-4.9.0-12-arm64 \
  -initrd initrd.img-4.9.0-12-arm64 \
  -append 'root=/dev/vda3' \
  -drive if=none,file=hda.raw,id=hd \
  -device virtio-blk-pci,drive=hd \
  -netdev user,id=mynet \
  -device virtio-net-pci,netdev=mynet \
  -nographic

πŸ‘ 1
2020-04-19T08:14:20.166900Z

the vda3 part will obviously depend on how partitioning is done -- my value is different from what was in the tutorial

2020-04-19T08:14:49.167500Z

note that i allocated 8gb of memory

πŸ‘ 1
2020-04-19T08:14:58.167700Z

...and 4 cores

2020-04-19T08:16:00.168200Z

changing the -Xmx value in bb's build script seemed to help too

sb 2020-04-19T08:26:46.168800Z

Thanks!! I check all things and redo now!! πŸ‘

2020-04-19T08:43:24.169300Z

good luck πŸ™‚

sb 2020-04-19T18:51:58.169800Z

@sogaiu works!! πŸŽ‰

πŸ‘ 1
sb 2020-04-19T18:52:15.170300Z

sbThat was slow really on jetson nano