Skip to content
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

Unable to build on M1 Mac #6242

Closed
zackman0010 opened this issue Jun 29, 2022 · 7 comments · Fixed by #6324 or #6355
Closed

Unable to build on M1 Mac #6242

zackman0010 opened this issue Jun 29, 2022 · 7 comments · Fixed by #6324 or #6355

Comments

@zackman0010
Copy link
Contributor

zackman0010 commented Jun 29, 2022

The ./gradlew assemble command fails when running on an M1 Mac.

Execution failed for task ':instrumentation:grpc-1.6:testing:generateProto'.
> Could not resolve all files for configuration ':instrumentation:grpc-1.6:testing:protobufToolsLocator_protoc'.
   > Could not find protoc-3.3.0-osx-aarch_64.exe (com.google.protobuf:protoc:3.3.0).

I did some digging, and it appears that protoc does not support the osx-aarch_64 architecture until version 3.17.3. We don't use gRPC or Protobuf in our development, so I didn't know if just updating the compiler version here would be a breaking change.

EDIT: Same issue also exists with the other artifact in the same file, protoc-gen-grpc-java. Current version is 1.6.0, does not support M1 Mac until 1.42.1. I'm much more certain this one is a breaking change, so I'm not sure how to proceed from there.

@trask
Copy link
Member

trask commented Jun 29, 2022

hi @zackman0010! protoc-gen-grpc-java is only used by the grpc instrumentation testing module, so would not be a breaking change (from API perspective at least), feel free to send PR with the update and we'll see if CI complains 😄

@zackman0010
Copy link
Contributor Author

@trask I did actually try it locally, and unfortunately it did break. Apparently the compiled Protobuf file from the 1.42.1 compiler used classes that were not present in the 1.6 runtime used by the gRPC instrumentation tests. I had to update the gRPC version in the test as well to finally get a successful compile.

@zackman0010
Copy link
Contributor Author

I went ahead and created a PR #6244 to show what versions I had to edit to get a successful compile. I only edited the gRPC version in the testing environment, the library and instrumentation environments remain on 1.6.

@zackman0010
Copy link
Contributor Author

@anuraaga @trask To move the conversation back to the issue after closing the PR, I did find what might be an alternative to committing the generated sources: grpc/grpc-java#7690 (comment)

Essentially, put an if statement in the Gradle file to hardcode the use of the osx-x86_64 binary if the detected OS is osx, otherwise let the normal auto-detection work.

@trask
Copy link
Member

trask commented Jul 8, 2022

hey @zackman0010! can you send a PR with this change? as long as it passes CI I don't see any issue with merging it

@zackman0010
Copy link
Contributor Author

I would, but unfortunately any PR I submit is going to get stuck in the same CLA limbo as my existing PR.

@XSAM
Copy link
Member

XSAM commented Jul 21, 2022

Got a similar error:

* What went wrong:
Execution failed for task ':instrumentation:grpc-1.6:testing:generateProto'.
> Could not resolve all files for configuration ':instrumentation:grpc-1.6:testing:protobufToolsLocator_grpc'.
   > Could not find protoc-gen-grpc-java-1.6.0-osx-aarch_64.exe (io.grpc:protoc-gen-grpc-java:1.6.0).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/io/grpc/protoc-gen-grpc-java/1.6.0/protoc-gen-grpc-java-1.6.0-osx-aarch_64.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants