An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
brpc已成功编译,编译braft时出现以下内容:
[ 95%] Linking CXX shared library ../output/lib/libbraft.so
/usr/bin/ld: /usr/local/lib/libleveldb.a(db_impl.cc.o): relocation R_X86_64_PC32 against symbol `_ZTVN7leveldb12SnapshotImplE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: [src/CMakeFiles/braft-shared.dir/build.make:158: output/lib/libbraft.so] Error 1make[1]: [CMakeFiles/Makefile2:146: src/CMakeFiles/braft-shared.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
使用的leveldb为release1.23版,且成功编译并添加到了/usr/local/bin中,请问如何解决
brpc已成功编译,编译braft时出现以下内容: [ 95%] Linking CXX shared library ../output/lib/libbraft.so /usr/bin/ld: /usr/local/lib/libleveldb.a(db_impl.cc.o): relocation R_X86_64_PC32 against symbol `_ZTVN7leveldb12SnapshotImplE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: [src/CMakeFiles/braft-shared.dir/build.make:158: output/lib/libbraft.so] Error 1make[1]: [CMakeFiles/Makefile2:146: src/CMakeFiles/braft-shared.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 使用的leveldb为release1.23版,且成功编译并添加到了/usr/local/bin中,请问如何解决