Skip to content

Commit ba5141a

Browse files
thesamesamnirbheek
authored andcommitted
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 gentoo/gentoo#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 cb54f0d recently for Boost, and 792a841 previously for protobuf itself. Bug: https://bugs.gentoo.org/912819 See also: gentoo/gentoo#32281 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
1 parent b576238 commit ba5141a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test cases/frameworks/5 protocol buffers/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++14'])
1+
project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++17'])
22

33
protoc = find_program('protoc', required : false)
44
dep = dependency('protobuf', required : false)

0 commit comments

Comments
 (0)