-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fatal Error: 'python/google/protobuf/proto_api.h' Not Found During Compilation #24
Comments
Hi @tadteo , any updates on this? I'm experiencing the same error |
It must need to be an older version of something here to work, because things don't appear to build anymore due to pybind11 not having the header file needed by the google protocol buffer package missing files now. Things used to build, within the last 12 months, but not anymore. I would be keen to know what combination of versions of the libraries involved are required to compile this! relevant reading: |
This is related to an upstream issue: pybind/pybind11_protobuf#127. It was partly introduced by the change in: pybind/pybind11_protobuf#128, which uses the system version of Protobuf first if available (which does not include the proto_api.h header). Gazebo Harmonic now include Python bindings for
|
Since this project FetchContent Protobuf and pybind11_protobuf, you can patch Protobuf to make the see: https://github.com/google/or-tools/blob/870edf6f7bff6b8ff0d267d936be7e331c5b8c2d/patches/protobuf-v26.1.patch#L59-L68 note: this header is public available in bazel based build (https://github.com/protocolbuffers/protobuf/blob/2124e2687d7c7cced2f4d9e759701204aa113b4b/python/build_targets.bzl#L434-L441), Protobuf Maintainers want to push for replacing it by the UPB protobuf implem (but it is not staffed and stall for 2 years already...). |
When trying to compile the project, I encountered a fatal error related to a missing header file python/google/protobuf/proto_api.h. This is causing the build to fail.
Steps to Reproduce:
Clone the repository
Navigate to
/home/user/gz_ws/src/gz-python
Expected Behavior:
The code should compile successfully.
Actual Behavior:
The build fails with the following error:
System Information:
OS: Ubuntu 22.04
Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
The text was updated successfully, but these errors were encountered: