-
Notifications
You must be signed in to change notification settings - Fork 4.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
[Build failure] FreeBSD 14-CURRENT/Gentoo Linux amd64 with OpenJDK 17.0 and 18.0 #17103
Comments
Build works with OpenJDK 11.0
Output:
OpenJDK 17.0 and 18.0 may break building bazel so leaving this open. |
I agree this is supposed to work, and that it was supposed to be fixed by 81e368f
Was this tested with 6.0.0, or with 5.3.0? |
That is the version of bazel that ships with FreeBSD's |
Just rechecked the bootstrapped build. Same error with OpenJDK 18:
BTW, bazel continues to work fine with OpenJDK 18 after being built using OpenJDK 11. And attempting to build bazel using
|
This is not specific to FreeBSD as I previously thought. Bazel doesn't appear to build on Gentoo Linux using OpenJDK 17.0 either:
Other info
|
Hi, I am having the same problem with trying to build tensorflow using bazel with open jdk17 OS: Gentoo Linux |
While upgrading testing platforms for Bazel to ubuntu2204 with JDK 17, we are also encountering this problem: |
Switching to Open JDK 11 seems to continue the compilation. |
No problem, but eventually we should also support newer JDK versions. |
Thank you for the reply 😊 |
The version of Bazel used to build (not the version of Bazel that is being built) has to include 81e368f for it to work with JDK 17, so it's expected that 5.3.0 won't work. @meteorcloudy The CI issue you are facing is a different one, but can probably be fixed along the lines of the commit @cushon and I linked, just with |
During bootstrapping Bazel, we are running the Bazel server directly without client: bazel/scripts/bootstrap/bootstrap.sh Line 49 in df728bd
Maybe adding the same flag here could work: bazel/scripts/bootstrap/compile.sh Line 448 in df728bd
|
Can confirm, Open JDK indeed worked and tensorflow was compiled correclty (or so I hope 😅 ) |
New bazel version 6.2.0 compiles correctly with openJDK 17 |
As of today, version 6.2.0 has been included into Gentoo's main tree! |
Signed-off-by: Jason Zaman <[email protected]>
This still appears to be the case for the aarch64 architecture on the latest version of Ubuntu, which no longer ships with OpenJDK 11, and Debian testing making it hard to bootstrap on those platforms/architectures. |
FWIW, I neutered this code to get past the problem on OpenBSD with jdk-17: Index: src/main/java/com/google/devtools/build/lib/actions/ParameterFile.java
--- src/main/java/com/google/devtools/build/lib/actions/ParameterFile.java.orig
+++ src/main/java/com/google/devtools/build/lib/actions/ParameterFile.java
@@ -116,11 +116,6 @@ public class ParameterFile {
private static void writeContent(
OutputStream outputStream, Iterable<String> arguments, Charset charset) throws IOException {
- if (charset.equals(ISO_8859_1)) {
- writeContentLatin1(outputStream, arguments);
- } else if (charset.equals(UTF_8)) {
- writeContentUtf8(outputStream, arguments);
- } else {
// Generic charset support
OutputStreamWriter out = new OutputStreamWriter(outputStream, charset);
for (String line : arguments) {
@@ -128,7 +123,6 @@ public class ParameterFile {
out.write('\n');
}
out.flush();
- }
}
/**
|
This still happens with Bazel 6.5.0 with JDK 17. We recently just updated our OpenJDK and we are getting this error now. Everything was building fine with OpenJDK 11 prior. -Azure Linux |
Note that we are dropping support for building Bazel with JDK < 21: #21446 |
Description of the bug:
Bazel release version 6.0.0 fails to build on FreeBSD 14-CURRENT amd64 with the following error:
System information:
Release file used: https://github.com/bazelbuild/bazel/releases/download/6.0.0/bazel-6.0.0-dist.zip
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
unzip bazel-6.0.0-dist.zip
env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk" ./compile.sh
Which operating system are you running Bazel on?
FreeBSD 14-CURRENT amd64
What is the output of
bazel info release
?release 5.3.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
Possible related information:
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: