4ab4049f27
Summary: Closes https://github.com/facebook/rocksdb/issues/2068 Closes https://github.com/facebook/rocksdb/pull/2072 Differential Revision: D4810855 Pulled By: ajkr fbshipit-source-id: 288ddb9
25 lines
1.1 KiB
Bash
Executable File
25 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# install all required packages for rocksdb that are available through yum
|
|
ARCH=$(uname -i)
|
|
sudo yum -y install openssl java-1.7.0-openjdk-devel.$ARCH
|
|
|
|
# install gcc/g++ 4.8.2 via CERN (http://linux.web.cern.ch/linux/devtoolset/)
|
|
sudo wget -O /etc/yum.repos.d/slc5-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc5-devtoolset.repo
|
|
sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-cern http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
|
|
sudo yum -y install devtoolset-2
|
|
|
|
wget https://github.com/gflags/gflags/archive/v2.0.tar.gz -O gflags-2.0.tar.gz
|
|
tar xvfz gflags-2.0.tar.gz; cd gflags-2.0; scl enable devtoolset-2 ./configure; scl enable devtoolset-2 make; sudo make install
|
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
|
|
|
# set java home so we can build rocksdb jars
|
|
export JAVA_HOME=/usr/lib/jvm/java-1.7.0
|
|
|
|
# build rocksdb
|
|
cd /rocksdb
|
|
scl enable devtoolset-2 'make jclean clean'
|
|
scl enable devtoolset-2 'PORTABLE=1 make rocksdbjavastatic'
|
|
cp /rocksdb/java/target/librocksdbjni-* /rocksdb-build
|
|
cp /rocksdb/java/target/rocksdbjni-* /rocksdb-build
|
|
|