Skip to content

Commit

Permalink
fix build on centos7 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinji-IkariG authored Dec 12, 2023
1 parent 3cdcd11 commit 924af9d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions project/externals/abseil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ExternalProject_Add(
CMAKE_ARGS
${common_cmake_args}
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=\$ORIGIN:\$ORIGIN/../3rd
BUILD_IN_SOURCE 1
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM}
Expand Down
1 change: 1 addition & 0 deletions project/externals/cyrus-sasl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ExternalProject_Add(
CONFIGURE_COMMAND
${common_configure_envs}
"LDFLAGS=${ld_flags} -lcrypto -lcrypt -ldb-5.1"
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:${CMAKE_INSTALL_PREFIX}/lib/berkeleydb-5.1.29:$LD_LIBRARY_PATH"
./autogen.sh ${common_configure_args}
--disable-static
--enable-shared
Expand Down
2 changes: 1 addition & 1 deletion project/externals/fbthrift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ExternalProject_Add(
CMAKE_COMMAND env PATH=${CMAKE_INSTALL_PREFIX}/bin:$ENV{PATH} ${CMAKE_COMMAND}
CMAKE_ARGS
${common_cmake_args}
"-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -static-libgcc -Wl,-rpath=\$ORIGIN/../lib"
"-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -static-libgcc -Wl,-rpath=\$ORIGIN/../lib:\$ORIGIN/../lib64"
-DCMAKE_BUILD_TYPE=Release
-DBoost_NO_BOOST_CMAKE=ON
-Denable_tests=OFF
Expand Down
1 change: 1 addition & 0 deletions project/externals/libevent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ExternalProject_Add(
-DEVENT__DISABLE_BENCHMARK=ON
-DEVENT__DISABLE_SAMPLES=ON
-DEVENT__DISABLE_REGRESS=ON
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=\$ORIGIN:\$ORIGIN/../3rd
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
BUILD_IN_SOURCE 1
INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM}
Expand Down
6 changes: 5 additions & 1 deletion project/externals/llvm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

set(name llvm)
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
set(LLVM_ENV_COMMAND
"env"
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib64:${BERKELEYDB_LIB_DIR}:$ENV{LD_LIBRARY_PATH}"
)

ExternalProject_Add(
${name}
Expand All @@ -29,7 +33,7 @@ ExternalProject_Add(
-DLLVM_PARALLEL_COMPILE_JOBS=${BUILDING_JOBS_NUM}
-DLLVM_PARALLEL_LINK_JOBS=${BUILDING_JOBS_NUM}

BUILD_COMMAND ninja -C build install
BUILD_COMMAND ${LLVM_ENV_COMMAND} ninja -C build install
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
LOG_CONFIGURE TRUE
Expand Down

0 comments on commit 924af9d

Please sign in to comment.