You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "707state (via GitHub)" <gi...@apache.org> on 2024/09/10 13:17:47 UTC

[I] 编译失败 (brpc)

707state opened a new issue, #2761:
URL: https://github.com/apache/brpc/issues/2761

   **Describe the bug (描述bug)**
   在Arch Linux上用g++或者clang++都无法通过编译,且报错不同。
   
   g++:
   
   brpc/src/brpc/baidu_master_service.h:91:24: error: cannot declare field ‘brpc::BaiduMasterService::_default_response’ to be of abstract type ‘brpc::SerializedResponse’
      91 |     SerializedResponse _default_response;
   
   /brpc/serialized_response.h:29:7: note:   because the following virtual functions are pure within ‘brpc::SerializedResponse’:
      29 | class SerializedResponse : public ::google::protobuf::Message {
   ...
   
   
   clang++
   
   brpc/src/brpc/serialized_request.h:54:32: error: only virtual member functions can be marked 'override'
      54 |     bool IsInitialized() const override;
   
   brpc/src/brpc/serialized_request.h:70:61: error: only virtual member functions can be marked 'override'
      70 |     void MergeFrom(const ::google::protobuf::Message& from) override
   ...
   
   
   
   去除override之后为
   
   ./src/brpc/serialized_request.h:60:32: error: ‘google::protobuf::Metadata brpc::SerializedRequest::GetMetadata() const’ marked ‘override’, but does not override
      60 |   ::google::protobuf::Metadata GetMetadata() const override;
   
   **To Reproduce (复现方法)**
   
   按照 https://brpc.apache.org/docs/getting_started/ 网站上用config_brpc.sh的方法进行编译
   
   **Expected behavior (期望行为)**
   
   应当正常编译
   
   **Versions (各种版本)**
   OS: Arch Linux
   Compiler: g++/clang++
   brpc: master
   protobuf: 27.3-2
   grpc: 1.65.5-1
   
   
   
   


-- 
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.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


Re: [I] 编译失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright commented on issue #2761:
URL: https://github.com/apache/brpc/issues/2761#issuecomment-2348119216

   protobuf版本的问题吧,换成protobuf 3试试


-- 
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


Re: [I] 编译失败 (brpc)

Posted by "chenBright (via GitHub)" <gi...@apache.org>.
chenBright closed issue #2761: 编译失败
URL: https://github.com/apache/brpc/issues/2761


-- 
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


Re: [I] 编译失败 (brpc)

Posted by "deadlinefen (via GitHub)" <gi...@apache.org>.
deadlinefen commented on issue #2761:
URL: https://github.com/apache/brpc/issues/2761#issuecomment-2342629105

   centos7上遇到了相同情况


-- 
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


Re: [I] 编译失败 (brpc)

Posted by "Lin807188583 (via GitHub)" <gi...@apache.org>.
Lin807188583 commented on issue #2761:
URL: https://github.com/apache/brpc/issues/2761#issuecomment-2358683588

   应该是protobuf版本问题。
   这类问题我遇到过几次,最近一次是在arch上编译,系统默认安装的pb是v28,出现类似问题,后面源码更新到29还是类似报错,换到3.20.x才顺利编译


-- 
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