Hello, today I was checking out grasp and ran into two small hiccups with the compile script.
escape bash variable during printing
before
$ ./script/compile
Please set
after
$ ./script/compile
Please set $GRAALVM_HOME
isolate native-image requirement because it asks for running things as sudo
This change is a question of taste, so feel free to ask that I omit it.
before
$ ./script/compile
:direct-linking true
grasp.native
Error: Insufficient privileges for administration of the GraalVM installation. You need to become "root" user in order to perform administrative tasks on GraalVM.
NOTE: depending on your operating system, you may need to use OS tools to install or uninstall GraalVM components.
This makes me want to run sudo ./script/compile which feels sketchy.
Instead, one can adapt the script to check if native-image is installed and if not, ask that you install it. This installation should be the only thing that needs sudo.
so after that:
$ script/compile
Please install graal's "native-image" with
"$GRAALVM_HOME/bin/gu" install native-image
$ "$GRAALVM_HOME/bin/gu" install native-image
Error: Insufficient privileges for administration of the GraalVM installation. You need to become "root" user in order to perform administrative tasks on GraalVM.
NOTE: depending on your operating system, you may need to use OS tools to install or uninstall GraalVM components.
$ sudo /usr/lib/jvm/java-8-graalvm/bin/gu install native-image
...
Hello, today I was checking out
grasp
and ran into two small hiccups with the compile script.escape bash variable during printing
before
after
isolate
native-image
requirement because it asks for running things assudo
This change is a question of taste, so feel free to ask that I omit it.
before
This makes me want to run
sudo ./script/compile
which feels sketchy. Instead, one can adapt the script to check ifnative-image
is installed and if not, ask that you install it. This installation should be the only thing that needssudo
.so after that: