-
Notifications
You must be signed in to change notification settings - Fork 16.1k
v22.2 integration with cmake doesn't work #12374
Copy link
Copy link
Closed
Labels
Description
What version of protobuf and what language are you using?
Version: main/v22.2
Language: C++
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
gcc 10.2.1 20210130
cmake 3.25.0
What did you do?
Steps to reproduce the behavior:
- docker run --rm -ti quay.io/pypa/manylinux2014_x86_64
- inside:
git clone https://github.com/protocolbuffers/protobuf && \
cd protobuf/ && \
git checkout v22.2 && \
git submodule init && git submodule update --init --recursive && \
mkdir build && cd build && \
cmake .. && \
make -j"$(grep ^processor /proc/cpuinfo | wc -l)" && \
make install && \
cd ../examples/ && mkdir build && cd build && \
cmake ../ && make -j 12
- integration with cmake cannot find protoc
[ 12%] Running cpp protocol buffer compiler on addressbook.proto
make[2]: cpp_out: Command not found
[ 25%] Building CXX object CMakeFiles/add_person_cpp.dir/add_person.cc.o
/opt/protobuf/examples/add_person.cc:9:10: fatal error: addressbook.pb.h: No such file or directory
9 | #include "addressbook.pb.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/add_person_cpp.dir/add_person.cc.o] Error 1
make[1]: *** [CMakeFiles/add_person_cpp.dir/all] Error 2
make: *** [all] Error 2
What did you expect to see
The example works, protoc can be found by cmake
What did you see instead?
Cmake cannot find protoc, so the issued command is incomplette
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
Reactions are currently unavailable