rules_java icon indicating copy to clipboard operation
rules_java copied to clipboard

java_tools should have prebuilt Linux AArch64 binaries

Open timothyg-stripe opened this issue 1 year ago • 5 comments

Currently, only four platforms have prebuilt java_tools binaries (singlejar, ijar, etc.): linux, windows, darwin_x86_64, darwin_arm64.

https://github.com/bazelbuild/rules_java/blob/3c34c81569e72f9984d7bdbcfd93d172ba685e4b/java/repositories.bzl#L27-L51

However, other parts of rules_java supports more platforms, like remotejdk21 which additionally supports Linux AArch64. It would be great if rules_java can distribute prebuilt Linux AArch64 binaries for java_tools, bringing it inline with JDK.

timothyg-stripe avatar Feb 20 '24 23:02 timothyg-stripe

Is this a matter of enabling the build process to produce the binaries and release them or is the development work necessary to implement missing native support?

guw avatar Mar 08 '24 19:03 guw

I'm guessing it's just a matter of enabling the build process. I haven't tried running it on AArch64, but I'd be surprised if there's any incompatibility.

timothyg-stripe avatar Mar 08 '24 19:03 timothyg-stripe

Since GraalVM can't cross-compile native images, at least for full parity this would require having real Linux AArch64 machines in Bazel CI.

cc @meteorcloudy

fmeum avatar Mar 08 '24 19:03 fmeum

As a workaround for now use https://github.com/bazelbuild/rules_java/blob/02df6937cda3f627a47d42391b09b7da0fe3b849/toolchains/default_java_toolchain.bzl#L124 with care

guw avatar Mar 08 '24 19:03 guw

We do have two Linux Arm64 machines on Bazel CI, one in the normal Bazel unstrusted org, another in the trusted org for release builds. You can use them by ubuntu2004_arm64 platform name.

meteorcloudy avatar Mar 11 '24 09:03 meteorcloudy