ROCKSDB Compiling the installation log

Source: Internet
Author: User

Compilation

Rocksdb ' s library should is able to compile without any dependency installed, although we recommend installing some Compre Ssion libraries (see below). We do depend on newer Gcc/clang and c++11 support.

There is few options when compiling ROCKSDB:

    • [Recommended] make static_lib Would compile LIBROCKSDB.A, rocksdb Static library.

    • make shared_libWould compile librocksdb.so, Rocksdb shared library.

    • make checkWould compile and run all the unit tests

    • make allWould compile our static library, and all our tools and unit tests. Our tools depend on gflags. You'll need to the gflags installed to run make all .

    • By default the binary we produce are optimized for the platform you ' re compiling on (-march=native). If you want to build a portable binary, add ' portable=1 ' before your make commands, like this:PORTABLE=1 make static_lib

Dependencies
    • You can link ROCKSDB with following compression libraries:

      • ZLIB-A Library for data compression.
      • BZIP2-A Library for data compression.
      • Snappy-a Library for fast data compression.
    • All we tools depend on:

      • GFLAGS-A library that handles command line flags processing. You can compile rocksdb the library even if you don't have gflags installed.
Supported platforms
  • linux-ubuntu
    • Upgrade your gcc to version on least 4.7 to get c++11 support.
    • Install gflags. First, try:  sudo apt-get install Libgflags-dev  if This doesn ' t work and your ' re using Ubuntu, here ' s A nice tutorial: (http://askubuntu.com/questions/312173/installing-gflags-12-04)
    • Install Snappy. This was usually as easy as:  sudo apt-get install Libsnappy-dev .
    • Install zlib. try:  sudo apt-get install Zlib1g-dev .
    • install bzip2:  sudo apt-get install Libbz2-dev .
  • linux-centos

    • Upgrade your gcc to version on least 4.7 to get c++11 support:  ; Yum install gcc47-c++
    • Install gflags:

        wget https://gflags.googlecode.com/files/gflags-2.0-no-svn-files.tar.gz Tar- XZVF gflags-2.0-no-svn-files.tar.gz cd gflags-2.0./configure && make && sudo make install  
      /li>
    • Install snappy:

        wget https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz tar-xzvf SNA ppy-1.1.1.tar.gz CD snappy-1.1.1./configure && make && sudo make install  
    • Ins Tall zlib:

        sudo yum install zlib sudo yum install zlib-devel  
    • Install bzip2:

        sudo yum install bzip2 sudo yum install bzip2-devel  
  • OS X:

    • Install latest C + + compiler that supports C + + 11:
      • Update xcode:run xcode-select --install (or install it from XCode App ' s settting).
      • Install via homebrew.
        • If you ' re first time developer on MacOS, you still need to run: in xcode-select --install your command line.
        • Run to brew tap homebrew/dupes; brew install gcc47 --use-llvm install GCC 4.7 (or higher).
    • Runbrew install rocksdb
  • IOS:

    • Run: TARGET_OS=IOS make static_lib . When building the project which uses Rocksdb IOS Library, make sure to define, important pre-processing macros: ROCKSDB_LITE and IOS_CROSS_COMPILE .

ROCKSDB Compiling the installation log

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.