a5f3e2f03f3d3361e3d2215893e97270e0a4dc5e
[folly.git] / README.md
1 Folly: Facebook Open-source LibrarY
2 -----------------------------------
3
4 Folly is an open-source C++ library developed and used at Facebook.
5
6 ###[Get Started](folly/docs/Overview.md)
7
8 Folly is published on Github at https://github.com/facebook/folly; for
9 discussions, there is a Google group at
10 https://groups.google.com/d/forum/facebook-folly.
11
12 Dependencies
13 ------------
14
15 folly requires gcc 4.8+ and a version of boost compiled with C++11 support.
16
17 Please download googletest from
18 https://googletest.googlecode.com/files/gtest-1.7.0.zip and unzip it in the
19 folly/test subdirectory.
20
21 Ubuntu 13.10
22 ------------
23
24 The following packages are required (feel free to cut and paste the apt-get
25 command below):
26
27 ```
28 sudo apt-get install \
29     g++ \
30     automake \
31     autoconf \
32     autoconf-archive \
33     libtool \
34     libboost-all-dev \
35     libevent-dev \
36     libdouble-conversion-dev \
37     libgoogle-glog-dev \
38     libgflags-dev \
39     liblz4-dev \
40     liblzma-dev \
41     libsnappy-dev \
42     make \
43     zlib1g-dev \
44     binutils-dev \
45     libjemalloc-dev \
46     libssl-dev
47 ```
48
49 Ubuntu 14.04 LTS
50 ----------------
51
52 The packages listed above for Ubuntu 13.10 are required, as well as:
53
54 ```
55 sudo apt-get install \
56     libiberty-dev
57 ```
58
59 The above packages are sufficient for Ubuntu 13.10 and Ubuntu 14.04.
60
61 In the folly directory, run
62 ```
63   autoreconf -ivf
64   ./configure
65   make
66   make check
67   sudo make install
68 ```
69
70 OS X
71 ----
72 There is a bootstrap script if you use Homebrew (http://brew.sh/). At the time
73 of writing (OS X Yosemite 10.10.1) the default compiler (clang) has some
74 issues building, but gcc 4.9.2 from Homebrew works fine. (This is taken care
75 of by the bootstrap script.)
76
77 ```
78   cd folly
79   ./bootstrap-osx-homebrew.sh
80   make
81   make check
82 ```
83
84 Other Linux distributions
85 -------------------------
86
87 - double-conversion (https://github.com/floitsch/double-conversion/)
88
89   Download and build double-conversion.
90   You may need to tell configure where to find it.
91
92   [double-conversion/] `ln -s src double-conversion`
93
94   [folly/] `./configure LDFLAGS=-L$DOUBLE_CONVERISON_HOME/ CPPFLAGS=-I$DOUBLE_CONVERISON_HOME/`
95
96   [folly/] `LD_LIBRARY_PATH=$DOUBLE_CONVERISON_HOME/ make`
97
98 - additional platform specific dependencies:
99
100   Fedora 17 64-bit
101     - gcc
102     - gcc-c++
103     - autoconf
104     - autoconf-archive
105     - automake
106     - boost-devel
107     - libtool
108     - lz4-devel
109     - lzma-devel
110     - snappy-devel
111     - zlib-devel
112     - glog-devel
113     - gflags-devel
114     - scons (for double-conversion)