MacOS安装make报错
Compiling src/brpc/policy/weighted_round_robin_load_balancer.o Packing libbrpc.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libbrpc.a(atomicops_internals_x86_gcc.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libbrpc.a(asan_invalid_access.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libbrpc.a(thread_restrictions.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libbrpc.a(baidu_naming_service.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libbrpc.a(giano_authenticator.o) has no symbols Linking protoc-gen-mcpack ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [protoc-gen-mcpack] Error 1
前面修改了
sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib --cc=clang --cxx clang++
可以进行配置
但是运行的时候出错,参考其他issue修改了config_brpc.sh 279行
version=system_profiler SPSoftwareDataType | grep "System Version" | awk '{print $4}' | awk -F. '{printf "%d.%d", $1, $2}'``
后可以执行。
但是make的时候报了上面的错误。
这个应该是ssl库没装
@zyearn 是macos问题,需要把brew安装的openssl移动到/usr/local/include/
cp -R /usr/local/Cellar/openssl/1.0.2o_1/include/openssl /usr/local/include
试试别动环境,配置时改成sh config_brpc.sh --headers="/usr/local/include /usr/local/Cellar" --libs="/usr/local/lib /usr/local/Cellar" --cc=clang --cxx clang++
@jamesge 按照您的方法报错
Linking libbrpc.dylib
Undefined symbols for architecture x86_64:
"_RegisterThriftProtocol", referenced from:
brpc::GlobalInitializeOrDieImpl() in global.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libbrpc.dylib] Error 1
@smartczy 拉下代码再试一下
@zyearn 安装成功,感谢!
@jamesge @zyearn 谢谢二位,安装成功了,感谢!