mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 02:18: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() {
|
function install_rocksdb() {
|
||||||
if [[ ! -f /usr/local/lib/librocksdb.a ]]; then
|
if [[ ! -f /usr/local/lib/librocksdb.a ]]; then
|
||||||
if [[ ! -f rocksdb-3.5.tar.gz ]]; then
|
if [[ ! -f rocksdb-3.10.2.tar.gz ]]; then
|
||||||
wget https://osquery-packages.s3.amazonaws.com/deps/rocksdb-3.5.tar.gz
|
wget https://github.com/facebook/rocksdb/archive/rocksdb-3.10.2.tar.gz
|
||||||
else
|
else
|
||||||
log "rocksdb source is already downloaded. skipping."
|
log "rocksdb source is already downloaded. skipping."
|
||||||
fi
|
fi
|
||||||
if [[ ! -d rocksdb-rocksdb-3.5 ]]; then
|
if [[ ! -d rocksdb-rocksdb-3.10.2 ]]; then
|
||||||
tar -xf rocksdb-3.5.tar.gz
|
tar -xf rocksdb-3.10.2.tar.gz
|
||||||
fi
|
fi
|
||||||
if [[ ! -f rocksdb-rocksdb-3.5/librocksdb.a ]]; then
|
if [[ ! -f rocksdb-rocksdb-3.10.2/librocksdb.a ]]; then
|
||||||
if [[ $OS = "ubuntu" ]]; then
|
if [[ $OS = "ubuntu" ]]; then
|
||||||
CLANG_INCLUDE="-I/usr/include/clang/3.4/include"
|
CLANG_INCLUDE="-I/usr/include/clang/3.4/include"
|
||||||
elif [ $OS = "centos" ] || [ $OS = "rhel" ]; then
|
elif [ $OS = "centos" ] || [ $OS = "rhel" ]; then
|
||||||
CLANG_VERSION=`clang --version | grep version | cut -d" " -f3`
|
CLANG_VERSION=`clang --version | grep version | cut -d" " -f3`
|
||||||
CLANG_INCLUDE="-I/usr/lib/clang/$CLANG_VERSION/include"
|
CLANG_INCLUDE="-I/usr/lib/clang/$CLANG_VERSION/include"
|
||||||
fi
|
fi
|
||||||
pushd rocksdb-rocksdb-3.5
|
pushd rocksdb-rocksdb-3.10.2
|
||||||
make static_lib CFLAGS="$CLANG_INCLUDE $CFLAGS"
|
make static_lib CFLAGS="$CLANG_INCLUDE $CFLAGS"
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
sudo cp rocksdb-rocksdb-3.5/librocksdb.a /usr/local/lib
|
sudo cp rocksdb-rocksdb-3.10.2/librocksdb.a /usr/local/lib
|
||||||
sudo cp -R rocksdb-rocksdb-3.5/include/rocksdb /usr/local/include
|
sudo cp -R rocksdb-rocksdb-3.10.2/include/rocksdb /usr/local/include
|
||||||
else
|
else
|
||||||
log "rocksdb already installed. skipping."
|
log "rocksdb already installed. skipping."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user