Dependencies
Speedb's library should be able to compile without any dependency installed.
Although we recommend installing some compression libraries:
zlib - for data compression
bzip2 - for data compression
lz4 - for extremely fast data compression
snappy - for fast data compression
zstandard - for fast real-time compression algorithms
All of our tools depend on gflags. This is a library that handles command line flag processing. Note that this is only required for building the tools, and that you can compile the Speedb library even if you don't have gflags installed.
make check
will also check code formatting, which requires clang-formatTo build the RocksJava static target, then CMake is required for building Snappy
If you want to run microbench (e.g,
make microbench
,make ribbon_bench
orcmake -DWITH_BENCHMARK=1
), Google benchmark >= 1.6.0 is needed.
Prerequisites:
gcc/clang with C++17 support (GCC >= 7, Clang >= 5).
Note: By default, the binary we produce is optimized for the platform you're compiling on (-march=native
or the equivalent).
Note: SSE4.2 will be enabled automatically if your CPU supports it.
Note: To print a warning if your CPU doesn't support SSE4.2, build with USE_SSE=1 make static_lib
or, if using CMake, cmake -DFORCE_SSE42=ON
.
If you want to build a portable binary, add PORTABLE=1
before your make commands, as follows: PORTABLE=1 make static_lib
, or cmake -DPORTABLE=1
if using CMake.
Supported Platforms
Linux - Ubuntu
Upgrade your gcc to version at least 7 to get C++17 support
Install gflags: First, try
sudo apt-get install libgflags-dev
If this doesn't work and you're using Ubuntu, here's a good tutorial: (http://askubuntu.com/questions/312173/installing-gflags-12-04)Install Snappy: This is usually done easily by running:
sudo apt-get install libsnappy-dev
.Install zlib: Try
sudo apt-get install zlib1g-dev
Install bzip2:
sudo apt-get install libbz2-dev
Install lz4:
sudo apt-get install liblz4-dev
Install zstandard:
sudo apt-get install libzstd-dev
Linux - CentOS / RHEL
Upgrade your gcc to version to at least 7 in order to get C++17 support
Install gflags:
Notice: Once installed, add the include path for gflags to your
CPATH
environment variable and the lib path toLIBRARY_PATH
. If installed with default settings, the include path will be/usr/local/include
and the lib path will be/usr/local/lib
Install Snappy:
Install zlib:
Install bzip2:
Install lz4:
Install ASAN (optional for debugging):
Install zstandard:
With EPEL:
With CentOS 8:
From source:
OS X
Install the latest C++ compiler that supports C++ 17:
Update XCode: Run
xcode-select --install
(or install it from XCode App's settting).Install via homebrew:
If you're first time developer in MacOS, you still need to run:
xcode-select --install
in your command line.Run
brew tap homebrew/versions; brew install gcc7 --use-llvm
to install gcc 7 (or higher).
Windows (Visual Studio 2017 to up)
Read and follow the instructions at CMakeLists.txt
Last updated