-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Building Bazel with JAVA_HOME set to OpenJDK 9 fails. #4709
Comments
That should probably be using Also, those versions of the Checker Framework libraries are out of date. They should be updated to 2.2.2 to match the current version of Error Prone. And I'm not sure why they're being built from source? If they were prebuilts we wouldn't need the neverlink javac dep at all. I recommend updating them to these versions: |
+1. I have never understood why Bazel building Checker Framework from source? |
I fixed Checker Framework issue, but Bazel build with Java 9 is still broken: [1]. |
Change-Id: I2eb1f6d5fffdbe30ad1d25094ebe80d8204cb184 Fixes: bazelbuild#4709.
Fixes: bazelbuild#3410, bazelbuild#4709. To build bazel with Java 9 issue: $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk build \ --javacopt='--release 9' \ --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \ src:bazel This still doesn't work: [1]. * [1] http://paste.openstack.org/show/694736 Change-Id: Ic529e222344dc894e9d6b853a9551c7a19a52697
I added another CL to pass
|
Fixes: bazelbuild#3410, bazelbuild#4709. To build bazel with Java 9 issue: $ bazel --host_javabase=/usr/lib64/jvm/java-9-openjdk build \ --javacopt='--release 9' \ --java_toolchain=@bazel_tools//tools/jdk:toolchain_jdk9 \ src:bazel This still doesn't work due to gRpc dependency on Java 8 specific @javax.annotation.Generated annotation: [1]. [1] grpc/grpc-java#3633 Change-Id: Ic529e222344dc894e9d6b853a9551c7a19a52697
@cushon I added a workaround to use Java 9 Trying to use Bazel built with Java 9, I'm seeing something strange: the transitive dependency is not correctly detected, and build is aborted. SUT is my bazel_printy repository:
But, the Any clue, what is going on here? If I build Bazel from the same tree with Java 8, basically, most recent master with the PR linked to this issue, but revert gRpc change as
|
Fixes: bazelbuild#4709. This change stops building checker framework from the source and consumes the artifacts from Central. As the consequence, the sources are removed from the Bazel tree and we discontinue packaging the sources in Bazel source artifact. LGPL sources are still have to be included in embeded_tools archive. The source jars are included in embedded_tools archive now: $ unzip -t bazel-genfiles/src/embedded_tools.zip|grep checker_framework testing: third_party/checker_framework_dataflow/dataflow-2.2.2-sources.jar testing: third_party/checker_framework_javacutil/javacutil-2.2.2-sources.jar
Fixes: bazelbuild#4709. This change stops building checker framework from the source and consumes the artifacts from Central. As the consequence, the sources are removed from the Bazel tree and we discontinue packaging the sources in Bazel source artifact. LGPL sources are still have to be included in embeded_tools archive. The source jars are included in embedded_tools archive now: $ unzip -t bazel-genfiles/src/embedded_tools.zip|grep checker_framework testing: third_party/checker_framework_dataflow/dataflow-2.2.2-sources.jar testing: third_party/checker_framework_javacutil/javacutil-2.2.2-sources.jar
Fixes: bazelbuild#4709. This change stops building checker framework from the source and consumes the artifacts from Central. As the consequence, the sources are removed from the Bazel tree and we discontinue packaging the sources in Bazel source artifact. GPL v2 with Classpath exception sources have to be still included in third_party:gpl-srcs rule. The source jars are included in this rule, that is used in embeded_tools archive: $ unzip -t bazel-genfiles/src/embedded_tools.zip|grep checker_framework testing: third_party/checker_framework_dataflow/dataflow-2.2.2-sources.jar testing: third_party/checker_framework_javacutil/javacutil-2.2.2-sources.jar
The checker framework changes happened in 88a0072. |
I'm trying to build Bazel using Bazel itself when JAVA_HOME is set to the official OpenJDK 9 binaries downloaded from http://jdk.java.net/9/.
I get this error:
It seems like
langtools-neverlink
is only used by//third_party/checker_framework_dataflow
and//third_party/checker_framework_javacutil
, both of which are only depended on by errorprone.@cushon How would I fix this? Is there a replacement for
tools.jar
in JDK9 thatchecker_framework_dataflow
should use?The text was updated successfully, but these errors were encountered: