astroidmail / astroid

A graphical threads-with-tags style, lightweight and fast, e-mail client for Notmuch
http://astroidmail.github.io
Other
606 stars 65 forks source link

build on Arch Linux with protobuf 23.4-1 #734

Closed mklinik closed 1 month ago

mklinik commented 12 months ago

Arch gave me this version of protobuf in a recent system update, and astroid no longer builds with it. This patch fixes the build.

Based on https://gitlab.archlinux.org/archlinux/packaging/packages/astroid/-/blob/main/protobuf-23.patch

jorsn commented 1 month ago

Thanks! This seems necessary for newer protobuf in general (not only on arch), and it also still builds with protobuf 21.12. But why change to c++17?

mklinik commented 1 month ago

But why change to c++17?

When I try to compile with c++14 I get the following compile error, among many others

In file included from /usr/include/google/protobuf/stubs/common.h:20,
                 from /usr/include/google/protobuf/io/coded_stream.h:107,
                 from /home/mkl/sandbox/software/astroid/build/messages.pb.h:26,
                 from /home/mkl/sandbox/software/astroid/src/modes/thread_view/page_client.hh:14,
                 from /home/mkl/sandbox/software/astroid/src/modes/thread_view/thread_view.cc:19:
/usr/include/absl/strings/string_view.h:53:26: error: ‘string_view’ in namespace ‘std’ does not name a type

Searching for this error message, I found people saying that string_view is apparently a feature introduced in c++17.

jorsn commented 1 month ago

Ah, yes, you're right.