首页 / 日志 / rocksdb 编译安装 日志
rocksdb 编译安装 日志
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了rocksdb 编译安装 日志,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2921字,纯文字阅读大概需要5分钟。
内容图文
![rocksdb 编译安装 日志](/upload/InfoBanner/zyjiaocheng/448/1f5952cc9ed947d196582d38dcc184e9.jpg)
Compilation
RocksDB‘s library should be able to compile without any dependency installed, although we recommend installing some compression libraries (see below). We do depend on newer gcc/clang with C++11 support.
There are few options when compiling RocksDB:
-
[recommended]
make static_lib
will compile librocksdb.a, RocksDB static library. -
make shared_lib
will compile librocksdb.so, RocksDB shared library. -
make check
will compile and run all the unit tests -
make all
will compile our static library, and all our tools and unit tests. Our tools depend on gflags. You will need to have gflags installed to runmake all
. -
By default the binary we produce is 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 our tools depend on:
- gflags - a library that handles command line flags processing. You can compile rocksdb library even if you don‘t have gflags installed.
Supported platforms
- Linux - Ubuntu
- Upgrade your gcc to version at least 4.7 to get C++11 support.
- Install gflags. First, try:
sudo apt-get install libgflags-dev
If this doesn‘t work and you‘re using Ubuntu, here‘s a nice tutorial: (http://askubuntu.com/questions/312173/installing-gflags-12-04) - Install snappy. This is 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 at 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
-
Install snappy:
wget https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz tar -xzvf snappy-1.1.1.tar.gz cd snappy-1.1.1 ./configure && make && sudo make install
-
Install zlib:
sudo yum install zlib sudo yum install zlib-devel
-
Install bzip2:
sudo yum install bzip2 sudo yum install bzip2-devel
- Upgrade your gcc to version at least 4.7 to get C++11 support:
-
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 in MacOS, you still need to run:
xcode-select --install
in your command line. - run
brew tap homebrew/dupes; brew install gcc47 --use-llvm
to install gcc 4.7 (or higher).
- If you‘re first time developer in MacOS, you still need to run:
- Update XCode: run
- run
brew install rocksdb
- Install latest C++ compiler that supports C++ 11:
-
iOS:
- Run:
TARGET_OS=IOS make static_lib
. When building the project which uses rocksdb iOS library, make sure to define two important pre-processing macros:ROCKSDB_LITE
andIOS_CROSS_COMPILE
.
- Run:
rocksdb 编译安装 日志
标签:
本文系统来源:http://www.cnblogs.com/archoncap/p/4518656.html
内容总结
以上是互联网集市为您收集整理的rocksdb 编译安装 日志全部内容,希望文章能够帮你解决rocksdb 编译安装 日志所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。