Closed chazanov closed 4 years ago
I can not reproduce this (but I have slightly different GCC and protobuf versions). Looks like it might be something in the Google protobuf library that your specific compiler version doesn't like.
I don't see anything that changed in Protozero that could have triggered this. Could you recheck that there is a difference here between 1.6.7 and 1.6.8 and maybe do a git bisect
to find which exact commit triggers this?
nested_testcase.pb.h seems to be generated. When I switch to protobuf 3.9.0 I can provoke the following errors:
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
protobuf 3.9.0 has introduced incompabilities with old generated code, but they say it was fixed with 3.9.1: https://github.com/protocolbuffers/protobuf/issues/6379
Which protobuf version do you advise?
Yes, the *.pb.h/cc
files are generated. If you switch versions of Google's protobuf library this can lead to problems in which case you should do a new clean build. It shouldn't matter which protobuf library you use, they should all work.
Anyway: All of this doesn't matter for the use of Protozero. Protozero only uses the Google libraries to run its tests, making sure it stays compatible with them. For normal use, Google's libraries are not used at all. So chances are this is only due to some confusion with the Google libraries which don't matter really.
When I try to rebuild ArchLinux's official protobuf protobuf's own tests fail. This even happens in a clean chroot. So probably something with my config is very broken, but not only for me.
How can I disable all tests in protozero? Not forever - just for a quick test.
I don't understand. If you don't want the tests, just don't run them.
I just run
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
and don't run ctest
. Nevertheless the writer_tests
from test/CMakeFiles/writer_tests.dir/
are executed.
The test should not run if you don't call ctest
. I can't imagine why that would happen. But your problem isn't that the test run fails but the compilation fails and the compilation is, of course, done when you call make
. But you don't need to call make
, there isn't anything to make except the tests really. Well, there are tools and docs, but you can compile them separately if needed. To use the library you don't have to call make, because it is header-only.
I'm trying to build protozero 1.6.8 with protobuf 3.7.0 and gcc 9.1.0. The prior version 1.6.7 has had worked, this one fails at compilation: