-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Closed
Copy link
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)platform: appleteam-Rules-JavaIssues for Java rulesIssues for Java rulestype: bug
Description
Description of the problem / feature request:
Currently, when using Darwin ARM64 with a remote JDK for example, the use of ijar
in a Java project seems to fail. e.g.
ERROR: /private/var/tmp/_bazel_paul/4828bcaab66ebffc539d5f0797b06c19/external/io_bazel/third_party/BUILD:453:20: Extracting interface @io_bazel//third_party:guava_checked_in failed: (Exit 1):
ijar failed: error executing command external/remote_java_tools_darwin/java_tools/ijar/ijar external/io_bazel/third_party/guava/failureaccess-1.0.1.jar ... (remaining 3 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox
src/main/tools/process-wrapper-legacy.cc:80: "execvp(external/remote_java_tools_darwin/java_tools/ijar/ijar, ...)":
Bad CPU type in executable
Target //java/com/google/copybara:copybara failed to build
I assume this happens because the prebuilt binaries are only built for Windows, Linux and macOS but there is no separation of Darwin ARM64 or x86_64. Currently only x64 binaries are being built & shipped:
Lines 153 to 157 in e1c404e
for OS in [ | |
"linux", | |
"darwin", | |
"windows", | |
] |
How to reproduce
- Have a M1-based Mac
- Clone the copybara repository from Google: https://github.com/google/copybara
- Run: bazel build //java/com/google/copybara
Note: I have been using--java_runtime_version=remotejdk_11
. Down the line, the Maven runner failed with Java not being found. I have java not setup at all; only the embedded version. I set--action_env=JAVA_HOME=<bazel-output_base>/external/remotejdk11_macos_aarch64
to workaround the Maven issue
What operating system are you running Bazel on?
macOS Big Sur M1 Arm64
What's the output of bazel info release
?
release 5.0.0-pre.20210826.1
(also confirmed with 4.2.0 stable)
jfirebaugh and Vertexwahn
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)platform: appleteam-Rules-JavaIssues for Java rulesIssues for Java rulestype: bug