test cases: use C++17 for protobuf because of abseil-cpp

On the openSUSE builder, we got a horrifying CI failure like:
```
FAILED: asubdir/subdir-prog.p/main.cpp.o
c++ -Iasubdir/subdir-prog.p -Iasubdir '-I../test cases/frameworks/5 protocol buffers/asubdir' -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 -O0 -g -DPROTOBUF_USE_DLLS -DNOMINMAX -MD -MQ asubdir/subdir-prog.p/main.cpp.o -MF asubdir/subdir-prog.p/main.cpp.o.d -o asubdir/subdir-prog.p/main.cpp.o -c '../test cases/frameworks/5 protocol buffers/asubdir/main.cpp'
In file included from /usr/include/google/protobuf/stubs/common.h:20,
                 from /usr/include/google/protobuf/io/coded_stream.h:107,
                 from asubdir/subdir-prog.p/defs.pb.h:26,
                 from ../test cases/frameworks/5 protocol buffers/asubdir/main.cpp:1:
/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
[...]
```

This turns out to be because of a *huge* mess with abseil-cpp and protobuf. We're
still trying to handle it in Gentoo, even (see bgo#912819) and https://github.com/gentoo/gentoo/pull/32281.

In summary, abseil-cpp started to require C++17 (unless built with a special option
which causes ABI problems). Let's switch the protobuf test case to use C++17
accordingly. There's some precedence for Just Doing This, like in cb54f0d707
recently for Boost, and 792a84199b previously for
protobuf itself.

Bug: https://bugs.gentoo.org/912819
See also: https://github.com/gentoo/gentoo/pull/32281
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
pull/12830/head
Sam James 9 months ago committed by Eli Schwartz
parent 7d8b925144
commit 7e8b7454f5
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      test cases/frameworks/5 protocol buffers/meson.build

@ -1,4 +1,4 @@
project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++14'])
project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++17'])
protoc = find_program('protoc', required : false)
dep = dependency('protobuf', required : false)

Loading…
Cancel
Save