-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang 12 compile error #1642
Comments
Hi @songdongsheng you can try the latest master branch, #1679 may have resolved this problem |
yes, compile works fine. but test failed:
|
|
./build/test/bthread_key_unittestRunning main() from gtest_main.cc |
|
|
|
|
Maybe it is because you built it with glog so that fatal log causes abort. |
Describe the bug (描述bug)
In file included from /tmp/tmp.7mW5R2vmFp/src/brpc/builtin/connections_service.cpp:28:
/tmp/tmp.7mW5R2vmFp/src/brpc/nshead_service.h:66:19: error: field type 'brpc::NsheadMessage' is an abstract class
NsheadMessage _request;
^
/usr/include/google/protobuf/message.h:251:12: note: unimplemented pure virtual method 'New' in 'NsheadMessage'
Message* New(Arena* arena) const override = 0;
^
In file included from /tmp/tmp.7mW5R2vmFp/src/brpc/builtin/connections_service.cpp:28:
/tmp/tmp.7mW5R2vmFp/src/brpc/nshead_service.h:67:19: error: field type 'brpc::NsheadMessage' is an abstract class
NsheadMessage _response;
^
20 warnings and 2 errors generated.
To Reproduce (复现方法)
cd $(mktemp -d)
curl -sSL https://downloads.apache.org/incubator/brpc/1.0.0/apache-brpc-1.0.0-incubating-src.tar.gz | tar -xz --strip-components 1
rm -fr build && mkdir build && cd build
cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
-DCMAKE_INSTALL_PREFIX=/usr
..
make -j 2
Expected behavior (期望行为)
make successful
Versions (各种版本)
OS: RHEL 8.5
Compiler: both clang 12.0.1 & 8.5.0 failed
brpc: 1.0.0
protobuf: v3.19.1
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: