rocm-arch / tensorflow-rocm

tensorflow-rocm AUR package
17 stars 12 forks source link

bazel 4.0 expects JAVA_HOME variable to be set #22

Open DumbledoreMD opened 3 years ago

DumbledoreMD commented 3 years ago

Hi,

The installation was erroring out in my case with the following message:

FATAL: Could not find system javabase. Ensure JAVA_HOME is set, or javac is on your PATH.

which I fixed by adding this export at the beginning of the build script

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk

This seemed to solve the problem, and everything installed correctly.

It may have been an issue with my system from somewhere else, but according to the wiki the JAVA_HOME variable shouldn't be set globally, so I don't know.

acxz commented 1 year ago

I have been getting similar errors with java as well. My current solution is to source the following lines:

export JAVA_HOME=/usr/lib/jvm/default
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/default/lib/server

I tried to understand the wiki page for Java but still had to use the above workaround.

acxz commented 1 year ago

Patched with https://github.com/rocm-arch/tensorflow-rocm/pull/55 thanks @mpeschel10 !

acxz commented 2 months ago

with an update to bazel, i have reverted the associated PR. As such removing the patch label. Maybe this patch is still needed, but until we can reproduce the issue on the latest version of this PKGBUILD, keeping the patch out.