-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Why are compiler osx-aarch_64.exe for Apple chips and osx-x86_64.exe for Intel chips the same file? #11844
Comments
Can you provide the plugin config for protobuf-maven-plugin that you use (example)? |
I run into the same on a Apple M4 with MacOS 15.2 while compiling https://github.com/grpc/grpc-java/examples with ➜ examples git:(v1.69.0) ./gradlew installDist
> Task :generateProto FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateProto'.
> protoc: stdout: . stderr: ....... protoc-gen-grpc-java-1.69.0-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_out: protoc-gen-grpc: Plugin failed with status code 1.
File is on indicated location: -rwxr--r--@ 1 .... staff 6221952 22 Jan 16:25 protoc-gen-grpc-java-1.69.0-osx-aarch_64.exe` Running it: ./protoc-gen-grpc-java-1.69.0-osx-aarch_64.exe
zsh: bad CPU type in executable: ......../protoc-gen-grpc-java-1.69.0-osx-aarch_64.exe |
maven build config: <build>
<plugins>
<plugin>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.1</version>
<executions>
<execution>
<id>initialize</id>
<phase>initialize</phase>
<goals>
<goal>detect</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.25.5:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.69.1:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
<configuration>
<pluginParameter>jakarta_omit,@generated=omit</pluginParameter>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build> |
Central Repository: io/grpc/protoc-gen-grpc-java/1.69.1 Files of osx-aarch_64 architecture and osx-x86_64 architecture, both md5/sha content and exe size are exactly the same. |
Why are protoc-gen-grpc-java compiler osx-aarch_64.exe for Apple chips and osx-x86_64.exe for Intel chips the same file?
Please see that the Ruby source code protoc-gen-grpc-java formula installed by brew does not perform special processing on the gradle script.
What is the reason why the target files of two different architectures are the same after uploading to the Maven repository?
Can this be solved so that we can run it correctly through the protobuf-maven-plugin plugin to automatically generate code?
The text was updated successfully, but these errors were encountered: