-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bazel package #9008
Fix bazel package #9008
Conversation
We have protobuf3 alpha so feel free to bump this to the latest version and use that dependency. |
@wkennington #9011 adds 3.0.0-alpha3.1 but bazel depends on, and vendors the jar for, 3.0.0-alpha3. I don't know if the jar for 3.0.0-alpha3 will work with the native code for 3.0.0-alpha3.1, and the effort required to find out if it does doesn't seem appropriate for the reward. I'd rather wait til the official protobuf-3.0.0 comes out and bump bazel then. |
I updated the commit with an extra piece which removes setting of JAVA_HOME. As I documented in the commit message: Setting JAVA_HOME to ${jdk} broke bazel when used with openjdk, with the
This is because if you set JAVA_HOME, bazel will look for rt.jar in If you leave JAVA_HOME unset, bazel will instead look for rt.jar |
Can we make openjdk the default jdk for bazel? |
We have a passthrough variable which designates the java home inside of the On Tue, Jul 28, 2015, 04:23 Rob Vermaas [email protected] wrote:
|
Sure, I don't see any reason why not. I will do this tonight (BST).
Given it already works for both jdks, what benefit would we get from explicitly setting JAVA_HOME in a wrapper? |
Does it not depend on the jdk being available in the path? What happens if On Tue, Jul 28, 2015, 07:13 Philip Potter [email protected] wrote:
|
Good point. I'll re-add the wrapProgram using ${jdk.home} as well then. |
PR updated to re-wrap with ${jdk.home} and make openjdk the default. |
Bazel 981b7bc1 depends on protobuf-2.5 and won't work with 2.6 (and in bbe84fe3d upgraded straight to protobuf 3.0.0-alpha3); this commit fixes the dependency to depend on protobuf2_5 specifically. The bazel compile.sh needs `which` on the PATH; so this commit adds that as a dependency. Setting JAVA_HOME to ${jdk} broke bazel when used with openjdk, with the message: Problem with java installation: couldn't find/access rt.jar in /nix/store/z9vc0vzyzhnpl5l5inmqdnvdnbxmmmg7-openjdk-8u60b24 This is because if you set JAVA_HOME, bazel will look for rt.jar in $JAVA_HOME/lib and $JAVA_HOME/jre/lib, but the nixpkgs openjdk distribution puts rt.jar in ${jdk}/lib/openjdk/jre/lib for some reason. To fix this, this commit uses the ${jdk.home} passthru value to use the appropriate JAVA_HOME for the given jdk. As bazel now works with openjdk, and openjdk is free while oraclejdk is not, this commit changes the default jdk for bazel to openjdk. Since this package didn't have a listed maintainer, I'm claiming it.
rebased to master to see if this fixes travis. was getting merge conflicts in unrelated files ¯(°_o)/¯ |
Yay no implicit dependency on JDK! |
Looks ok to me. |
bazelbuild/bazel@981b7bc1 depends on protobuf-2.5 and won't work with 2.6 (and in
bazelbuild/bazel@bbe84fe3d upgraded straight to protobuf 3.0.0-alpha3); this commit fixes
the dependency to depend on protobuf2_5 specifically.
The bazel compile.sh needs
which
on the PATH; so this commit adds thatas a dependency.
Since this package didn't have a listed maintainer, I'm claiming it.