You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/01/19 04:39:28 UTC

[GitHub] [incubator-brpc] LilyWangLL opened a new issue #1676: Brpc build failed when protobuf update to 3.19.3

LilyWangLL opened a new issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676


   **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;
     }
   ```
   Could you help confirm and resolve this issue? Thanks in advance.
   The related PR on VCPKG: https://github.com/microsoft/vcpkg/pull/21485
   The full fail log: [install-x64-linux-dbg-out.log](https://github.com/apache/incubator-brpc/files/7894097/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 (更多上下文/截图)**
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] LilyWangLL commented on issue #1676: Brpc build failed when protobuf update to 3.19.3

Posted by GitBox <gi...@apache.org>.
LilyWangLL commented on issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676#issuecomment-1016397418


   Thanks for your reply. PR #1657 works fine for me. Waiting it merged, I will sync new change to VCPKG.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] LilyWangLL commented on issue #1676: Brpc build failed when protobuf update to 3.19.3

Posted by GitBox <gi...@apache.org>.
LilyWangLL commented on issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676#issuecomment-1018495547


   Thanks for fix this error. I have submited a PR https://github.com/microsoft/vcpkg/pull/22685 to merge #1679 to VCPKG.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on issue #1676: Brpc build failed when protobuf update to 3.19.3

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676#issuecomment-1016077084


   You can try this PR first: https://github.com/apache/incubator-brpc/pull/1657


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] LilyWangLL closed issue #1676: Brpc build failed when protobuf update to 3.19.3

Posted by GitBox <gi...@apache.org>.
LilyWangLL closed issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] lorinlee commented on issue #1676: Brpc build failed when protobuf update to 3.19.3

Posted by GitBox <gi...@apache.org>.
lorinlee commented on issue #1676:
URL: https://github.com/apache/incubator-brpc/issues/1676#issuecomment-1018186823


   Hi @LilyWangLL , #1679 also solves this problem, and it has been merged, could you try the master branch? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org