rethinkdb on alpine s390x - levivic/zEcoTest GitHub Wiki
Building RethinkDB
RethinkDB is the open-source, scalable database that makes building realtime apps dramatically easier. Version 2.3.5 of RethinkDB has been built and tested on Linux on z Systems. The following instructions can be used for RHEL 7.3, SLES 12 SP2, Ubuntu 16.04 and Alpine 3.6.
General Note:
- 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
Building and Installing RethinkDB
Step 1: Install the Dependencies
- RHEL 7.3
yum update -y
yum groupinstall -y 'Development Tools'
yum install -y python openssl-devel libcurl-devel wget tar m4 git-core boost-static m4 gcc-c++ npm ncurses-devel which make ncurses-static zlib-devel zlib-static
- SLES 12 SP2
zypper update -y
zypper install -y gcc gcc-c++ make libopenssl-devel zlib-devel wget tar patch curl unzip autoconf automake libtool python python-xml python-curses libicu-devel git
- Install Protobuf as per recipe on RHEL 7.3 and SLES 12 SP2 with following modifications
Protobuf version 2.6.1 is required to be checked out
git checkout v2.6.1
Modify ./protobuf/autogen.sh
as follows
@@ -19,8 +19,8 @@ fi
# directory is set up as an SVN external.
if test ! -e gtest; then
echo "Google Test not present. Fetching gtest-1.5.0 from the web..."
- curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
- mv gtest-1.5.0 gtest
+ curl -L https://github.com/google/googletest/archive/release-1.5.0.tar.gz | tar zx
+ mv googletest-release-1.5.0 gtest
fi
set -ex
- Ubuntu 16.04
sudo apt-get update
sudo apt-get install -y build-essential protobuf-compiler python libprotobuf-dev libcurl4-openssl-dev libboost-all-dev libncurses5-dev libjemalloc-dev wget m4 libssl-dev git
- Alpine 3.6
apk update
apk add gcc g++ protobuf-dev jemalloc-dev boost-dev libssh2 openssl-dev python curl-dev libexecinfo-dev make wget tar patch curl unzip autoconf automake libtool icu-dev git bsd-compat-headers m4 paxmark unzip vim
Step 2: Clone and build RethinkDB
cd /<source root>/
git clone https://github.com/linux-on-ibm-z/rethinkdb.git --branch v2.3.5-s390x
cd rethinkdb/
- RHEL 7.3, SLES 12 SP2, Ubuntu 16.04
./configure --allow-fetch
make -j 4
- Alpine 3.6
Make change to mk/support/pkg/v8.sh
@@ -34,9 +34,10 @@ pkg_install-include () {
# for s390x we need to generate correct header files
cd $build_dir
export PATH=$(pwd)/depot_tools:$PATH
+ export CXXFLAGS="-fno-delete-null-pointer-checks"
#cd v8z
make dependencies
- make s390x -j4 library=static
+ make s390x -j4 werror=no snapshot=off library=static
#s390x cp -RL "$src_dir/include/." "$install_dir/include"
cp -RL "$build_dir/include/." "$install_dir/include"
@@ -97,7 +98,7 @@ pkg_install () {
pkg_link-flags () {
# These are the necessary libraries recommended by the docs:
# https://developers.google.com/v8/get_started#hello
- for lib in libv8_{base,libbase,snapshot,libplatform}; do
+ for lib in libv8_{base,libbase,nosnapshot,libplatform}; do
echo "$install_dir/lib/$lib.a"
done
for lib in libicu{i18n,uc,data}; do
Make changes to src/arch/runtime/coroutines.hpp
@@ -17,7 +17,7 @@
// Enable cross-coroutine backtraces in debug mode, or when coro profiling is enabled.
// We don't enable it on ARM, because taking backtraces currently isn't working
// reliably and sometimes causes crashes.
-#if (!defined(NDEBUG) && !defined(__MACH__) && !defined(__arm__)) \
+#if (!defined(NDEBUG) && !defined(__MACH__) && !defined(__arm__)) && !defined(__s390x__) \
|| defined(ENABLE_CORO_PROFILER)
#define CROSS_CORO_BACKTRACES 1
#endif
Make changes to src/unittest/utils_test.cc
@@ -68,7 +68,7 @@ TEST(UtilsTest, TimeLocal) {
_putenv("TZ=UTC+7"); // TODO WINDOWS: this seems wrong, but causes the test to pass
_tzset();
#else
- setenv("TZ", "America/Los_Angeles", 1);
+ setenv("TZ", "PST8PDT", 1);
tzset();
#endif
Then
./configure --allow-fetch LDFLAGS=-lexecinfo
make -j 4
Note: make -j 4
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. Also note that the current porting on Alpine doesn't pass all unit tests due to the implementation of backtrace
in a third party library libexecinfo. For the same reason, the following Step 3 and 4 may also not apply.
Step 3: Install RethinkDB
sudo make install
Step 4: Start RethinkDB server
rethinkdb --bind all
(Optional) Testing RethinkDB
Execute Unit Tests
cd /<source root>/rethinkdb
make -j 4 DEBUG=1
./test/run unit -j 4
Note: ./test/run unit -j 4
will execute up to 4 unit tests in parallel. This number may be increased or decreased to match the resources available on the machine.
Execute Integration Tests
cd /<source root>/rethinkdb
./test/run -j 4
Note: There is a known failure when running test cases of type FAIL regression.known_failures_1774. This can be safely ignored.