标签:
安装环境:
系统CentOS 6.2,gcc 4.3.2版本不足以安装(缺少constexpr),避免浪费时间,通过yum安装gcc 4.8.2的。
参考:http://blog.sina.com.cn/s/blog_48c95a190101b041.html
1、安装boost,主要依赖CPU Timer, 或者可以使用 ./b2 toolset=gcc cxxflags="-std=c++11"
wget http://nchc.dl.sourceforge.net/project/boost/boost/1.50.0/boost_1_50_0.tar.bz2
tar zjvf boost_1_50_0.tar.bz2
./bootstrap.sh --with-libraries=system,filesystem,log,thread,timer --with-toolset=gcc
./b2 toolset=gcc ./b2 install --prefix=/usr
tar zxf glog-0.3.3.tar.gz mv glog-0.3.3 glog cd glog ./configure make -j 2
tar zxf gflags-2.0.tar.gz mv gflags-2.0 gflags cd gflags ./configure make -j 2
tar zxf protobuf-2.5.0.tar.gz mv protobuf-2.5.5 protobuf cd protobuf ./configure make -j 2
tar zxf re2-20130115.tgz mv re2-20130115 re2 #这步貌似没有 cd re2 make -j 2
make install #避免后面link找不到
tar zvf supersonic-0.9.4.tar.gz mv supersonic-0.9.4.tar.gz supersonic cd supersonic
export GLOG_CFLAGS=‘-I../glog/src‘ export GLOG_LIBS=‘-L../glog -lglog‘ export CPPFLAGS=$CPPFLAGS‘ -I../glog/src‘ export GFLAGS_CFLAGS=‘-I../gflags/src‘ export GFLAGS_LIBS=‘-L../gflags -lgflags‘ export CPPFLAGS=$CPPFLAGS‘ -I../gflags/src‘ export PROTO_CFLAGS=‘-I../protobuf/src‘ export PROTO_LIBS=‘-L../protobuf/src -lprotobuf‘ export CPPFLAGS=$CPPFLAGS‘ -I../protobuf/src‘ export PROTOC=$(readlink -f ../protobuf/src/protoc) SO_PATH=$(readlink -f ../re2/obj/so) && export LDFLAGS=$LDFLAGS‘ -L../re2/obj/so -Wl,-rpath -Wl,‘$SO_PATH export CPPFLAGS=$CPPFLAGS‘ -I../re2‘
CXXFLAGS = -funsigned-char -O3 -mmmx -msse -msse2 -std=c++11 -lrt
./configure make -j 2 make check
check就相当运行所有的用例(程序)
===================
All 15 tests passed
===================
如果check发生依赖库问题, 检测依赖路径
vi ~/.bash_profile
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/lib64:/lib:/lib64:/usr/local/lib:/usr/local/lib64 export LD_LIBRARY_PATH
source ~/.bash_profile
所有安装包附件:http://files.cnblogs.com/files/hero4china/aa.zip
标签:
原文地址:http://www.cnblogs.com/hero4china/p/google-supperionic.html