FHBOL opened a new issue, #2807:
URL: https://github.com/apache/brpc/issues/2807

   **Describe the bug (描述bug)**
   编译报错,protoc版本不合适
   
按照文档,make后出现,可能是protoc版本的问题,但是文档中没有指明合适的版本,我的protoc版本应该是5.28.3,自己在另一台ubuntu22上也是出现同样的问题,另一台Ubuntu的protoc版本为3.20.3,我在两台电脑都出现了同样的问题,那感觉其他人在首次编译brpc大概率也会出现同样的问题,希望在文档中补全相关的解决方案
   **To Reproduce (复现方法)**
   /Users/fang/brpc/idl_options.pb.h:12:2: error: This file was generated by a 
newer version of protoc which is
   #error This file was generated by a newer version of protoc which is
    ^
   /Users/fang/brpc/idl_options.pb.h:13:2: error: incompatible with your 
Protocol Buffer headers. Please update
   #error incompatible with your Protocol Buffer headers. Please update
    ^
   /Users/fang/brpc/idl_options.pb.h:14:2: error: your headers.
   #error your headers.
    ^
   /Users/fang/brpc/idl_options.pb.h:36:1: error: unknown type name 
'PROTOBUF_NAMESPACE_OPEN'
   PROTOBUF_NAMESPACE_OPEN
   ^
   /Users/fang/brpc/idl_options.pb.h:37:1: error: expected unqualified-id
   namespace internal {
   ^
   /Users/fang/brpc/idl_options.pb.h:40:1: error: unknown type name 
'PROTOBUF_NAMESPACE_CLOSE'
   PROTOBUF_NAMESPACE_CLOSE
   ^
   /Users/fang/brpc/idl_options.pb.h:46:16: error: no member named 
'PROTOBUF_NAMESPACE_ID' in the global namespace
   extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable 
descriptor_table_idl_5foptions_2eproto;
                ~~^
   /Users/fang/brpc/idl_options.pb.h:47:1: error: unknown type name 
'PROTOBUF_NAMESPACE_OPEN'
   PROTOBUF_NAMESPACE_OPEN
   ^
   /Users/fang/brpc/idl_options.pb.h:48:25: error: expected ';' after top level 
declarator
   PROTOBUF_NAMESPACE_CLOSE
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:mac sequoia 15.0.1
   Compiler: clang version 14.0.3
   brpc: Commit e1bf467
   protobuf:5.28.3
   
   **Additional context/screenshots (更多上下文/截图)**
   
![image](https://github.com/user-attachments/assets/f537b3ad-cab8-4670-971a-7c9e56a3f019)
   
   
   


-- 
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-unsubscr...@brpc.apache.org.apache.org

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


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

Reply via email to