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
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?
When I run the protobuf-maven-plugin plugin, I get an error:
[ERROR] PROTOC FAILED: /Users/xxx/Code/demo/spring-boot-grpc/target/protoc-plugins/protoc-gen-grpc-java-1.69.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/xxx/Code/demo/spring-boot-grpc/src/main/proto/hello.proto [0:0]: /Users/xxx/Code/demo/spring-boot-grpc/target/protoc-plugins/protoc-gen-grpc-java-1.69.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.
The osx-aarch_64.exe I downloaded from the Maven repository does not run properly and reports an error:
protoc-gen-grpc-java-1.69.1-osx-aarch_64.exe: Bad CPU type in executable
The protoc-gen-grpc-java I installed through Homebrew can run normally under Apple chips and generate code correctly.
Please see that the Ruby source code protoc-gen-grpc-java formula installed by brew does not perform special processing on the gradle script.
definstall# Workaround for newer Protobuf to link to Abseil libraries# Ref: https://github.com/grpc/grpc-java/issues/11475ENV.append"CXXFLAGS","-std=c++17"ENV.append"CXXFLAGS",Utils.safe_popen_read("pkgconf","--cflags","protobuf").chompENV.append"LDFLAGS",Utils.safe_popen_read("pkgconf","--libs","protobuf").chompinreplace"compiler/build.gradle"do |s|
# Avoid build errors on ARM macOS from old minimum macOS deployments.gsub!'"-mmacosx-version-min=10.7",',""# Avoid static linkage on Linuxs.gsub!'"-Wl,-Bstatic"',"\"-L#{Formula["protobuf"].opt_lib}\""s.gsub!', "-static-libgcc"',""end# Fails with brew `gradle` due to animalsniffer 1.7.1# Ref: https://github.com/xvik/gradle-animalsniffer-plugin/issues/100system"./gradlew","--no-daemon","--project-dir=compiler","-PskipAndroid=true","java_pluginExecutable"bin.install"compiler/build/exe/java_plugin/protoc-gen-grpc-java"pkgshare.install"examples/src/main/proto/helloworld.proto"end
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:
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: