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
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on project managed-ledger: An error occurred while invoking protoc: Error while executing process.: Cannot run program "/Users/chenzili/Workspace/pulsar/managed-ledger/target/protoc-plugins/protoc-3.19.2-osx-aarch_64.exe": error=86, Bad CPU type in executable -> [Help 1]
To Reproduce
On a macOS machine with properties:
MacBook Pro (16-inch, 2021)
Chip Apple M1 Pro
Clone pulsar code and execute mvn clean install -DskipTests
Expected behavior
Successfully compiled.
Additional context
protoc 3.19.2 dists osx-aarch_64 binary as an alias to the osx-x86_64 one.
It seems barely bump the protoc version doesn't fix the issue entirely. Meet:
[ERROR] PROTOC FAILED: /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/target/protoc-plugins/protoc-gen-grpc-java-1.45.1-osx-aarch_64.exe: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.
[ERROR] /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/src/main/proto/Request.proto [0:0]: /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/target/protoc-plugins/protoc-gen-grpc-java-1.45.1-osx-aarch_64.exe: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.
[ERROR] /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/src/main/proto/Function.proto [0:0]: /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/target/protoc-plugins/protoc-gen-grpc-java-1.45.1-osx-aarch_64.exe: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.
[ERROR] /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/src/main/proto/InstanceCommunication.proto [0:0]: /Users/chenzili/Workspace/pulsar/pulsar-functions/proto/target/protoc-plugins/protoc-gen-grpc-java-1.45.1-osx-aarch_64.exe: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--grpc-java_out: protoc-gen-grpc-java: Plugin failed with status code 1.
Install Rosetta (see google/protobuf-gradle-plugin#543 (comment)) workaround the issue. However, we may bump version of protoc and grpc-java to get native osx-aarch_64 binary. protoc provides one at the moment while grpc-java plugin doesn't.
I'd like to keep it open since we need some workaround instead of a native solution. This issue may remind me to see whether upstream provides a real osx-aarch_64 protoc-gen-grpc-java binary.
After consideration, I tend to close the issue as I cannot uninstall or disable Rosetta and reproduce the issue anymore.
When grpc/grpc-java#7690 gets resolved we may directly try to upgrade the dep version. Or someone who has an M1 without Rosetta environment can verify then.
Activity
tisonkun commentedon Jul 18, 2022
It seems barely bump the protoc version doesn't fix the issue entirely. Meet:
tisonkun commentedon Jul 18, 2022
Install Rosetta (see google/protobuf-gradle-plugin#543 (comment)) workaround the issue. However, we may bump version of protoc and grpc-java to get native osx-aarch_64 binary. protoc provides one at the moment while grpc-java plugin doesn't.
tisonkun commentedon Jul 18, 2022
I'd like to keep it open since we need some workaround instead of a native solution. This issue may remind me to see whether upstream provides a real osx-aarch_64 protoc-gen-grpc-java binary.
Upstream issue: grpc/grpc-java#7690
leizhiyuan commentedon Aug 8, 2022
now ,master branch can build in m1 (works for me)
tisonkun commentedon Aug 8, 2022
@leizhiyuan do you install Rosetta 2.0?
leizhiyuan commentedon Aug 8, 2022
yes..
tisonkun commentedon Aug 8, 2022
After consideration, I tend to close the issue as I cannot uninstall or disable Rosetta and reproduce the issue anymore.
When grpc/grpc-java#7690 gets resolved we may directly try to upgrade the dep version. Or someone who has an M1 without Rosetta environment can verify then.
chenrui333 commentedon Apr 10, 2024
Looks like apache-pulsar still does not support native arm build, can we maybe reopen this issue (or should I create a new one)?
Also, github has arm build support now with macos-14 runner. https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/