0

I'm trying to generate a native image for Android profile using Linux with architecture aarch64 and I installed the GraalVM Version info: 'GraalVM 22.1.0 Java 17 CE' from this page https://github.com/gluonhq/graal/releases/tag/gluon-22.1.0.1-Final because the recommended one https://github.com/gluonhq/graal/releases/tag/gluon-22.1.0.1-Final seems not working for aarch64 but only for x86_64.

when I run: mvn -Pdesktop gluonfx:build -> linked failed and I receive many error library messages like this:

[INFORMATION] [SUB] /usr/bin/ld: eclipse-workspace/my-fx-gluon-application/target/gluonfx/aarch64-linux/gvm/tmp/SVM-1691492601948/com.mygluonfx.sample.main.o:(.data+0x6d0): undefined reference to Java_com_sun_pisces_PiscesRenderer_setRadialGradientImpl' undefined reference to Java_com_sun_pisces_PiscesRenderer_setCompositeRuleImpl'

when I run: mvn -Pandroid gluonfx:build -> compile failed

[Di. Aug. 08 12:03:31 UTC 2023][INFORMATION] We will now compile your code for aarch64-linux-android. This may take some time. java.io.IOException: You specified an android NDK, but it doesn't contain /ndk/toolchains/llvm/prebuilt/linux-aarch64/bin/ld.lld

Actually under /ndk/toolchains/llvm/prebuilt I see only linux-x86_64 folder.

Could you please recommend me which Graalvm and android ndk should I use?

Thanks.

heno
  • 1
  • Can you try creating a symbolic link from `~/.gluon/substrate/Android/ndk/25.2.9519653` (or your actual folder) to `~/.gluon/substrate/Android/ndk-bundle`? Alternatively, you can set `ANDROID_NDK` to point to: `~/.gluon/substrate/Android/ndk/25.2.9519653`. – José Pereda Aug 08 '23 at 14:48
  • @JoséPereda I have set ANDROID_NDK like you said but it doesn't work. Error: You specified an android NDK, but it doesn't contain ~/.gluon/substrate/Android/ndk-bundle/toolchains/llvm/prebuilt/linux-aarch64/bin/ld.lld Actually under~/.gluon/substrate/Android/ndk-bundle/toolchains/llvm/prebuilt I see only a folder with the name linux86_64 – heno Aug 10 '23 at 09:41
  • Are you using the full path (`/home//.gluon/...`) instead of `~`? Also, did you try the symbolic link? – José Pereda Aug 10 '23 at 10:18
  • thank you @JoséPereda. I created a symbolic link : ln -s /home/heno/lib/sdk/ndk/25.2.9519653/ /home/heno/.gluon/substrate/Android/ndk-bundle And configured env variable: export ANDROID_NDK=/home/heno/lib/sdk/ndk/25.2.9519653 ->[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.19:compile (default-cli) on project myfxapplication: Error: You specified an android NDK, but it doesn't contain /home/heno/lib/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-aarch64/bin/ld.lld – heno Aug 10 '23 at 11:54
  • And if I point directly to /home/heno/.gluon/substrate/Android/ndk/25.2.9519653 -> [ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.19:compile (default-cli) on project myfxapplication: Error: You specified an android NDK, but it doesn't contain /home/heno/.gluon/substrate/Android/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-aarch64/bin/ld.lld - – heno Aug 10 '23 at 11:55

0 Answers0