Last active
December 31, 2023 13:30
-
-
Save papaben/135caaec084c0bc32813a2b2cba280c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Installs RocksDB | |
# https://github.com/facebook/rocksdb/blob/master/INSTALL.md | |
# http://pyrocksdb.readthedocs.io/en/v0.4/installation.html | |
## | |
set -e | |
set -x | |
sudo yum groupinstall -y "Development Tools" | |
sudo yum --enablerepo=epel install -y snappy{-devel,} zlib{-devel,} bzip2-{devel,libs} gflags{-devel,} lz4-devel libsanitizer libzstd{-devel,} | |
export CPATH=/usr/include | |
export LIBRARY_PATH=/usr/lib64 | |
# Our versions of gcc is more strict by default, we need to disable that! | |
export EXTRA_CFLAGS='-Wimplicit-fallthrough=0 -Wformat-truncation=0' | |
export EXTRA_CXXFLAGS='-Wimplicit-fallthrough=0 -Wformat-truncation=0' | |
export DEBUG_LEVEL=0 | |
declare rocksVersion="5.10.2" | |
wget -O rocksdb-${rocksVersion}.tar.gz https://github.com/facebook/rocksdb/archive/v${rocksVersion}.tar.gz | |
tar -xzf rocksdb-${rocksVersion}.tar.gz | |
pushd rocksdb-${rocksVersion} | |
make shared_lib | |
sudo make install-shared INSTALL_PATH=/usr | |
# https://github.com/facebook/rocksdb/issues/2729 | |
make clean | |
# We call these directly from python | |
make ldb sst_dump | |
sudo cp ldb /usr/local/bin | |
sudo cp sst_dump /usr/local/bin | |
popd | |
# RocksDB installs into the wrong lib (lib not lib64), so we must copy | |
sudo cp /usr/lib/librocksdb.so* /usr/lib64/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment