下载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
今天的文章folly库的安装分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/9299.html