monotone

monotone Mtn Source Tree

Root/INSTALL

1building and installation process for monotone
2==============================================
3
41. prerequisites:
5
6 * hardware prerequisites:
7
8 - C++ compilers consume a lot of memory building monotone, due to
9 monotone's liberal use of C++ features. It may be possible to
10 build on a system with 128mb of memory, but not pleasant.
11
12 * software prerequisites:
13
14 - autoconf
15 - automake
16 - gettext
17 - a C++ compiler and library according to the C++11 standard. We
18 actively support g++ 4.6 and clang++ 3.3 or newer. Other C++11
19 compilers may work, but aren't currently tested.
20 - boost 1.35.0 or later: either an installed copy or an extracted
21 tarball of its unbuilt sources somewhere in the file system are
22 supported
23 - zlib 1.1.4 or later
24 - libiconv if the iconv() function is missing
25 - texinfo (to build the documentation)
26 - Botan 1.6.3 or later (Botan might require bzip2, OpenSSL and / or
27 GnuMP in addition, depending on the package you're using.)
28 - PCRE 7.4 or later
29 - SQLite 3.3.8 or later
30 - Lua 5.1
31 - GNU IDN Library
32
33 on Debian and Ubuntu:
34
35 install the following packages:
36 autoconf automake gettext g++ libboost1.35-dev libz-dev
37 libbotan1.10-dev libsqlite3-dev libpcre3-dev liblua5.2-dev
38 libidn11-dev libgmp3-dev libbz2-dev texinfo
39
40 (monotone works with older and newer Botan versions as well,
41 so libbotan1.6-dev or libbotan1.8-dev are also good to go.)
42
43 on FreeBSD:
44
45 install the following packages from the ports collection:
46 databases/sqlite3 devel/automake devel/boost devel/gettext
47 devel/gmake devel/pcre lang/lua security/botan110 dns/libidn
48
49 (monotone works with older and newer Botan versions as well,
50 so security/botan is also good to go.)
51
52 on OpenBSD:
53
54 install the following packages using 'pkg_add':
55 autoconf automake boost botan gmake libiconv libidn lua
56 pcre sqlite3
57
58 on NetBSD:
59
60 install the following packages:
61 autoconf automake boost-headers botan gmake gcc48
62 libiconv libidn lua pcre sqlite3
63
64 and make sure to actually use gcc-4.8 with a proper CXX
65 definition, for example: CXX=/usr/pkg/gcc48/bin/g++
66
67 on Gentoo:
68
69 emerge the following packages:
70 autoconf automake boost botan gettext libpcre libidn lua
71 sqlite zlib
72
73 on Fedora:
74
75 install the following packages:
76 autoconf automake gettext boost boost-devel zlib zlib-devel
77 lua lua-devel pcre pcre-devel sqlite sqlite-devel libidn
78 libidn-devel gcc-c++ texinfo texinfo-tex botan botan-devel
79
80 on RHEL or CentOS (before version 7):
81
82 In addition to the requirements for Fedora, above, you
83 will need a more recent C++ compiler. RedHat provides a
84 Developer Toolset. CentOS developer Tru Huynh kindly
85 offers a public repo here:
86 http://people.centos.org/tru/devtools-2/devtools-2.repo
87
88 The newer g++ compiler bundled by AdaCore are also known
89 to work.
90
91 on openSUSE:
92
93 install the following extra packages with YaST or zypper:
94 autoconf automake gettext-tools gcc-c++ boost-devel zlib-devel
95 libbotan-devel sqlite3-devel pcre-devel lua-devel libidn-devel
96 libbz2-devel texinfo make
97
98 on Mac OS X:
99
100 use MacPorts (http://www.macports.org) to install the
101 following packages:
102 autoconf automake gettext boost zlib lua pcre botan
103 sqlite3 libidn libiconv texinfo
104
105 Monotone only uses header-only libraries from boost, so if
106 you don't like to spend a lot of time building boost via
107 MacPorts, you can also download and extract it manually and
108 let CXXFLAGS point to the include directory of the
109 extracted version.
110
111 While monotone can be compiled on 'Mountain Lion' (10.8),
112 we recommend at least 'Mavericks' (10.9), because Apple
113 defaults to link against stdc++ before that version. On
114 'Mountain Lion', you can still compile monotone, but need
115 to make sure to use libc++ rather than stdlibc++, i.e. use
116 the following flags for monotone as well as botan and
117 libidna:
118 CXXFLAGS="-stdlib=libc++"
119 LDFLAGS="-lc++"
120
121 on Windows:
122
123 (using MinGW): see INSTALL_windows_mingw.txt
124 (using MinGW64 32 bit): see INSTALL_windows_msys2_mingw-32.txt
125 (using MinGW64 64 bit): see INSTALL_windows_msys2_mingw-64.txt
126 (using Cygwin): see INSTALL_windows_cygwin.txt
127 (Visual Studio is not really supported, but
128 INSTALL_windows_msvc.txt has some old hints)
129
130 on other systems:
131
132 Ensure you have a compiler supporting C++11. Check your
133 system package repository; you may need to build some of
134 these from source. if your package repository does not
135 contain the libraries, see:
136
137 http://gcc.gnu.org/ for g++
138 http://clang.llvm.org/ for clang++
139 http://www.boost.org/ for Boost
140 http://www.pcre.org/ for PCRE
141 http://www.lua.org/ for Lua
142 http://www.sqlite.org/ for SQLite
143 http://botan.randombit.net/ for Botan
144 http://www.gnu.org/software/libidn/ for GNU IDN
145
146 Most are C libraries, or used as such. And should therefore
147 be compatible between different compilers. Take care with
148 libidn and botan, as these are C++ libraries, meaning the
149 compiler used and standard library linked against all need
150 to match.
151
1521.1 using boost in the build process:
153
154 monotone uses the boost libraries in multiple parts of its code.
155 fortunately, it only uses the so-called header-only libraries: these
156 can be used very easily from other projects, as there is no need to
157 build them by hand prior usage.
158
159 therefore you can use an installed version of boost if shipped with your
160 distribution but, if you do not want to mess with the Boost.Build build
161 system (which is hard to deal with for beginners), you can simply use an
162 extracted copy of the boost sources. the two procedures are detailed
163 below:
164
165 * if your system already has the boost development libraries installed,
166 you must tell the compiler where to find them. their location will
167 usually be somewhere under /usr/include. try the following command:
168
169 ls -d /usr/include/boost*
170
171 if the command shows a single directory named 'boost', you do not have
172 to take any extra steps. configure will automatically find the
173 necessary files. instead, if the command shows a directory name of the
174 form boost_1_35_1, boost-1.35.1 or similar, you will have to pass that
175 to the configure script. do so as follows:
176
177 ./configure CPPFLAGS="-I/usr/include/boost-1.35.1"
178
179 if no directories are shown, look for prebuilt boost packages for your
180 system and install them. if there aren't any, resort to the procedure
181 described in the following point.
182
183 * if you do not have boost already installed, and you cannot easily
184 install it from prebuilt packages, fetch a copy of the boost sources
185 from their site (see previous section) and unpack them somewhere in
186 your system -- for example, your home directory. once done, tell the
187 configure script where the files are:
188
189 ./configure CPPFLAGS="-I${HOME}/boost-1.35.1"
190
191 it is important to note that, once monotone is built, you can get rid of
192 all the boost sources or boost development packages from your system.
193 the required header-only libraries will have been built into the final
194 binary, which will not rely on any binary boost library. in some sense,
195 you can think of it as static linkage.
196
1972. configuring monotone:
198
199 * if there is no ./configure script in your source tree you'll need
200 to create one before proceeding to the next step. one of the
201 following auto* commands should work:
202
203 $ aclocal-1.9 && autoreconf --install
204 $ AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf --install
205
206 If this fails early, check that you have gettext packages installed.
207
208 * type "./configure" for a basic configuration of monotone. several
209 configuration options are available; type "configure --help" for a
210 list of all of them. some special options are shown here:
211
212 --enable-ipv6[=auto|no|yes]
213
214 specify whether IPv6 support has to be enabled or disabled. the
215 default is to try automatic detection (auto) and use the guessed
216 results. however, you can force IPv6 detection by saying 'yes'
217 or completely disable it using 'no'.
218
219 --disable-nls
220
221 build a version of monotone without support for local message
222 catalogs. you might like to do this if you do not have a
223 working installation of GNU gettext.
224
225 --enable-pch
226
227 this will enable precompiled headers, which should improve compile
228 time. some versions of gcc have problems with this option, so
229 try disabling it if you run into trouble.
230
2313. building monotone
232
233 * type "make" to invoke GNU make (please notice it might be named
234 "gmake" on systems where system make is not GNU make).
235 this should produce a mtn binary in your current directory.
236 if not, please send a build log to
237 monotone-devel@nongnu.org with a description of the failure.
238
2394. testing monotone
240
241 * there is a "make check" target which you can try, if you'd like to
242 confirm monotone's functionality on your system.
243 Do not run "make check" as root (Unix)! Doing so will cause the
244 failure of some of the tests!
245 Also, make sure your testing process has enough memory. Experience
246 has shown that some tests may fail "mysteriously" when there is too
247 little memory. A possible hint is that 128MB was too little on
248 FreeBSD 6 on x86 while 256MB was enough.
249
250 You might also like to try fetching monotone's sources from our
251 monotone server. this process will transfer the complete development
252 history to your database, and you will then be free to share it with
253 others or make changes and submit them to us:
254
255 mtn clone 'mtn://code.monotone.ca/monotone?net.venge.monotone'
256
2575. upgrading
258
259 * if you have an existing monotone installation, you may need to
260 perform some additional steps to migrate your data to the newest
261 version; see the file UPGRADE for details.
262

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status