diff options
author | Sam James <sam@gentoo.org> | 2024-02-09 03:30:04 +0000 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2024-02-09 13:54:16 -0500 |
commit | 7e8b7454f5bd53ae2d15c270e741d6f524fbd3bf (patch) | |
tree | a25b1ca390ce2147534cdacc0e0d638e0dadf5d7 | |
parent | 7d8b925144ae2b84ccccd603eac11b70d4243e46 (diff) | |
download | meson-7e8b7454f5bd53ae2d15c270e741d6f524fbd3bf.zip meson-7e8b7454f5bd53ae2d15c270e741d6f524fbd3bf.tar.gz meson-7e8b7454f5bd53ae2d15c270e741d6f524fbd3bf.tar.bz2 |
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 cb54f0d707e5673eb1d8aaafae59a6d5fde25e18
recently for Boost, and 792a84199b8829c923968e8816a27e021647d146 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>
-rw-r--r-- | test cases/frameworks/5 protocol buffers/meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build index 9a4154b..f9e677c 100644 --- a/test cases/frameworks/5 protocol buffers/meson.build +++ b/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) |