SH:RethinkDB:

RethinkDB Build Instructions

Here are some instructions to build RethinkDB from a minimal-ish install (server or minimal) on various platforms. Should work for branches v2.3.x, v2.4.x, and next. (Follow the `./configure` line with `make -j7` to actually build.)

For more precise and executable build instructions, you might want to look at the Docker files at https://github.com/srh/rethinkdb-package-builder/. They include a few compatibility workarounds for older platforms.

These instructions include likely unnecessary dependencies such as mg, git, and epel-release. I did install them on the VM, and I didn't test whether things worked without installing them.

These instructions might fail to work if you have the wrong version of a dependency already on your system. You can use --fetch to work around this. For example, if see a build error talking about Node.JS, you might need to pass --fetch npm to ./configure. Run ./configure --help for a list of options.

These instructions might not work for RethinkDB 2.3.6 source tarballs. The releases v2.3.6.srh.1 and v2.3.6.srh.2 contain additional fixes for newer platforms. They also have prebuilt unsigned packages. See the srh releases page for the latest releases.

focal

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

# to build a .deb package:
apt install debhelper curl
make -j7 build-deb UBUNTU_RELEASE=focal

eoan

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

# to build a .deb package:
apt install debhelper curl
make -j7 build-deb UBUNTU_RELEASE=eoan

disco

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

# to build a .deb package:
apt install debhelper curl
make -j7 build-deb UBUNTU_RELEASE=disco

bionic

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

# to build a .deb package:
apt install debhelper curl
make -j7 build-deb UBUNTU_RELEASE=bionic

artful

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

zesty

apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 clang libssl1.0-dev
./configure --allow-fetch CXX=clang++
make -j7

xenial

apt-get install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 g++ libssl-dev
./configure --allow-fetch
make -j7

trusty

apt-get install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 g++
./configure --allow-fetch
make -j7

# In v2.3.7 and other commits, the trusty .deb package build will
# fail because the package script mistakenly expects g++-5 to
# be installed.  As a workaround:

perl -pi -e 's/g\+\+-5/g\+\+/' mk/packaging.mk
perl -pi -e 's/version-dirty"/version"/' scripts/gen-version.sh

# to build a .deb package:
apt-get install debhelper curl
make -j7 build-deb UBUNTU_RELEASE=trusty

centos7

yum install openssl-devel libcurl-devel wget tar m4 \
    git-core boost-static gcc-c++ npm ncurses-devel \
    which make ncurses-static zlib-devel zlib-static \
    protobuf-devel protobuf-static jemalloc-devel
yum install bzip2 patch
./configure --allow-fetch
make -j7

# to build an rpm package
yum install rubygems ruby-devel rpm-build
gem install fpm
./scripts/build-rpm.sh

centos8

yum install openssl-devel libcurl-devel wget tar m4 \
    git-core gcc-c++ which make python2 boost-devel \
    bzip2 patch clang
# Python 3 might work on 2.4 (which lacks npm dependency).
# Please let me know if it did.
alternatives --set python /usr/bin/python2
./configure --allow-fetch CXX=clang++
make -j7

# to build an rpm package
yum install perl rubygems ruby-devel rpm-build
gem install fpm

# In 2.3.x, since we need to use clang, we need a hack to
# work with the build-rpm.sh script.  (Or we could fix
# the script, and tag a new version 2.3.8.)

ln -s "$PWD"/build/release_clang build/release
CXX=clang++ ./scripts/build-rpm.sh

jessie

apt install sudo mg git
apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 g++ libssl-dev
./configure --allow-fetch
make -j7

stretch

apt install sudo mg git
apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev libjemalloc-dev wget m4 clang libssl1.0-dev
./configure --allow-fetch CXX=clang++
make -j7

buster

apt install git
apt install build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev wget m4 clang libssl-dev
./configure --allow-fetch CXX=clang++
make -j7

# to build a .deb package:
apt install debhelper curl
make -j7 build-deb DEB_RELEASE=buster

openSUSE tumbleweed

# Starting from openSUSE server edition
zypper install git-core clang8 gcc libopenssl-devel make \
    patch zlib-devel libcurl-devel
./configure --allow-fetch CXX=clang++
make -j7

Linux Mint 20

apt install git build-essential protobuf-compiler python \
    libprotobuf-dev libcurl4-openssl-dev libboost-all-dev \
    libncurses5-dev wget m4 clang libssl-dev

./configure --allow-fetch CXX=clang++
make -j7
END OF PAGE