Linuxbrew-core: `brew install bazel`: JAVA_HOME is not a path to a working JDK.

Created on 1 Oct 2020  路  6Comments  路  Source: Homebrew/linuxbrew-core

Bug report

Created a pull request to address this: #21161

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [X] ran brew update and can still reproduce the problem?
  • [X] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [X] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?

https://gist.github.com/3e7c1ba8e4a58fde86e8b7cb8d01df27

What you were trying to do (and why)

Trying to install bazel

https://formulae.brew.sh/formula/bazel

What happened (include command output)

Error: cannot install bazel due to incorrect JAVA_HOME

The JAVA_HOME environment variable is being set incorrectly by the bazel formula. The formula uses MacOS style Java directories that do not exist on Linux. See #21161.


Command output

==> Installing bazel
==> ./compile.sh
Last 15 lines from /home/baran/.cache/Homebrew/Logs/bazel/01.compile.sh:
2020-10-01 17:42:14 -0400

./compile.sh

Building Bazel from scratch
ERROR: JAVA_HOME (/home/<...>/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home) is not a path to a working JDK.


What you expected to happen

Should correctly install bazel

Step-by-step reproduction instructions (by running brew install commands)

brew install bazel

stale

Most helpful comment

Okay, I understand. I will try to create a PR that fully passes CI.

All 6 comments

Found this earlier pull request on the same issue #20348.

Is there a reason no one wants to fully fix bazel on linuxbrew? If so, it should probably not be offered as a formula.

It's not that we don't want to fix it. We just don't know how to do it and would use some help with that.

Okay, I understand. I will try to create a PR that fully passes CI.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

still active

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings