4 ############################################
6 ############################################
7 source $
(dirname $0)/..
/ceph-helpers-root.sh
9 ############################################
10 # Install required tools
11 ############################################
12 echo "Install required tools"
16 ############################################
17 # Compile&Start RocksDB
18 ############################################
19 # install prerequisites
22 ubuntu|debian|devuan|softiron
)
23 install git g
++ libsnappy-dev zlib1g-dev libbz2-dev libradospp-dev cmake
28 # RHEL needs CRB repo for snappy-devel
29 sudo subscription-manager repos
--enable "codeready-builder-for-rhel-8-x86_64-rpms"
32 install git gcc-c
++.x86_64 snappy-devel zlib zlib-devel
bzip2 bzip2-devel libradospp-devel.x86_64 cmake libarchive-3.3
.3
35 install git gcc-c
++ snappy-devel zlib-devel libbz2-devel libradospp-devel
38 echo "$(distro_id) is unknown, $@ will have to be installed manually."
43 # sudo yum install gflags-devel
45 # wget https://github.com/schuhschuh/gflags/archive/master.zip
48 # mkdir build && cd build
49 # export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
50 # make && make install
55 echo "Compile rocksdb"
56 if [ -e rocksdb
]; then
60 pushd $
(dirname /home
/ubuntu
/cephtest
/clone.client
.0/qa
/workunits
/rados
/bash.sh
)/..
/..
/..
/
61 git submodule update
--init src
/rocksdb
63 git clone $
(dirname /home
/ubuntu
/cephtest
/clone.client
.0/qa
/workunits
/rados
/bash.sh
)/..
/..
/..
/src
/rocksdb rocksdb
67 if type cmake3
> /dev
/null
2>&1 ; then
73 [ -z "$BUILD_DIR" ] && BUILD_DIR
=build
74 mkdir
${BUILD_DIR} && cd ${BUILD_DIR} && ${CMAKE} -DCMAKE_BUILD_TYPE=Debug
-DWITH_TESTS=ON
-DWITH_LIBRADOS=ON
-DWITH_SNAPPY=ON
-DWITH_GFLAGS=OFF
-DFAIL_ON_WARNINGS=OFF ..
75 make rocksdb_env_librados_test
-j8
80 if [ -f "/etc/ceph/ceph.conf" ]; then
81 cp /etc
/ceph
/ceph.conf ..
/ceph
/src
/
82 elif [ -f "/etc/ceph/ceph/ceph.conf" ]; then
83 cp /etc
/ceph
/ceph
/ceph.conf ..
/ceph
/src
/
85 echo "/etc/ceph/ceph/ceph.conf doesn't exist"
88 echo "Run EnvLibrados test"
90 if [ -f "../ceph/src/ceph.conf" ]
92 cp env_librados_test ~
/cephtest
/archive
95 echo "../ceph/src/ceph.conf doesn't exist"