Skip to content

Commit

Permalink
Fix for Regression failure (facebook#7300)
Browse files Browse the repository at this point in the history
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: facebook#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
  • Loading branch information
akankshamahajan15 authored and facebook-github-bot committed Aug 24, 2020
1 parent e500c73 commit ed7ea43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build_tools/rocksdb-lego-determinator
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`
Expand Down

0 comments on commit ed7ea43

Please sign in to comment.