Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Homebrew bazel doesn't have embedded jdk #32

Closed
hsestupin opened this issue Dec 4, 2018 · 4 comments
Closed

Homebrew bazel doesn't have embedded jdk #32

hsestupin opened this issue Dec 4, 2018 · 4 comments

Comments

@hsestupin
Copy link

hsestupin commented Dec 4, 2018

I installed bazel from scratch via brew following the steps described here - https://blog.bazel.build/2018/08/22/bazel-homebrew.html

In our bazelrc file we don't have any --javabase or --host_javabase flags. But when I run bazel build //... -s I see the error Unrecognized VM option 'CompactStrings' - exactly like described in bazelbuild/bazel#5726

When I'm trying to get the version of the embedded jdk by running:

/private/var/tmp/_bazel_{user_name}/e439d9fcbe1875cf9922b11e6b2acfbc/execroot/__main__/external/embedded_jdk/bin/java -version

I'm getting this:

java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

This is my local jdk available through which javac.

But AFAIU embedded jdk should be jdk9 and it has to be included into the bazel distribution. But it seems that something went wrong. Some keys of bazel info are the following:

java-home: /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre

release: release 0.20.0-homebrew
@kurtisnelson
Copy link

I'm now running into this issue after upgrading from 0.18, it is now pointing at the OS's Java8.

@kurtisnelson
Copy link

It seems tap pinning is not working, but when I used brew install bazelbuild/tap/bazel it fixed the problem.

@hsestupin
Copy link
Author

That seems to be true. I've also figured out that brew install bazelbuild/tap/bazel works not so far ago.

@philwo
Copy link
Member

philwo commented Feb 10, 2020

I think tap pinning was just buggy in Homebrew and has been removed recently:

philwo@philwo-macbookpro2:~ $ brew tap-pin  
Error: Calling brew tap-pin user/tap is disabled! Use fully-scoped user/tap/formula naming instead.

We've updated the README.md accordingly, so hopefully this is no longer an issue. :)

@philwo philwo closed this as completed Feb 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants