folly库的安装

下载folly

https://github.com/facebook/folly

  cd ~
  git clone https://github.com/facebook/folly.git

一,Requirements

folly需要gcc 4.9+ 以及C ++ 14支持编译的boost

    gcc版本查询

gcc --version 

 发现已经安装gcc 5.4.0

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

   boost安装

https://stackoverflow.com/questions/12578499/how-to-install-boost-on-ubuntu

 sudo apt-get install libboost-all-dev
 dpkg -S /usr/include/boost/version.hpp
 cd ~
 git clone https://github.com/facebook/folly.git

boost版本查看

dpkg -S /usr/include/boost/version.hpp

googletest用于folly的运行和检测。

    下载和安装googletest位于folly的test子目录中。

 cd folly/folly/test
 wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz && \
 tar zxf release-1.8.0.tar.gz && \
 rm -f release-1.8.0.tar.gz && \
 cd googletest-release-1.8.0 && \
 cmake configure . && \
 sudo make && \
 sudo make install 

二,Packages

sudo apt-get install \
    g++ \
    cmake \
    libboost-all-dev \
    libevent-dev \
    libdouble-conversion-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libiberty-dev \
    liblz4-dev \
    liblzma-dev \
    libsnappy-dev \
    make \
    zlib1g-dev \
    binutils-dev \
    libjemalloc-dev \
    libssl-dev \
    pkg-config

    补充debug包

sudo apt-get install \
    libunwind8-dev \
    libelf-dev \
    libdwarf-dev

三,编译

  cd folly
  mkdir _build && cd _build
  cmake configure ..
  make -j $(nproc)
  make install

 

 

 

 

 

 

你可能感兴趣的:(Surround360)