You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "FHBOL (via GitHub)" <gi...@apache.org> on 2025/01/18 13:34:16 UTC
[I] 编译echo测试程序失败,brpc是通过cmake方式编译的 (brpc)
FHBOL opened a new issue, #2880:
URL: https://github.com/apache/brpc/issues/2880
分支:On branch 1.9.0
通过cmake方式构建

CMake Deprecation Warning at CMakeLists.txt:18 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is Clang 14.0.0
-- The CXX compiler identification is Clang 14.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Protobuf: /usr/local/lib/libprotobuf.so (found version "3.19.4")
CMake Error at CMakeLists.txt:50 (message):
Fail to find brpc
-- Configuring incomplete, errors occurred!
See also "/home/fanghongbin/brpc/example/echo_c++/build/CMakeFiles/CMakeOutput.log".
构建目录
f@DESKTOP-UB1M0MH:~/brpc/build$ ls output/
bin include lib
f@DESKTOP-UB1M0MH:~/brpc/build$ ls output/lib/
libbrpc.a
只有静态库没有动态库
--
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-unsubscribe@brpc.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 编译echo测试程序失败,brpc是通过cmake方式编译的 (brpc)
Posted by "WenJie872 (via GitHub)" <gi...@apache.org>.
WenJie872 commented on issue #2880:
URL: https://github.com/apache/brpc/issues/2880#issuecomment-3399645788
cmake编译brpc动态库,需要添加编译命令-DBUILD_SHARED_LIBS=ON
我这边使用的全部命令是
# 拉取项目
https://github.com/apache/brpc.git
cd brpc
git checkout 1.9.0
# cmake编译brpc
mkdir build && cd build
cmake -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_C_COMPILER=$(which gcc) -DWITH_RDMA=ON -DBUILD_SHARED_LIBS=ON ..
make -j16
make install
# 编译echo_c++ example
cd ../example/echo_c++/
mkdir build && cd build
cmake -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_C_COMPILER=$(which gcc) -DLINK_SO=ON ..
make -j16
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] 编译echo测试程序失败,brpc是通过cmake方式编译的 (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm closed issue #2880: 编译echo测试程序失败,brpc是通过cmake方式编译的
URL: https://github.com/apache/brpc/issues/2880
--
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: issues-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@brpc.apache.org
For additional commands, e-mail: issues-help@brpc.apache.org
Re: [I] 编译echo测试程序失败,brpc是通过cmake方式编译的 (brpc)
Posted by "lqxhub (via GitHub)" <gi...@apache.org>.
lqxhub commented on issue #2880:
URL: https://github.com/apache/brpc/issues/2880#issuecomment-2601655330
你把这个文件里的 `/home/fanghongbin/brpc/example/echo_c++/build/CMakeFiles/CMakeOutput.log` 错误log 发上来啊😂
--
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-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org