Speedb's library should be able to compile without any dependency installed.
Although we recommend installing some compression libraries:
- 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.
- To build the RocksJava static target, then CMake is required for building Snappy
- If you want to run microbench (e.g,
cmake -DWITH_BENCHMARK=1), Google benchmark >= 1.6.0 is needed.
- 1.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=nativeor 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_libor, if using CMake,
If you want to build a portable binary, add
PORTABLE=1before your make commands, as follows:
PORTABLE=1 make static_lib, or
cmake -DPORTABLE=1if using CMake.
- Upgrade your gcc to version at least 7 to get C++17 support
- Install gflags: First, try
sudo apt-get install libgflags-devIf 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
- Upgrade your gcc to version to at least 7 in order to get C++17 support
- Install gflags:git clone https://github.com/gflags/gflags.gitcd gflagsgit checkout v2.0./configure && make && sudo make installNotice: Once installed, add the include path for gflags to your
CPATHenvironment variable and the lib path to
LIBRARY_PATH. If installed with default settings, the include path will be
/usr/local/includeand the lib path will be
- Install Snappy:sudo yum install snappy snappy-devel
- Install zlib:sudo yum install zlib zlib-devel
- Install bzip2:sudo yum install bzip2 bzip2-devel
- Install lz4:sudo yum install lz4-devel
- Install ASAN (optional for debugging):sudo yum install libasan
- Install zstandard:
- With CentOS 8:sudo dnf install libzstd-devel
- From source:wget https://github.com/facebook/zstd/archive/v1.1.3.tar.gzmv v1.1.3.tar.gz zstd-1.1.3.tar.gztar zxvf zstd-1.1.3.tar.gzcd zstd-1.1.3make && sudo make install
- 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 --installin your command line.
brew tap homebrew/versions; brew install gcc7 --use-llvmto install gcc 7 (or higher).