You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On most recent Bazel master (7574d84) the most recent Gerrit master (b0e82956b1e8b4b04d187c26ec6e055beeaedb82) cannot be built any more (it worked already) with JDK9:
$ java --version
openjdk 9.0.4
OpenJDK Runtime Environment (build 9.0.4+12-suse-4.2-x8664)
OpenJDK 64-Bit Server VM (build 9.0.4+12-suse-4.2-x8664, mixed mode)
$ b9 build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 --java_toolchain=@bazel_tools//tools/jdk:toolchain_java9 :release
DEBUG: /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/bazel_skylib/lib/versions.bzl:98:7:
Current Bazel is not a release version, cannot check for compatibility.
DEBUG: /home/davido/.cache/bazel/_bazel_davido/27a001f4182820ef315d8d2d4f1edafe/external/bazel_skylib/lib/versions.bzl:99:7: Make sure that you are running at least Bazel 0.14.0.
INFO: Analysed target //:release (0 packages loaded).
INFO: Found 1 target...
ERROR: /home/davido/projects/gerrit/java/com/google/gerrit/launcher/BUILD:3:1: Building java/com/google/gerrit/launcher/liblauncher-class.jar (1 source file) failed (Exit 1)
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Target //:release failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.064s, Critical Path: 0.16s
INFO: 5 processes: 4 remote cache hit, 1 linux-sandbox.
FAILED: Build did NOT complete successfully
Activity
davido commentedon Aug 15, 2018
It worth noting, that upcoming Bazel 0.16.1 release (tested with rc2 from https://releases.bazel.build/0.16.1/rc2/index.html) doesn't seem to be affected: [1]. Only Bazel 0.17.0rc1 and master are affected.
[1] http://paste.openstack.org/show/728089
cushon commentedon Aug 15, 2018
cc @buchgr
The regression was from updating the embedded JDK to 10 in 4c9149d. The javac we use doesn't support
--releasewhen running on JDK 10 yet.Setting
--server_javabase=to JDK 9 works around the problem.The fix is to update to the JDK 10 javac, but we can't do that until we're ready to drop support for JDK 8
--host_javabases in the default toolchain.