Protobuf not building on Ubuntu 21.04

317 views
Skip to first unread message

Vladamir Estragon

unread,
Jun 2, 2022, 7:24:21 AM6/2/22
to Protocol Buffers
Hi,

I am trying to build the latest code on Ubuntu 21.04 Release:    21.04  Codename:    hirsute.

Before building I did
sudo apt-get install libprotobuf-dev protobuf-compiler

The I ran cmake .
and then  make

but I hit the following error


In file included from /home/snuc/Downloads/protobuf/src/google/protobuf/map_lite_test_util.cc:31:
/home/snuc/Downloads/protobuf/src/google/protobuf/map_lite_test_util.h:34:10: fatal error: google/protobuf/map_lite_unittest.pb.h: No such file or directory
   34 | #include <google/protobuf/map_lite_unittest.pb.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/protobuf-test-common.dir/build.make:320: CMakeFiles/protobuf-test-common.dir/src/google/protobuf/map_lite_test_util.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:172: CMakeFiles/protobuf-test-common.dir/all] Error 2
make: *** [Makefile:160: all] Error 2

Any suggestions?

Deanna Garcia

unread,
Aug 1, 2022, 2:08:34 PM8/1/22
to Protocol Buffers
Does "protoc --version" give you anything? I can't tell whether this is an installation problem or a cmake problem. Either way if you're still hitting this error you should file an issue on our GitHub.
Reply all
Reply to author
Forward
0 new messages