From ac48e0d589f6835d938450d6272a8f0f45418b07 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Wed, 1 Sep 2021 14:32:56 -0700 Subject: [PATCH] Fix fbcode linker error with `make shared_lib` (#8742) Summary: Need proper linker path for linking shared library Pull Request resolved: https://github.com/facebook/rocksdb/pull/8742 Test Plan: `make shared_lib` on Facebook machine Reviewed By: jay-zhuang Differential Revision: D30709012 Pulled By: pdillinger fbshipit-source-id: 6d17e281204c359aced85e18212e59758cec3313 --- build_tools/fbcode_config_platform009.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/fbcode_config_platform009.sh b/build_tools/fbcode_config_platform009.sh index 63f6c7ff6..e33e8452e 100644 --- a/build_tools/fbcode_config_platform009.sh +++ b/build_tools/fbcode_config_platform009.sh @@ -151,7 +151,6 @@ CFLAGS+=" -DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DROCKSDB_FALLOCATE_PR CXXFLAGS+=" $CFLAGS" EXEC_LDFLAGS=" $SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $LZ4_LIBS $ZSTD_LIBS $GFLAGS_LIBS $NUMA_LIB $TBB_LIBS $LIBURING_LIBS" -EXEC_LDFLAGS+=" -B$BINUTILS" EXEC_LDFLAGS+=" -Wl,--dynamic-linker,/usr/local/fbcode/platform009/lib/ld.so" EXEC_LDFLAGS+=" $LIBUNWIND" EXEC_LDFLAGS+=" -Wl,-rpath=/usr/local/fbcode/platform009/lib" @@ -160,6 +159,7 @@ EXEC_LDFLAGS+=" -Wl,-rpath=$GCC_BASE/lib64" EXEC_LDFLAGS+=" -ldl" PLATFORM_LDFLAGS="$LIBGCC_LIBS $GLIBC_LIBS $STDLIBS -lgcc -lstdc++" +PLATFORM_LDFLAGS+=" -B$BINUTILS" EXEC_LDFLAGS_SHARED="$SNAPPY_LIBS $ZLIB_LIBS $BZIP_LIBS $LZ4_LIBS $ZSTD_LIBS $GFLAGS_LIBS $TBB_LIBS $LIBURING_LIBS"