You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug (描述bug)
Hello, I'm a member of Microsoft VCPKG. When I upgrade protobuf to 3.19.3, brpc build failed with the following error:
/mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/nshead_service.h:66:19: error: cannot declare field ‘brpc::NsheadClosure::_request’ to be of abstract type ‘brpc::NsheadMessage’
66 | NsheadMessage _request;
| ^~~~~~~~
In file included from /mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/nshead_service.h:23,
from /mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/builtin/connections_service.cpp:28:
/mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/nshead_message.h:30:7: note: because the following virtual functions are pure within ‘brpc::NsheadMessage’:
30 | class NsheadMessage : public ::google::protobuf::Message {
| ^~~~~~~~~~~~~
In file included from /mnt/vcpkg-ci/buildtrees/brpc/x64-linux-dbg/brpc/options.pb.h:30,
from /mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/controller.h:31,
from /mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/builtin/connections_service.cpp:24:
/mnt/vcpkg-ci/installed/x64-linux/include/google/protobuf/message.h:251:12: note: ‘virtual google::protobuf::Message* google::protobuf::Message::New(google::protobuf::Arena*) const’
251 | Message* New(Arena* arena) const override = 0;
| ^~~
In file included from /mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/builtin/connections_service.cpp:28:
/mnt/vcpkg-ci/buildtrees/brpc/src/a1b8d7f990-fb64781158.clean/src/brpc/nshead_service.h:67:19: error: cannot declare field ‘brpc::NsheadClosure::_response’ to be of abstract type ‘brpc::NsheadMessage’
67 | NsheadMessage _response;
| ^~~~~~~~~
I did some investigation and found the cause of the error is the class Message in protobuf was changed to virtual. The related codes in protobuf: src/google/protobuf/message.h Line 251
// Construct a new instance on the arena. Ownership is passed to the caller
// if arena is a nullptr.
Message* New(Arena* arena) const override = 0;
The original codes:
// Construct a new instance on the arena. Ownership is passed to the caller
// if arena is a nullptr. Default implementation allows for API compatibility
// during the Arena transition.
Message* New(Arena* arena) const override {
Message* message = New();
if (arena != nullptr) {
arena->Own(message);
}
return message;
}
Describe the bug (描述bug)
Hello, I'm a member of Microsoft VCPKG. When I upgrade
protobuf
to 3.19.3,brpc
build failed with the following error:I did some investigation and found the cause of the error is the class
Message
inprotobuf
was changed to virtual. The related codes in protobuf: src/google/protobuf/message.h Line 251The original codes:
Could you help confirm and resolve this issue? Thanks in advance.
The related PR on VCPKG: microsoft/vcpkg#21485
The full fail log: install-x64-linux-dbg-out.log
To Reproduce (复现方法)
Expected behavior (期望行为)
Versions (各种版本)
OS: Windows 10
Compiler: Visual Studio 2019
brpc: 0.9.7
protobuf: 3.19.3
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: