xiaohuifirst commented on issue #690: cpu profile 问题
URL: https://github.com/apache/incubator-brpc/issues/690#issuecomment-536381763
 
 
       
找到原因了,因为libtcmalloc.so与libtcmalloc_and_profiler.so同时连接到同一个程序中时,启动会报那个Check 
failed错误。
       
我的情况是,直接拉取leveldb的master分支代码,然后编译,默认情况下leveldb会把tcmalloc动态库连接到libleveldb.so,而libbrpc.so又连接了leveldb的so,导致libbrpc.so链接了libtcmalloc.so。
       
而在echo例子开启DBRPC_ENABLE_CPU_PROFILER时,又会链接上libtcmalloc_and_profiler.so,最终echo例子同时链接了libtcmalloc.so与libtcmalloc_and_profiler.so,启动报错。
       
解决方法:把leveldb的CMakeList.txt中开启tcmalloc的配置注释掉,重新编译安装leveldb库,然后再重新编译安装brpc动态库,最后重新生成echo例子,可以跑起来了。

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to