Skip to content

Fatal Error: 'python/google/protobuf/proto_api.h' Not Found During Compilation #24

@tadteo

Description

@tadteo

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

mkdir build
cmake ..
make

Expected Behavior:

The code should compile successfully.

Actual Behavior:

The build fails with the following error:

In file included from /home/user/gz_ws/src/gz-python/build/_deps/pybind11_protobuf-src/pybind11_protobuf/native_proto_caster.h:21,
                 from /home/user/gz_ws/src/gz-python/src/pybind11/gz/msgs/_gz_msgs_extras_pybind11.cc:22:
/home/user/gz_ws/src/gz-python/build/_deps/pybind11_protobuf-src/pybind11_protobuf/check_unknown_fields.h:7:10: fatal error: python/google/protobuf/proto_api.h: No such file or directory
    7 | #include "python/google/protobuf/proto_api.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/extras.dir/build.make:76: CMakeFiles/extras.dir/src/pybind11/gz/msgs/_gz_msgs_extras_pybind11.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1243: CMakeFiles/extras.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

System Information:

OS: Ubuntu 22.04
Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions