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

protoc (v24.4) not working on MacOS Ventura 13.2.1 #14360

Closed
d-kold opened this issue Oct 11, 2023 · 1 comment
Closed

protoc (v24.4) not working on MacOS Ventura 13.2.1 #14360

d-kold opened this issue Oct 11, 2023 · 1 comment
Labels

Comments

@d-kold
Copy link

d-kold commented Oct 11, 2023

What version of protobuf and what language are you using?
Version: v24.4
Language: Java

What operating system (Linux, Windows, ...) and version?
MacOS Ventura 13.2.1 (Apple M2 Pro Chip)

What runtime / compiler are you using (e.g., python version or gcc version)
Java 17.8.0

What did you do?
I am using Maven and trying to build the project (mvn verify). Using Quarkus, I am trying to generate code through the proto files. However, I get an error that the proto compiler is not executable. More details can be found in this issue

What did you expect to see
A successful build and generated Java classes from the proto definitions.

What did you see instead?

/Users/devendra/IdeaProjects/dsp-platform/lib-dsp-common/target/io.grpc-protoc-gen-grpc-java-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.

Have followed the steps to install pre-compiled binaries and have updated my environment’s path variable to include the path to the protoc executable

Is there a compatible version for the M2 chip that I can use? I would be grateful for any help / suggestions.

Thanks!

  • Devendra
@d-kold d-kold added the untriaged auto added to all issues by default when created. label Oct 11, 2023
@muayadda
Copy link

muayadda commented Oct 13, 2023

Check Protobuf Installation: Make sure you have Protobuf (protobuf compiler) correctly installed on your system. You should be able to download pre-compiled binaries suitable for macOS. You can download it from the official Protobuf GitHub releases page: https://github.com/protocolbuffers/protobuf/releases
Verify Installation: After downloading, extract the binaries if necessary and verify that the protoc executable is present. You can check this by running the following command in your terminal:
protoc --version
If you see the version information, that means Protobuf is correctly installed.

Update Your PATH: Ensure that the directory containing the protoc executable is added to your system's PATH environment variable. You can do this by adding the following line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc, or ~/.profile):
export PATH=/path/to/protoc:$PATH

Replace /path/to/protoc with the actual path to the directory containing the protoc executable. After adding this line, save the file, and either restart your terminal or run source ~/.bashrc (or the appropriate file) to apply the changes.
Quarkus Configuration: If you're using Quarkus for your project, make sure that the Quarkus protobuf extension is correctly configured in your project's pom.xml or configuration file. Ensure that the plugin is using the protoc compiler from your PATH.

Environment Variables: Double-check that your Java environment variables are correctly set, especially if you've updated your PATH variable. Environment variables can affect the behavior of your build tools.

@shaod2 shaod2 added mac and removed untriaged auto added to all issues by default when created. labels Oct 16, 2023
@d-kold d-kold closed this as completed Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@muayadda @d-kold @shaod2 and others