You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/hpack.cpp.o
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_message.cpp.o
In file included from /home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:32:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
std::unique_ptrbutil::IOBufBuilder _vmsgbuilder;
^~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:30:1:
+#include
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5:
std::unique_ptrbutil::IOBufBuilder _vmsgbuilder;
^~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In static member function ‘static int brpc::HttpMessage::on_header_value(brpc::http_parser*, const char*, size_t)’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:110:49: error: ‘class brpc::HttpMessage’ has no member named ‘_vmsgbuilder’
butil::IOBufBuilder* vs = http_message->_vmsgbuilder.get();
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:113:27: error: ‘class brpc::HttpMessage’ has no member named ‘_vmsgbuilder’
http_message->_vmsgbuilder.reset(vs);
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In member function ‘int brpc::HttpMessage::OnBody(const char*, size_t)’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:223:9: error: ‘_vmsgbuilder’ was not declared in this scope
if (_vmsgbuilder) {
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In member function ‘int brpc::HttpMessage::OnMessageComplete()’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:292:9: error: ‘_vmsgbuilder’ was not declared in this scope
if (_vmsgbuilder) {
^~~~~~~~~~~~
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_parser.cpp.o
gmake[2]: *** [src/CMakeFiles/SOURCES_LIB.dir/build.make:1098: src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_message.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:237: src/CMakeFiles/SOURCES_LIB.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
The text was updated successfully, but these errors were encountered:
Describe the bug (描述bug)
按照centos的教程使用cmake编译报错
To Reproduce (复现方法)
git clone https://github.com/apache/brpc.git
cd brpc
mkdir build && cd build && cmake .. && cmake --build . -j6
Expected behavior (期望行为)
在ubuntu下正常编译,但是centos8.5下报错
Versions (各种版本)
OS: CentOS8.5
Compiler: gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4)
brpc: 20231219版本
protobuf: libprotoc 3.5.0
Additional context/screenshots (更多上下文/截图)
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/hpack.cpp.o
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_message.cpp.o
In file included from /home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:32:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
std::unique_ptrbutil::IOBufBuilder _vmsgbuilder;
^~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5: note: ‘std::unique_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:30:1:
+#include
/home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5:
std::unique_ptrbutil::IOBufBuilder _vmsgbuilder;
^~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In static member function ‘static int brpc::HttpMessage::on_header_value(brpc::http_parser*, const char*, size_t)’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:110:49: error: ‘class brpc::HttpMessage’ has no member named ‘_vmsgbuilder’
butil::IOBufBuilder* vs = http_message->_vmsgbuilder.get();
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:113:27: error: ‘class brpc::HttpMessage’ has no member named ‘_vmsgbuilder’
http_message->_vmsgbuilder.reset(vs);
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In member function ‘int brpc::HttpMessage::OnBody(const char*, size_t)’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:223:9: error: ‘_vmsgbuilder’ was not declared in this scope
if (_vmsgbuilder) {
^~~~~~~~~~~~
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp: In member function ‘int brpc::HttpMessage::OnMessageComplete()’:
/home/binarycopycode/work/brpc/src/brpc/details/http_message.cpp:292:9: error: ‘_vmsgbuilder’ was not declared in this scope
if (_vmsgbuilder) {
^~~~~~~~~~~~
[ 66%] Building CXX object src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_parser.cpp.o
gmake[2]: *** [src/CMakeFiles/SOURCES_LIB.dir/build.make:1098: src/CMakeFiles/SOURCES_LIB.dir/brpc/details/http_message.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:237: src/CMakeFiles/SOURCES_LIB.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
The text was updated successfully, but these errors were encountered: