brpc icon indicating copy to clipboard operation
brpc copied to clipboard

MacOS安装make报错

Open sinceq opened this issue 8 years ago • 8 comments

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

sinceq avatar May 15 '18 10:05 sinceq

前面修改了 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的时候报了上面的错误。

sinceq avatar May 15 '18 10:05 sinceq

这个应该是ssl库没装

zyearn avatar May 15 '18 14:05 zyearn

@zyearn 是macos问题,需要把brew安装的openssl移动到/usr/local/include/ cp -R /usr/local/Cellar/openssl/1.0.2o_1/include/openssl /usr/local/include

sinceq avatar May 15 '18 16:05 sinceq

试试别动环境,配置时改成sh config_brpc.sh --headers="/usr/local/include /usr/local/Cellar" --libs="/usr/local/lib /usr/local/Cellar" --cc=clang --cxx clang++

jamesge avatar May 16 '18 03:05 jamesge

@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

polyzy avatar May 16 '18 07:05 polyzy

@smartczy 拉下代码再试一下

zyearn avatar May 16 '18 09:05 zyearn

@zyearn 安装成功,感谢!

polyzy avatar May 16 '18 09:05 polyzy

@jamesge @zyearn 谢谢二位,安装成功了,感谢!

sinceq avatar May 18 '18 03:05 sinceq