The leading $ "prompt" is superfluous, prefer indenting the output instead, to make it copy/pasteable without having to delete the $ signs.
The PATH environment for third-party programs should never supersede the system PATH (i.e., /usr/bin and /bin and /usr/local/bin and $HOME/bin), it's a security hole and could break existing shell scripts. Prefer flipping to use export PATH="$PATH:/tmp/graalvm-ce-java17-22.3.0/bin".
GRAALVM_HOME isn't used by the build script.
On the last point, continue as follows:
git clone https://github.com/graalvm/examples.git
cd examples/r_java_embedding/
./build.sh
Expected
The examples build.
Actual
The examples don't build and an error is shown:
./build.sh: line 21: GRAALVM_DIR: GRAALVM_DIR must point to a GraalVM image
Details
Consider updating build.sh in the examples to refer to GRAALVM_HOME. If backwards-compatibility is required, then consider checking both and using GRAALVM_DIR instead, if set.
The README for r_java_embedding states to read the README for the GraalVM examples. Try this:
This suggests running the following commands:
There are three issues:
$
"prompt" is superfluous, prefer indenting the output instead, to make it copy/pasteable without having to delete the$
signs.PATH
environment for third-party programs should never supersede the systemPATH
(i.e., /usr/bin and /bin and /usr/local/bin and $HOME/bin), it's a security hole and could break existing shell scripts. Prefer flipping to useexport PATH="$PATH:/tmp/graalvm-ce-java17-22.3.0/bin"
.GRAALVM_HOME
isn't used by the build script.On the last point, continue as follows:
Expected The examples build.
Actual The examples don't build and an error is shown:
Details Consider updating build.sh in the examples to refer to
GRAALVM_HOME
. If backwards-compatibility is required, then consider checking both and usingGRAALVM_DIR
instead, if set.I ran the following:
The compile succeeded.