client-samples icon indicating copy to clipboard operation
client-samples copied to clipboard

Build for Android on Linux failing in llvm step

Open hallvard opened this issue 4 years ago • 1 comments

I'm trying to get a multi-module maven project to build for android, inside gitpod (a browser-based IDE using a custom docker image). The project is located here: https://github.com/hallvard/timersfx and includes a core and fxui projects, and another project for each platform, e.g. fxui.android. The repo is gitpodified, so can be opened directly in gitpod. The docker file (.gitpod.dockerfile) downloads graalvm using wget, unzips it and installs it using sdkman. When starting up gitpod, it first builds using mvn install (see .gitpod.yml). I then try to build the apk by running mvn client:build inside the fxui.android project the. After some time... the llvm step aborts with

[Sun Mar 22 16:29:43 UTC 2020][INFO] [SUB] Fatal error:org.graalvm.compiler.debug.GraalError: LLVM compilation failed for batch 1 (f7308-f14616). Use -H:LLVMBatchesPerThread=-1 to compile each method individually. (/workspace/timersfx/no.hal.timers/fxui.android/target/client/aarch64-android/gvm/tmp/SVM-1584894351655/llvm/b1o.bc): 137
[Sun Mar 22 16:29:43 UTC 2020][INFO] [SUB] Command: llc -relocation-model=pic --trap-unreachable -march=aarch64 --frame-pointer=all -O2 -filetype=obj -o b1.o b1o.bc
[Sun Mar 22 16:29:43 UTC 2020][INFO] [SUB]      at com.oracle.svm.core.graal.llvm.LLVMNativeImageCodeCache.llvmCompile(LLVMNativeImageCodeCache.java:272)

I don't understand the error and why it suggests to use -H:LLVMBatchesPerThread=-1

hallvard avatar Mar 22 '20 16:03 hallvard

Android doesn't use LLVM now for native compilation. It would be good if you can try again with latest versions (GraalVM 20.2.0 and plugin 0.1.31).

jperedadnr avatar Aug 19 '20 12:08 jperedadnr