zengkui opened a new issue, #1759:
URL: https://github.com/apache/incubator-brpc/issues/1759

   **Describe the bug (描述bug)**
   centos 下完成brpc的编译后,编译http_c++的example的时候出现了编译错误,如下:
   $make
   > Linking http_client
   g++ -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib64 -L../..//output/lib 
-Xlinker "-(" http_client.o -Wl,-Bstatic -lgflags -lglog -lbrpc -Wl,-Bdynamic 
-Xlinker "-)" -lpthread -lssl -lcrypto -ldl -lz -lrt -lprotobuf -lleveldb -o 
http_client
   ../..//output/lib/libbrpc.a(pprof_service.o): In function 
`brpc::PProfService::profile(google::protobuf::RpcController*, 
brpc::ProfileRequest const*, brpc::ProfileResponse*, 
google::protobuf::Closure*)':
   /home/work/incubator-brpc-1.1.0/src/brpc/builtin/pprof_service.cpp:103: 
undefined reference to `ProfilerStart'
   /home/work/incubator-brpc-1.1.0/src/brpc/builtin/pprof_service.cpp:139: 
undefined reference to `ProfilerStart'
   ../..//output/lib/libbrpc.a(hotspots_service.o): In function 
`brpc::DoProfiling(brpc::ProfilingType, google::protobuf::RpcController*, 
google::protobuf::Closure*)':
   /home/work/incubator-brpc-1.1.0/src/brpc/builtin/hotspots_service.cpp:732: 
undefined reference to `ProfilerStart'
   /home/work/incubator-brpc-1.1.0/src/brpc/builtin/hotspots_service.cpp:749: 
undefined reference to `ProfilerStart'
   http_client.o: In function `main':
   
/home/work/incubator-brpc-1.1.0/example/http_c++/../..//output/include/brpc/details/profiler_linker.h:46:
 undefined reference to `ProfilerStart'
   collect2: error: ld returned 1 exit status
   make: *** [http_client] Error 1
   **To Reproduce (复现方法)**
   
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS: centos
   Compiler: gcc 4.8.5
   brpc: 1.1.0
   protobuf:  3.6.1
   gflags:  2.1.1
   glog : 0.6.0
   cmake : 3.23.1
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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: dev-unsubscr...@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to