wsl下ubuntu18编译brpc时出错
- Dominant language
- C++
- Stars
- 321
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
Installing dependencies for Ubuntu...
[sudo] password for uuu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
coreutils is already the newest version (8.28-1ubuntu1).
libgoogle-perftools-dev is already the newest version (2.5-2.2ubuntu3).
libleveldb-dev is already the newest version (1.20-2).
libprotobuf-dev is already the newest version (3.0.0-9.1ubuntu1).
libprotoc-dev is already the newest version (3.0.0-9.1ubuntu1).
libsnappy-dev is already the newest version (1.1.7-1).
make is already the newest version (4.1-9.1ubuntu1).
libgflags-dev is already the newest version (2.2.1-1).
protobuf-compiler is already the newest version (3.0.0-9.1ubuntu1).
g++ is already the newest version (4:7.4.0-1ubuntu2.3).
git is already the newest version (1:2.17.1-1ubuntu0.4).
libcurl4-openssl-dev is already the newest version (7.58.0-2ubuntu3.7).
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Building brpc...
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found gflags: /usr/lib/x86_64-linux-gnu/libgflags.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.9.0")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1")
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread;-lpthread (found version "3.9.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/_build
[ 71%] Building CXX object src/CMakeFiles/OBJ_LIB.dir/brpc/esp_message.cpp.o
[ 71%] Building CXX object CMakeFiles/PROTO_LIB.dir/brpc/streaming_rpc_meta.pb.cc.o
In file included from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.cpp:18:0:
/home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/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 /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.h:21,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/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 /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.cpp:24:0:
/usr/include/google/protobuf/wire_format_lite_inl.h:61: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)5]’
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
In file included from /usr/include/google/protobuf/generated_message_util.h:53:0,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.h:21,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/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)5]’ previously declared here
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
In file included from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.cpp:24:0:
/usr/include/google/protobuf/wire_format_lite_inl.h:70: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)3]’
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
In file included from /usr/include/google/protobuf/generated_message_util.h:53:0,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.h:21,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/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)3]’ previously declared here
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
[ 71%] Building CXX object src/CMakeFiles/OBJ_LIB.dir/brpc/event_dispatcher.cpp.o
In file included from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.cpp:24:0:
/usr/include/google/protobuf/wire_format_lite_inl.h:79: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)13]’
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
In file included from /usr/include/google/protobuf/generated_message_util.h:53:0,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.h:21,
from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/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)13]’ previously declared here
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
In file included from /home/catching/work/dev/baidu/dmkit/unit-dmkit/brpc/src/brpc/esp_message.cpp:24:0:
/usr/include/google/protobuf/wire_format_lite_inl.h:85:13: error: redefinition of ‘static bool google::protobuf::internal::WireFormatLite::ReadPrimitive(google::protobuf::io::CodedInputStream*, CType*) [with CType = long unsigned int; google::protobuf::internal::WireFormatLite::FieldType DeclaredType = (google::protobuf::internal::WireFormatLite::FieldType)4]’
inline bool WireFormatLite::ReadPrimitive(
^~~~~~~~~~~~~~
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by building brpc under WSL with Ubuntu 18.04, then inspect src/brpc/esp_message.h and src/brpc/esp_message.cpp alongside the generated build files in _build. Start with the reported incomplete google::protobuf::Message and wire_format_lite redefinition errors; done means the brpc build completes successfully in this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, linux, ubuntu
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100