rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.64k stars 306 forks source link

has no member named ‘always_print_primitive_fields’ #566

Closed drbeco closed 2 months ago

drbeco commented 3 months ago

New protobuf3-26.0 dependency for Bear causes the error:

[ 35%] Building CXX object intercept/CMakeFiles/events_db_a.dir/source/collect/db/EventsDatabaseWriter.cc.o
/tmp/SBo/Bear-3.1.3/source/intercept/source/collect/db/EventsDatabaseWriter.cc: In function ‘google::protobuf::util::JsonPrintOptions {anonymous}::create_print_options()’:
/tmp/SBo/Bear-3.1.3/source/intercept/source/collect/db/EventsDatabaseWriter.cc:39:23: error: ‘using JsonPrintOptions = struct google::protobuf::json::PrintOptions’ {aka ‘struct google::protobuf::json::PrintOptions’} has no member named ‘always_print_primitive_fields’
   39 |         print_options.always_print_primitive_fields = true;
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [intercept/CMakeFiles/events_db_a.dir/build.make:90: intercept/CMakeFiles/events_db_a.dir/source/collect/db/EventsDatabaseWriter.cc.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:388: intercept/CMakeFiles/events_db_a.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/BearSource.dir/build.make:87: subprojects/Stamp/BearSource/BearSource-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:174: CMakeFiles/BearSource.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Using Slackware 15.0 as OS.

drbeco commented 3 months ago

I'll create a pull request with an update on the offending source code

rizsotto commented 3 months ago

Thanks @drbeco for the report and for the PR!

rizsotto commented 3 months ago

reverting this change, since it breaks all CI pipelines.

need to pick up the dependency version and guard with preprocessor macros to assign the field conditionally.

drbeco commented 3 months ago

The CI pipelines error messages don't say much to help the case

drbeco commented 3 months ago

This new PR is running the CI pipelines. Lets hope and see.

drbeco commented 3 months ago

Failed (?) Confirm? Now it is me who is running... running out of ideas.

kovmir commented 2 months ago

Broken on Slackware -current too.