New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build fails with protobuf 3.8.0 #913
Comments
@MartijnBraam figured out, that the definition of the class has been moved from common.h to callback.h, so with this patch I can get past that particular compilation error: --- a/src/include/common/mir/protobuf/display_server.h
+++ b/src/include/common/mir/protobuf/display_server.h
@@ -19,6 +19,7 @@
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_H_
#define MIR_PROTOBUF_DISPLAY_SERVER_H_
+#include <google/protobuf/stubs/callback.h>
#include "mir_protobuf.pb.h"
namespace mir
|
...and with similar patching in other files, I can get past all protobuf 3.8 related errors. Here is the full patch file: https://gitlab.com/postmarketOS/pmaports/blob/8f6a331ffd350897c4fc8c13fe65a59520534d2f/unity8/mir/0001-Fix-google-protobuf-closure-related-errors.patch |
Thanks @ollieparanoid! Would you mind opening a pull request here on GitHub? That way our CI runs and the team can more easily review and merge it. |
Include google/protobuf/stubs/callback.h to get rid of build errors like the following, when building against protobuf 3.8.0: [ 20%] Building CXX object src/server/scene/CMakeFiles/mirscene.dir/broadcasting_session_event_sink.cpp.o In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.cpp:19: In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.h:22: In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/display_server.h:22: /home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:37:27: error: no type named 'Closure' in namespace 'google::protobuf' google::protobuf::Closure* done) = 0; ~~~~~~~~~~~~~~~~~~^ /home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:41:27: error: no type named 'Closure' in namespace 'google::protobuf' google::protobuf::Closure* done) = 0; ~~~~~~~~~~~~~~~~~~^ Related: canonical#913
Alpine Linux edge has just updated their protobuf from 3.6.1 to 3.8.0. postmarketOS builds on top of Alpine edge and it has mir 1.1.2 packaged. Due to the soname change from protobuf, mir needs to be rebuilt. But it does not build against protobuf 3.8.0:
Mir's
display_server.h
has not been changed since the last two years, so I expect the current version of mir to behave the same way.I've been reading through the protobuf source, and it seems that
google::protobuf::Closure
was removed between versions. Unfortunately the git log of protobuf is unreadable and I couldn't find anything useful online. Closure used to be defined insrc/google/protobuf/stubs/common.h
.(CC: @z3ntu)
The text was updated successfully, but these errors were encountered: