Open tiainen opened 4 years ago
I am hit by the same issue. Made some changes in Client Maven plugin to use substrate. While executing mvn client:compile
, the execution is halted due to the following issue:
Error: Cannot run program "null/bin/native-image": error=2, No such file or directory
This can be fixed by adding the following in the configuration part of the plugin:
<graalLibsPath>
$HOME/.gluon/substrate/graalvm/graalvm-unknown-java11-19.3.0-dev
</graalLibsPath>
The ultimate goal is that substrate uses an official version of Graal that the user has installed from the GraalVM website.
I think this issue should instead be that substrate must try and find a Graal installation. If it can't, it should fail with a message telling the user:
In order from best to worst scenario:
I see 3. as the least important. Without the plugin specifying anything, this should still work.
We already implemented this flow, so this issue can be closed, @johanvos ?
No, this flow is not implemented at all within substrate. It is currently implemented by the client-maven-plugin.
Downloading GraalVM is a lengthy process, and I still think we don't need to download GraalVM if GRAALVM_HOME
is not set. For instance, it has been defined, but the IDE doesn't have access to the system env vars...
@tiainen do you think we should still try to download at all cost?
It's an almost 400MB download, so I agree we should not do that unconditionally (and give users like me who forgot to set GRAALVM_HOME a chance to set that ;) )
When the
graalvm
system property is not provided, substrate must download a hardcoded version of GraalVM for the host platform. The downloads can be found at https://download2.gluonhq.com/substrate/graalvm/graalvm-unknown-java11-19.3.0-dev-gvm-3-${host}.zip where${host}
should be replaced withlinux-x86_64
ordarwin-amd64
.