Skip to content

Commit

Permalink
#1870 install rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev committed Jul 25, 2024
1 parent 96a9822 commit a506d64
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 10 deletions.
66 changes: 56 additions & 10 deletions deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ setup_variable WITH_WANGLE "yes"
setup_variable WITH_GTEST "yes"
setup_variable WITH_FIZZ "yes"
setup_variable WITH_PROXYGEN "yes"
setup_variable WITH_ROCKSDB "yes"

if [ -z "${PARALLEL_COUNT}" ];
then
Expand Down Expand Up @@ -610,6 +611,7 @@ echo -e "${COLOR_VAR_NAME}WITH_WANGLE${COLOR_DOTS}............${COLOR_VAR_DESC}L
echo -e "${COLOR_VAR_NAME}WITH_GTEST${COLOR_DOTS}.............${COLOR_VAR_DESC}LibGTEST${COLOR_DOTS}...............................${COLOR_VAR_VAL}$WITH_GTEST${COLOR_RESET}"
echo -e "${COLOR_VAR_NAME}WITH_FIZZ${COLOR_DOTS}..............${COLOR_VAR_DESC}LibFIZZ${COLOR_DOTS}................................${COLOR_VAR_VAL}$WITH_FIZZ${COLOR_RESET}"
echo -e "${COLOR_VAR_NAME}WITH_PROXYGEN${COLOR_DOTS}..........${COLOR_VAR_DESC}LibProxygen${COLOR_DOTS}............................${COLOR_VAR_VAL}$WITH_PROXYGEN${COLOR_RESET}"
echo -e "${COLOR_VAR_NAME}WITH_ROCKSDB${COLOR_DOTS}.............${COLOR_VAR_DESC}LibRocksDb${COLOR_DOTS}...............................${COLOR_VAR_VAL}$WITH_ROCKSDB${COLOR_RESET}"

#
#
Expand Down Expand Up @@ -2294,22 +2296,22 @@ then
then
echo -e "${COLOR_INFO}getting it from git${COLOR_DOTS}...${COLOR_RESET}"
eval git clone https://github.com/facebook/proxygen.git --recursive
cd proxygen
eval git checkout f666fe2d938a1b06a3281c958cdeb46743a2fa49
cd ..
cd proxygen
eval git checkout f666fe2d938a1b06a3281c958cdeb46743a2fa49
cd ..
echo -e "${COLOR_INFO}archiving it${COLOR_DOTS}...${COLOR_RESET}"
eval tar -czf proxygen-from-git.tar.gz ./proxygen
else
echo -e "${COLOR_INFO}unpacking it${COLOR_DOTS}...${COLOR_RESET}"
eval tar -xzf proxygen-from-git.tar.gz
fi
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd proxygen
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ..
cd ..
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd proxygen
eval mkdir -p build2
cd build2
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SAMPLES=OFF -DBUILD_SHARED_LIBS=OFF ..
cd ..
else
cd proxygen
fi
Expand All @@ -2327,6 +2329,50 @@ then
fi
fi

# https://github.com/facebook/rocksdb
if [ "$WITH_ROCKSDB" = "yes" ];
then
echo -e "${COLOR_SEPARATOR}==================== ${COLOR_PROJECT_NAME}LibRocksDb${COLOR_SEPARATOR} ==================================${COLOR_RESET}"
if [ ! -f "$INSTALL_ROOT/lib/librocksdb.a" ];
then
env_restore
cd "$SOURCES_ROOT"
if [ ! -d "rocksdb" ];
then
if [ ! -f "rocksdb-from-git.tar.gz" ];
then
echo -e "${COLOR_INFO}getting it from git${COLOR_DOTS}...${COLOR_RESET}"
eval git clone https://github.com/facebook/rocksdb.git --recursive
cd rocksdb
eval git checkout 9883b5f497a6c451065595c8c668728cfa5b8f59
cd ..
echo -e "${COLOR_INFO}archiving it${COLOR_DOTS}...${COLOR_RESET}"
eval tar -czf rocksdb-from-git.tar.gz ./rocksdb
else
echo -e "${COLOR_INFO}unpacking it${COLOR_DOTS}...${COLOR_RESET}"
eval tar -xzf rocksdb-from-git.tar.gz
fi
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd rocksdb
eval mkdir -p build
cd build
echo -e "$INSTALL_ROOT"
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DWITH_ALL_TESTS=OFF -DWITH_TESTS=OFF -DWITH_TOOLS=OFF -DWITH_CORE_TOOLS=OFF -DWITH_BENCHMARK_TOOLS=OFF -DROCKSDB_BUILD_SHARED=OFF ..
cd ..
else
cd rocksdb
fi
echo -e "${COLOR_INFO}building it${COLOR_DOTS}...${COLOR_RESET}"
cd build
eval "$MAKE" rocksdb "${PARALLEL_MAKE_OPTIONS}"
#eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install
cd "$SOURCES_ROOT"
else
echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"
fi
fi

echo -e "${COLOR_SEPARATOR}===================================================================${COLOR_RESET}"
echo -e "${COLOR_YELLOW}SKALED dependencies build actions...${COLOR_RESET}"
echo -e "${COLOR_SEPARATOR}==================== ${COLOR_PROJECT_NAME}FINISH${COLOR_SEPARATOR} =======================================${COLOR_RESET}"
Expand Down
1 change: 1 addition & 0 deletions deps/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ rm -rf ./jsoncpp
rm -rf ./libjson-rpc-cpp
rm -rf ./libcryptopp
rm -rf ./proxygen
rm -rf ./rocksdb
rm -rf ./wangle
rm -rf ./zstd
rm -rf ./liblzma
Expand Down

0 comments on commit a506d64

Please sign in to comment.