-
Notifications
You must be signed in to change notification settings - Fork 56
Building RethinkDB
The instructions specify the steps to build RethinkDB version v2.4.4 on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)
- SLES (12 SP5, 15 SP5)
Note: For Ubuntu (20.04, 22.04, 23.10), please refer to this link to install RethinkDB from the community RethinkDB repository.
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it
If you want to build RethinkDB using manual steps, go to STEP 2.
Use the following commands to build RethinkDB using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/RethinkDB/2.4.4/build_rethinkdb.sh
# Build Spark
bash build_rethinkdb.sh [Provide -h option to print help menu]
If the build completes successfully, go to STEP 3. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
- RHEL (7.8, 7.9)
sudo yum install -y python2-devel python2 openssl-devel libcurl-devel wget tar unzip bzip2 m4 git-core gcc-c++ ncurses-devel curl which patch make ncurses-static zlib-devel zlib-static protobuf protobuf-compiler protobuf-devel
- RHEL (8.6, 8.8, 8.9)
sudo yum install -y python2-devel python2 openssl-devel libcurl-devel jemalloc-devel wget tar unzip bzip2 m4 git-core boost gcc-c++ ncurses-devel curl which patch make ncurses zlib-devel zlib procps protobuf-devel protobuf-compiler xz
sudo ln -s /usr/bin/python2 /usr/bin/python
- RHEL (9.0, 9.2, 9.3)
sudo yum install -y openssl-devel libcurl-devel jemalloc-devel wget tar unzip bzip2 m4 git-core boost gcc-c++ ncurses-devel curl which patch make ncurses zlib-devel zlib procps protobuf-devel protobuf-compiler xz
- SLES 12 SP5
sudo zypper install -y gcc gcc-c++ make libopenssl-devel zlib-devel wget tar patch unzip autoconf automake m4 libtool python python-xml python-curses libicu-devel termcap curl libcurl-devel git awk libncurses5
- SLES 15 SP5
sudo zypper install -y gcc gcc-c++ make libopenssl-devel zlib-devel wget tar patch unzip autoconf automake m4 libtool libicu-devel protobuf-devel libprotobuf-c-devel boost-devel termcap curl libcurl-devel git bzip2 awk gzip xz readline-devel libncurses5 ncurses-devel netcfg libbz2-devel glibc-locale
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
tar -xvf Python-2.7.18.tar.xz
cd $SOURCE_ROOT/Python-2.7.18
./configure --prefix=/usr/local --exec-prefix=/usr/local
make
sudo make install
sudo ln -s /usr/bin/python2 /usr/bin/python
python -V
cd $SOURCE_ROOT
git clone -b v2.4.4 https://github.com/rethinkdb/rethinkdb
cd rethinkdb
./configure --allow-fetch
make -j4
Note: make -j4
will execute up to 4 build tasks in parallel. This number may be increased or decreased as necessary to match the resources available on the machine.
sudo make install
rethinkdb --bind all
- Rebuild the binary with debug info
cd $SOURCE_ROOT/rethinkdb
make -j4 DEBUG=1
- To run the whole unit test suite
./build/debug/rethinkdb-unittest
- To run a subset of test suite (For example test cases in RPCDirectoryTest category)
./build/debug/rethinkdb-unittest --gtest_filter=RPCDirectoryTest.*
- To run an individual test case (For example test case TimerTest.TestApproximateWaitTimes)
./build/debug/rethinkdb-unittest --gtest_filter=TimerTest.TestApproximateWaitTimes
Note:
-
./test/run unit -j4
will execute up to 4 unit tests in parallel. This number may be increased or decreased to match the resources available on the machine. -
Test case
UtilsTest.TimeLocal
may fail if the local Time Zone is not defined. -
Several test cases such as
TimerTest.TestApproximateWaitTimes
may fail intermittently but will pass after rerun.
- Build Python and Ruby drivers
git clone -b v2.4.1 https://github.com/rethinkdb/rethinkdb $SOURCE_ROOT/rethinkdb-v2.4.1
cd $SOURCE_ROOT/rethinkdb-v2.4.1
./configure --allow-fetch
make py-driver
make rb-driver
cp -r build/drivers ../rethinkdb/build/
Note: Since the drivers were extracted from this repo in release v2.4.1, we need to build them separately.
- Run the whole integration test suite
cd $SOURCE_ROOT/rethinkdb
./test/run -j4
- Run an individual test case (For example regression.4383)
cd $SOURCE_ROOT/rethinkdb
./test/run regression.4383
Note:
-
Test case
regression.known_failures_1774
,interface.artificial_table
andcpplint.cpplint
fail on both s390x and Intel. -
Several test cases such as
regression.4383
orstatic_cluster.append-stress
may fail or get timeout intermittently but will pass after rerun.
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.