samjabrahams / tensorflow-on-raspberry-pi

TensorFlow for Raspberry Pi
Other
2.24k stars 496 forks source link

building bazel results in an error "cannot determine JDK version" #168

Open wonderfuljames74 opened 2 years ago

wonderfuljames74 commented 2 years ago

Describe the Issue

Followed all steps but ./compile.sh results in

jkim@raspberrypi:~/tf/bazel $ sudo ./compile.sh INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel šŸƒ Building Bazel from scratch ERROR: Cannot determine JDK version, please set $JAVA_HOME.\n $JAVAC_VERSION is "javac 11.0.15"

I tried setting it as follows jkim@raspberrypi:~/tf/bazel $ JAVA_HOME="${JAVA_HOME:-$(readlink -f $(which javac) | sed 's_/bin/javac__')}" jkim@raspberrypi:~/tf/bazel $ echo $JAVA_HOME /usr/lib/jvm/java-11-openjdk-armhf But the build still results in the exact same error. Any advice you can offer?

This is by the way on Pi 3B+.

Steps to Reproduce

Hardware/Software Info

Please provide the following information about your Raspberry Pi setup:

Relevant Console Output/Logs