mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
[Fix #1099] Build RocksDB 3.10.2 on linux
This commit is contained in:
parent
eb9da578f2
commit
dfe62540ce
@ -57,27 +57,27 @@ function install_thrift() {
|
||||
|
||||
function install_rocksdb() {
|
||||
if [[ ! -f /usr/local/lib/librocksdb.a ]]; then
|
||||
if [[ ! -f rocksdb-3.5.tar.gz ]]; then
|
||||
wget https://osquery-packages.s3.amazonaws.com/deps/rocksdb-3.5.tar.gz
|
||||
if [[ ! -f rocksdb-3.10.2.tar.gz ]]; then
|
||||
wget https://github.com/facebook/rocksdb/archive/rocksdb-3.10.2.tar.gz
|
||||
else
|
||||
log "rocksdb source is already downloaded. skipping."
|
||||
fi
|
||||
if [[ ! -d rocksdb-rocksdb-3.5 ]]; then
|
||||
tar -xf rocksdb-3.5.tar.gz
|
||||
if [[ ! -d rocksdb-rocksdb-3.10.2 ]]; then
|
||||
tar -xf rocksdb-3.10.2.tar.gz
|
||||
fi
|
||||
if [[ ! -f rocksdb-rocksdb-3.5/librocksdb.a ]]; then
|
||||
if [[ ! -f rocksdb-rocksdb-3.10.2/librocksdb.a ]]; then
|
||||
if [[ $OS = "ubuntu" ]]; then
|
||||
CLANG_INCLUDE="-I/usr/include/clang/3.4/include"
|
||||
elif [ $OS = "centos" ] || [ $OS = "rhel" ]; then
|
||||
CLANG_VERSION=`clang --version | grep version | cut -d" " -f3`
|
||||
CLANG_INCLUDE="-I/usr/lib/clang/$CLANG_VERSION/include"
|
||||
fi
|
||||
pushd rocksdb-rocksdb-3.5
|
||||
pushd rocksdb-rocksdb-3.10.2
|
||||
make static_lib CFLAGS="$CLANG_INCLUDE $CFLAGS"
|
||||
popd
|
||||
fi
|
||||
sudo cp rocksdb-rocksdb-3.5/librocksdb.a /usr/local/lib
|
||||
sudo cp -R rocksdb-rocksdb-3.5/include/rocksdb /usr/local/include
|
||||
sudo cp rocksdb-rocksdb-3.10.2/librocksdb.a /usr/local/lib
|
||||
sudo cp -R rocksdb-rocksdb-3.10.2/include/rocksdb /usr/local/include
|
||||
else
|
||||
log "rocksdb already installed. skipping."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user