From ed7ea43dd9f660ec283564d85313b128cdb61fba Mon Sep 17 00:00:00 2001 From: Akanksha Mahajan Date: Mon, 24 Aug 2020 09:10:10 -0700 Subject: [PATCH] Fix for Regression failure (#7300) Summary: RocksDb regression commands are exiting with error /usr/bin/ar: creating librocksdb.a /usr/bin/ld: ./cache/cache.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC Bug: It tries to link the static code into a shared lib. Fix: Added make clean before building shared_lib Pull Request resolved: https://github.com/facebook/rocksdb/pull/7300 Test Plan: make clean make -j$(nproc) static_lib make -j$(nproc) shared_lib Reviewed By: pdillinger Differential Revision: D23276842 Pulled By: akankshamahajan15 fbshipit-source-id: c2e69fa505893ad414786794fc486f3f22f059d5 --- build_tools/rocksdb-lego-determinator | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/rocksdb-lego-determinator b/build_tools/rocksdb-lego-determinator index b04956ec3..f5ab73a7f 100755 --- a/build_tools/rocksdb-lego-determinator +++ b/build_tools/rocksdb-lego-determinator @@ -1101,6 +1101,7 @@ run_regression() strip librocksdb.a send_size_to_ods static_lib_stripped $(stat --printf="%s" librocksdb.a) + make clean make -j$(nproc) shared_lib send_size_to_ods shared_lib $(stat --printf="%s" `readlink -f librocksdb.so`) strip `readlink -f librocksdb.so` @@ -1113,6 +1114,7 @@ run_regression() strip librocksdb.a send_size_to_ods static_lib_lite_stripped $(stat --printf="%s" librocksdb.a) + make clean make LITE=1 -j$(nproc) shared_lib send_size_to_ods shared_lib_lite $(stat --printf="%s" `readlink -f librocksdb.so`) strip `readlink -f librocksdb.so`