gxkevin opened a new issue #872: 安装brpc报这个错误:invalid use of incomplete type 
‘class google::protobuf::Message’
URL: https://github.com/apache/incubator-brpc/issues/872
 
 
   编译brpc报这个问题,protoc version 3.9.0, 系统Ubuntu 16.04, gcc 5.4
   
       Compiling src/brpc/esp_message.o
       In file included from src/brpc/esp_message.cpp:18:0:
       src/brpc/esp_message.h:37:47: error: invalid use of incomplete type 
‘class     google::protobuf::Message’
        class EspMessage : public ::google::protobuf::Message {
                                                  ^
       In file included from 
/usr/include/google/protobuf/implicit_weak_message.h:37:0,
                        from 
/usr/include/google/protobuf/generated_message_util.h:49,
                        from src/brpc/esp_message.h:21,
                        from src/brpc/esp_message.cpp:18:
       /usr/include/google/protobuf/arena.h:76:7: note: forward declaration of 
‘class   google::protobuf::Message’
       class Message;  // defined in message.h
              ^
       In file included from src/brpc/esp_message.cpp:24:0:
       /usr/include/google/protobuf/wire_format_lite_inl.h:59:13: error: 
redefinition of ‘static bool   
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)5u]’
        inline bool WireFormatLite::ReadPrimitive<int32, 
WireFormatLite::TYPE_INT32>(
                    ^
       In file included from 
/usr/include/google/protobuf/generated_message_util.h:53:0,
                        from src/brpc/esp_message.h:21,
                        from src/brpc/esp_message.cpp:18:
       /usr/include/google/protobuf/wire_format_lite.h:918:13: note: ‘static 
bool 
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)5u]’ previously declared 
here
        inline bool WireFormatLite::ReadPrimitive<int32, 
WireFormatLite::TYPE_INT32>(
                    ^
       In file included from src/brpc/esp_message.cpp:24:0:
       /usr/include/google/protobuf/wire_format_lite_inl.h:68:13: error: 
redefinition of ‘static bool 
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = long int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)3u]’
        inline bool WireFormatLite::ReadPrimitive<int64, 
WireFormatLite::TYPE_INT64>(
                ^
       In file included from 
/usr/include/google/protobuf/generated_message_util.h:53:0,
                        from src/brpc/esp_message.h:21,
                        from src/brpc/esp_message.cpp:18:
       /usr/include/google/protobuf/wire_format_lite.h:926:13: note: ‘static 
bool 
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = long int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)3u]’ previously declared 
here
        inline bool WireFormatLite::ReadPrimitive<int64, 
WireFormatLite::TYPE_INT64>(
                    ^
       In file included from src/brpc/esp_message.cpp:24:0:
       /usr/include/google/protobuf/wire_format_lite_inl.h:77:13: error: 
redefinition of ‘static bool 
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = unsigned int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)13u]’
        inline bool WireFormatLite::ReadPrimitive<uint32, 
WireFormatLite::TYPE_UINT32>(
                    ^
       In file included from 
/usr/include/google/protobuf/generated_message_util.h:53:0,
                        from src/brpc/esp_message.h:21,
                        from src/brpc/esp_message.cpp:18:
       /usr/include/google/protobuf/wire_format_lite.h:934:13: note: ‘static 
bool 
google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*,
 CType*) [with CType = unsigned int; 
google::protobuf::internal::WireFormatLite::FieldType DeclaredType = 
(google::protobuf::internal::WireFormatLite::FieldType)13u]’ previously 
declared here
        inline bool WireFormatLite::ReadPrimitive<uint32, 
WireFormatLite::TYPE_UINT32>(

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to