google/closure-compiler

Fail to build on Ubuntu

Open

#3,782 创建于 2021年3月11日

在 GitHub 查看
 (3 评论) (1 反应) (0 负责人)Java (7,176 star) (1,197 fork)batch import
P4help wanted

描述

I am trying to build the latest code from github on Ubuntu 20.04, and get the following error.

$ bazelisk build :all
....
INFO: Analyzed 424 targets (0 packages loaded, 0 targets configured).
INFO: Found 424 targets...
ERROR: /home/me/.cache/bazel/_bazel_me/e101812331eb46b601b8487dfb6ffce9/external/bazel_tools/tools/jdk/BUILD:314:1: Action external/bazel_tools/tools/jdk/platformclasspath.jar failed (Exit 1)
Exception in thread "main" java.lang.IllegalArgumentException: external/local_jdk
	at jdk.compiler/com.sun.tools.javac.file.Locations$SystemModulesLocationHandler.update(Locations.java:1853)
	at jdk.compiler/com.sun.tools.javac.file.Locations$SystemModulesLocationHandler.handleOption(Locations.java:1798)
	at jdk.compiler/com.sun.tools.javac.file.Locations.handleOption(Locations.java:2062)
	at jdk.compiler/com.sun.tools.javac.file.BaseFileManager.handleOption(BaseFileManager.java:269)
	at jdk.compiler/com.sun.tools.javac.file.BaseFileManager$2.handleFileManagerOption(BaseFileManager.java:222)
	at jdk.compiler/com.sun.tools.javac.main.Option.process(Option.java:1138)
	at jdk.compiler/com.sun.tools.javac.main.Option.handleOption(Option.java:1086)
	at jdk.compiler/com.sun.tools.javac.file.BaseFileManager.handleOption(BaseFileManager.java:232)
	at jdk.compiler/com.sun.tools.javac.main.Arguments.doProcessArgs(Arguments.java:390)
	at jdk.compiler/com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:347)
	at jdk.compiler/com.sun.tools.javac.main.Arguments.init(Arguments.java:246)
	at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185)
	at DumpPlatformClassPath.dumpJDK9AndNewerBootClassPath(DumpPlatformClassPath.java:106)
	at DumpPlatformClassPath.main(DumpPlatformClassPath.java:67)
INFO: Elapsed time: 1.274s, Critical Path: 0.71s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

Here is my java version:

$ java --version
openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-120.04, mixed mode, sharing)

Any ideas on how to fix this issue?

贡献者指南