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

   **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 (更多上下文/截图)**
   
![centos](https://github.com/apache/brpc/assets/34117975/ce66b7ef-a278-4108-ae25-28a180a21d17)
   
   [ 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_ptr<butil::IOBufBuilder> _vmsgbuilder;
             ^~~~~~~~~~
   /home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5: note: 
‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include 
<memory>’?
   /home/binarycopycode/work/brpc/src/brpc/details/http_message.h:30:1:
   +#include <memory>
    
   /home/binarycopycode/work/brpc/src/brpc/details/http_message.h:125:5:
        std::unique_ptr<butil::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
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to