-
Notifications
You must be signed in to change notification settings - Fork 23
Compiling for Android fails on ubuntu 18.10 #35
Comments
Your GraalVM is too old. CustomLD was added after the 19.3 freeze. It is in the tip now though. |
you can get an unsupported build here: https://download2.gluonhq.com/subtrate/graalvm/graalvm-svm-linux-20.0.0-ea+20.zip |
Thanks a lot!
Can I also use an older client-samples version that would work with 19.3?
What do you mean with "tip" - the readme?
Unfortunately the link is not working for me (404). And if it works: where do I copy it? Somewhere into graalvm-ce-java11-19.3.0/lib/svm/? |
I was able to build graalvm from sources via this script without errors. I hope these are the correct and sufficient steps - I just copied them as I wasn't able to get it working with a different or official procedure. Then I did:
but the mvn command still fails. Do I need a specific commit when compiling the graalvm repo or a specific NDK version? The error is:
|
With client.plugin.version=0.1.7 I got a bit progress:
Probably related to the recent changes: gluonhq/substrate#168, gluonhq/substrate#169, gluonhq/substrate#170 UpdateWith client.plugin.version=0.1.9 and:
I get
which is a bit strange as oracle/graal#1890 is already merged. Will try to build graal from scratch again. Update: Still does not work. Is this due to the patched substratevm from gluon? |
Error: ImageSingletons do not contain key org.graalvm.home.HomeFinder |
I have the same issue with the latest GraalVM head on iOS |
I created an issue in GraalVM: oracle/graal#2033 |
This one is working for me: The link given in the original reply contains a typo in "substrate" (the "s" between "b" and "t" has been missing). |
You're right, sorry about the typo! |
Cool! Thanks a lot to both of you - one step further! So, instead of
I'm using Now I tried the following but I got a segmentation fault:
Or is this the wrong way to verify that it works on Android? And "aarch64" requires an ARM based phone, right? I would like to try another phone: how do I create binaries for another architectures? It seems there is also arch-arm,arch-x86 and arch-x86_64 supported by my installed NDK. |
@johanvos Thank you for all your work! I don't know if it is really realted to this issue as it is about "Ubuntu 18.10" and perhaps there is already a mixture of different problems. I tried to compile the simple project created by the "client-archetype-mobile" for android. I used:
What needs to be changed to succeed or to get better diagnostic information? |
@johanvos Can you please give me / us some instructions how to get a build running for the target type "android"? I try to provide you with all the information I can give you, for example what I did today: Setup archetypes
Setup project
Setup environment
Build for Android
|
That looks like one of the bitcode files can't be compiled. The error is unfortunately not shown. I'll file an issue with GraalVM that the error is printed in case it occurs. |
As it is about cross compiling I checked the command line that is executed:
If I call the llc used in that command camnually and point to the "b5o.bc" file I get:
llc looks for the But there is a
So, let's ignore the wrong version at the moment and point 5 to 6:
and build again... Now it seems like it builds forever 😉 As this is a pre-build GraalVM on another machine, such so-version mismatches can be occur (AFAIK) all the time. |
the llc and required toolchain are part of the newer Graal distributions, but at this moment a patched llc is still required for x-compiling to iOS. Upcoming Graal distributions will probably have the required llc. This doesn't fix the lib version mismatch issue, but it is very good to know about it, so it can be tackled (either in Gluon Substrate or in GraalVM). |
The compilation fails with "Error: Could not find option 'CustomLD'. Did you mean one of these: CustomLLC". Steps I did:
It seems the flag here is now unknown. Similar to #21.
Do I need an older NDK? (Update: tried various different NDK versions, but same problem)
The text was updated successfully, but these errors were encountered: