You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no experience developing on or for Android but one immediate limitation I can think of is that GraalVM does not have a working ARM backend (yet).
Let me clarify a little. The Graal compiler itself has a working ARM backend. However, we don't yet have all the pieces in place in SVM to build a GraalVM binary for ARM.
fwiw, I'm taking a task to impl the SubstrateVM on AArch64. (Sponsored FTE work).
Reacted by Remko Popma, Willem Jiang, Scott Wang, Karl Pietrzak, Wulf, Pavitra Golchha, Mochamad Iqbal Dwi Cahyo and Houssam Elbadissi
Reacted by Suresh, Fritz Otlinghaus, Alfonso² Peterssen, timothy, Christopher Penrose, Roman Liutikov, Erik Kaplun, up-to-you, Anton Smirnov, Pavitra Golchha and 3 more
Hi @bobmcwhirter,
I have some changes pending towards getting Substrate for AArch64. I'm trying to integrate them in the next days.
Then we can discuss the areas where we want to go forward with/what are the missing pieces.
General question since this issue is asking for Android? Are you targeting Android or Linux?
Great thanks.
I’m eager to continue working toward arm so whatever you can share or think
would be a good way to collaborate would be great.
I have signed the Oracle CLA already (via Red Hat).
My big aarch64 hardware should arrive soon to supplant my RPi.
I’d also like to support cross-compilation to aarch64 from x86 platforms at
some point.
Bob
Yes, crosscompilation is a thing here since the native image builder requires reasonable amount of memory for real world programs.
But for the first go we really want to get a simple hello world program running.
I am currently working to prepare the branch for sharing. I'll keep you updated later today.
@olpaw -- Yah, I'm used to building from vm on my mac. Now I've moved to the substratevm dir and building, with verbose, to find why g++ is unhappy. I've having to add ignore warnings are errors due to deprecations.
@sanzinger I managed to get ninja installed, but I'm also running Fedora29 on this machine, instead of the Suse or whatever softiron ships on it.
Also, I'm cherry-picking/copy-pasting from your bits against master#HEAD so that hopefully there's less divergence than from October's commits of yours, and so I understand all the moving parts and deltas.
@bobmcwhirter and @sanzinger : I was able to build the repo on docker (aarch64).But build a native image using mx native-image eventually failed :(.
I guess graal is using llvm and gcc to build the native image. Cant we just pass the march argument to the compiler specifying the target processor architecture?
I updated my branch mentioned above with the latest state. It is currently failing at:
fatal error: com.oracle.svm.core.util.VMError$HostedError: currently only implemented on AMD64
at com.oracle.svm.core.util.VMError.guarantee(VMError.java:85)
at com.oracle.svm.jni.hosted.JNICallTrampolineMethod.lambda$createCustomCompileFunction$1(JNICallTrampolineMethod.java:111)
at com.oracle.svm.hosted.code.CompileQueue.doCompile(CompileQueue.java:883)
at com.oracle.svm.hosted.code.CompileQueue$CompileTask.run(CompileQueue.java:259)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:174)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
I am going to continue next week on this. @bobmcwhirter do you have any progress?
We should move the discussion over to an explicit PR which deals with Substrate on AArch64 (PR #910).
This issue was opened to ask for Substrate Support on Android. Current state for Substrate on AArch64 is, that we first want to support Linux on AArch64. Support for Android from us is not decided yet.
We have been running on Android with both the LLVM and AArch64 backends. Build tools for deploying apps to iOS and Android are just around the corner. Stay tuned...
Reacted by tberezhnoi, 4iconfont, Scott Wang, Sergey Dikanskiy, Tarun Elankath, Karl Pietrzak, Christian Meredith, Vitaly Lavrov, Frank Lemanschik, Eduardo Pool and 9 more
Reacted by Andriy Plokhotnyuk, François Farquet, Divyansh Prakash, Thiago Moura, ChenYong, Jayesh Bhoot, gzmask, Timo Kramer, Peter, tberezhnoi and 9 more
Reacted by Andriy Plokhotnyuk, tberezhnoi, Will, Andrei Verdes, Navdeep Singh, Shibasis Patnaik, Pavitra Golchha and Houssam Elbadissi
We support both Android and iOS through the tool called Substrate. We are already running quite big projects on the devices.
A good example is GraalREPL. You can find many examples here.
Reacted by Pankaj Doharey, Divyansh Prakash, Stefan Merettig, btwiuse, cheroliv, Maciej Gorywoda, Shibasis Patnaik, Sakib Hadžiavdić, Pavitra Golchha, Hadi and 5 more
Reacted by Divyansh Prakash, attilanyers, berserkore, cheroliv, Shibasis Patnaik, Pavitra Golchha, Hadi and Houssam Elbadissi
Activity
dougxc commentedon Aug 24, 2018
I have no experience developing on or for Android but one immediate limitation I can think of is that GraalVM does not have a working ARM backend (yet).
dougxc commentedon Aug 25, 2018
Let me clarify a little. The Graal compiler itself has a working ARM backend. However, we don't yet have all the pieces in place in SVM to build a GraalVM binary for ARM.
sanzinger commentedon Aug 27, 2018
For reference, similar discussion was done in #373.
bobmcwhirter commentedon Dec 2, 2018
fwiw, I'm taking a task to impl the SubstrateVM on AArch64. (Sponsored FTE work).
dougxc commentedon Dec 3, 2018
Hi @bobmcwhirter , that's great to hear! @sanzinger is also working on this so it would be good to coordinate to avoid duplicated work.
sanzinger commentedon Dec 3, 2018
Hi @bobmcwhirter,
I have some changes pending towards getting Substrate for AArch64. I'm trying to integrate them in the next days.
Then we can discuss the areas where we want to go forward with/what are the missing pieces.
General question since this issue is asking for Android? Are you targeting Android or Linux?
bobmcwhirter commentedon Dec 3, 2018
sanzinger commentedon Dec 3, 2018
Hi, thank you for sharing. These things are already there on our internal branch. Let me check, if I can share the branch with you.
bobmcwhirter commentedon Dec 3, 2018
sanzinger commentedon Dec 3, 2018
Yes, crosscompilation is a thing here since the native image builder requires reasonable amount of memory for real world programs.
But for the first go we really want to get a simple hello world program running.
I am currently working to prepare the branch for sharing. I'll keep you updated later today.
sanzinger commentedon Dec 3, 2018
I have pushed the branch with the current state: https://github.com/sanzinger/graal/tree/svm/aarch64
I'll provide some instructions to it tomorrow.
bobmcwhirter commentedon Dec 4, 2018
9 remaining items
bobmcwhirter commentedon Jan 2, 2019
@olpaw -- Yah, I'm used to building from
vmon my mac. Now I've moved to thesubstratevmdir and building, with verbose, to find whyg++is unhappy. I've having to add ignore warnings are errors due to deprecations.@sanzinger I managed to get ninja installed, but I'm also running Fedora29 on this machine, instead of the Suse or whatever softiron ships on it.
Also, I'm cherry-picking/copy-pasting from your bits against
master#HEADso that hopefully there's less divergence than from October's commits of yours, and so I understand all the moving parts and deltas.Prashanth-BC commentedon Jan 7, 2019
@bobmcwhirter and @sanzinger : I was able to build the repo on docker (aarch64).But build a native image using mx native-image eventually failed :(.
I guess graal is using llvm and gcc to build the native image. Cant we just pass the march argument to the compiler specifying the target processor architecture?
sanzinger commentedon Jan 11, 2019
I just compiled ninja properly on AArch64.
I updated my branch mentioned above with the latest state. It is currently failing at:
I am going to continue next week on this.
@bobmcwhirter do you have any progress?
sanzinger commentedon Jan 14, 2019
We should move the discussion over to an explicit PR which deals with Substrate on AArch64 (PR #910).
This issue was opened to ask for Substrate Support on Android. Current state for Substrate on AArch64 is, that we first want to support Linux on AArch64. Support for Android from us is not decided yet.
I hope this answers the original question.
divs1210 commentedon Sep 18, 2019
Looks like #910 has been merged. We seem to be getting closer!
vjovanov commentedon Oct 18, 2019
We have been running on Android with both the LLVM and AArch64 backends. Build tools for deploying apps to iOS and Android are just around the corner. Stay tuned...
metacritical commentedon Jun 12, 2020
Any More updates on this?
vjovanov commentedon Jun 14, 2020
We support both Android and iOS through the tool called Substrate. We are already running quite big projects on the devices.
A good example is GraalREPL. You can find many examples here.
metacritical commentedon Jun 15, 2020
This is plenty helpful, Thankyou.
insinfo commentedon May 2, 2022
is it already possible to compile a native shared library written in java for Android with GraalVM?
benayat commentedon Feb 20, 2023
@vjovanov can any of this examples help me create a native executable for running spring boot backend on termux/android?
vjovanov commentedon Feb 21, 2023
I would start at
https://github.com/gluonhq/gluon-samples
and also ask further questions there.