graalvm / fastr-examples

Other
60 stars 15 forks source link

[Documentation] GRAALVM_HOME vs. GRAALVM_DIR #10

Open ghost opened 1 year ago

ghost commented 1 year ago

The README for r_java_embedding states to read the README for the GraalVM examples. Try this:

cd /tmp
bash <(curl -sL https://get.graalvm.org/jdk)

This suggests running the following commands:

$ export GRAALVM_HOME="/tmp/graalvm-ce-java17-22.3.0"
$ export PATH="/tmp/graalvm-ce-java17-22.3.0/bin:$PATH"
$ export JAVA_HOME="/tmp/graalvm-ce-java17-22.3.0"

There are three issues:

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.

I ran the following:

export GRAALVM_DIR="${GRAALVM_HOME}"
./build.sh

The compile succeeded.