]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/install.itely
Merge branch 'master' into lilypond/translation
[lilypond.git] / Documentation / user / install.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond-program.tely
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @ifclear INSTALL
11 @node Install
12 @chapter Install
13 @end ifclear
14
15 @c  I don't know what this comment does.  Remove?  -gp
16 @ignore
17 @h tml
18 <a name="download-source">
19 @e nd html
20 @end ignore
21
22 There are two sets of releases for LilyPond: stable releases, and
23 unstable development releases.  Stable versions have an even-numbered
24 @q{minor} version number (i.e. 2.8, 2.10, 2.12, etc).  Development
25 versions have an odd-numbered @q{minor} version number (i.e. 2.7, 2.9,
26 2.11, etc).
27
28 Building LilyPond is a very involved process, so we @strong{highly}
29 recommend using the precompiled binaries.
30
31 @menu
32 * Precompiled binaries::        
33 * Compiling from source::       
34 @end menu
35
36
37 @node Precompiled binaries
38 @section Precompiled binaries
39
40 @subsection Downloading
41
42 Check out @uref{http://lilypond.org/web/install/} for up to date
43 information on binary packages for your platform.  If your operating
44 system is not covered on that general page, please see the complete list
45 at @uref{http://download.linuxaudio.org/lilypond/binaries/}
46
47 We currently create binaries for
48
49 @example
50 MacOSX-ppc
51 MacOSX-x86
52 freebsd-64
53 freebsd-x86
54 linux-64
55 linux-arm
56 linux-ppc
57 linux-x86
58 win32-x86
59 @end example
60
61
62 @c TRANSLATORS:
63 @c   Please **do not** translate anything below this line.  Users
64 @c   should not be compiling LilyPond themselves; if they really 
65 @c   want to do so, they should be able to read the English docs,
66 @c   because they'll probably need to ask questions in English
67 @c   on the -devel list.   -gp
68
69 @node Compiling from source
70 @section Compiling from source
71
72 @menu
73 * Downloading source code::     
74 * Requirements::                
75 * Building LilyPond::           
76 * Building documentation without compiling LilyPond::  
77 * Testing LilyPond::            
78 * Problems::                    
79 @end menu
80
81 @node Downloading source code
82 @subsection Downloading source code
83
84 Download source
85
86 @itemize @bullet
87 @item tarballs from
88 @uref{http://lilypond.org/download/} by HTTP.
89 @item tarballs from
90 @uref{http://download.linuxaudio.org/lilypond/} by HTTP.
91 @item 
92 GIT from @uref{http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary,git.sv.gnu.org}
93
94 @example
95 git clone git://git.sv.gnu.org/lilypond.git
96 @end example
97
98 The repository does not contain generated files.  To create
99 @file{configure}, run
100 @example
101 ./autogen.sh
102 @end example
103 @end itemize
104
105 For information on packaging, see @uref{http://lilypond.org/devel}.
106
107
108 @node Requirements
109 @subsection Requirements
110
111 @unnumberedsubsubsec Compilation
112
113 In addition to the packages needed for running Lilypond (see below), you
114 need the following extra packages for building.
115
116 When installing a binary package FOO, you may need to install the
117 FOO-devel, libFOO-dev or FOO-dev package too.
118
119 @itemize
120
121 @item @uref{http://fontforge.sf.net/,FontForge} 20060125 or newer.
122
123 @item New Century Schoolbook fonts, as PFB files. These are shipped with
124 X11 and Ghostscript, and are named @file{c059033l.pfb}
125 @file{c059036l.pfb}, @file{c059013l.pfb} and @file{c059016l.pfb}
126
127 @item @uref{http://www.xs4all.nl/~hanwen/mftrace/,mftrace} (1.1.19 or
128 newer); you may need to install some additional packages to get mftrace
129 to work.
130
131 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE} (version
132 1.8.2 or newer).  If you are installing binary packages, you may need to
133 install guile-devel or guile-dev or libguile-dev too.
134
135 @item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.8 or newer).
136
137 @item @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 4.x or
138 newer). 
139
140 @item @uref{http://www.python.org,Python} (version 2.4 or newer)
141
142 @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer).
143
144 @item @uref{http://www.gnu.org/software/gettext/gettext.html,gettext}.
145
146 @item @uref{http://www.gnu.org/software/flex/,Flex} 
147
148 @item @uref{http://www.perl.org/,Perl} 
149
150 @item @uref{http://www.gnu.org/software/flex/,GNU Bison} 
151
152 @item All packages required for running, including development packages with
153 header files and libraries.
154
155 @end itemize
156
157
158 @unnumberedsubsubsec Running requirements
159
160 Running LilyPond requires proper installation of the following software
161
162 @itemize @bullet
163
164 @item @uref{http://www.freetype.org/,Freetype} (version 2.1.10 or newer).
165 @item @uref{http://www.freetype.org/,FontConfig} (version 2.2).
166 @item @uref{http://www.pango.org/,Pango} (version 1.12 or newer).
167 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
168 (version 1.8.2 or newer), or patch 1.8.1 with
169 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch}.
170 @item @uref{http://www.python.org,Python} (version 2.4 or newer).
171 @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or
172 newer. 8.50 recommended)
173 @item Dejaview.  (This is normally installed by default)
174 @end itemize
175
176 International fonts are required to create music with international text
177 or lyrics.
178
179
180 @unnumberedsubsubsec Building documentation
181
182 You can view the documentation online at
183 @uref{http://lilypond.org/doc/}, but you can also build it locally.
184 This process requires a successful compile of lilypond.  The
185 documentation is built by issuing
186
187 @example
188 make web
189 @end example
190
191 Building the website requires some additional tools and packages
192
193 @itemize @bullet
194 @item The @uref{http://netpbm.sourceforge.net/,netpbm utilities}
195 @item ImageMagick
196 @item International fonts (see input/regression/utf-8.ly for hints
197 about which font packages are necessary for your platform)
198 @item Ghostscript, 8.50 with the patch from
199 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688154}
200 and the patch from
201 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688017}.
202 @end itemize
203
204 The HTML files can be installed into the standard documentation path
205 by issuing
206
207 @example
208 make out=www web-install
209 @end example
210
211
212 @node Building LilyPond
213 @subsection Building LilyPond
214
215 @unnumberedsubsubsec Compiling
216
217 To install GNU LilyPond, type
218
219 @example
220 gunzip -c lilypond-x.y.z | tar xf -
221 cd lilypond-x.y.z
222 ./configure             # run with --help for applicable options
223 make
224 make install
225 @end example
226
227 If you are not root, you should choose a @code{--prefix} argument that
228 points into your home directory, e.g.
229
230 @example
231 ./configure --prefix=$HOME/usr
232 @end example
233
234
235 @unnumberedsubsubsec Compiling for multiple platforms
236
237 If you want to build multiple versions of LilyPond with different
238 configuration settings, you can use the @code{--enable-config=CONF}
239 option of configure.  You should use @samp{make conf=CONF} to generate
240 the output in @file{out-CONF}.  Example: Suppose you want to build
241 with and without profiling, then use the following for the normal
242 build
243
244 @example
245 ./configure --prefix=$HOME/usr/ --enable-checking
246 make
247 make install
248 @end example
249
250 and for the profiling version, specify a different configuration
251
252 @example
253 ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
254 make conf=prof
255 make conf=prof install
256 @end example
257
258
259 @node Building documentation without compiling LilyPond
260 @subsection Building documentation without compiling LilyPond
261
262 The documentation can be built locally without compiling lilypond from
263 scratch.
264
265 From a fresh git checkout, do
266
267 @example
268 ./autogen.sh   % ignore any warning messages
269 cp GNUmakefile.in GNUmakefile
270 make -C python
271 nice make LILYPOND_EXTERNAL_BINARY=/path/to/bin/lilypond web
272 % change the lilypond directory as appropriate
273 @end example
274
275 Please note that this may break sometimes -- for example, if a new
276 feature is added with a test file in input/regression, even the latest
277 unstable Lily will fail to build the docs.
278
279 You may build the manual ( Documentation/user/ ) without building all
280 the input/* stuff.
281
282
283 @node Testing LilyPond
284 @subsection Testing LilyPond
285
286 @html
287 <a name="testing"></a>
288 @end html
289
290 LilyPond comes with an extensive suite that exercises the entire
291 program. This suite can be used to automatically check the impact of a
292 change. This is done as follows
293
294 @example
295 make test-baseline
296 @emph{## apply your changes, compile}
297 make check
298 @end example
299
300 This will leave an HTML page @file{out/test-results/index.html}.  This
301 page shows all the important differences that your change introduced,
302 whether in the layout, MIDI, performance or error reporting.
303
304 To rerun tests, use
305
306 @example
307 make test-redo           @emph{## redo files differing from baseline}
308 make test-clean          @emph{## remove all test results}
309 @end example
310
311 @noindent
312 and then run @code{make check} again.
313
314 For tracking memory usage as part of this test, you will need GUILE
315 CVS; especially the following patch:
316 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch}.
317
318 For checking the coverage of the test suite, do the following
319
320 @example
321 ./buildscripts/build-coverage.sh
322 @emph{# uncovered files, least covered first}
323 python ./buildscripts/coverage.py  --summary out-cov/*.cc
324 @emph{# consecutive uncovered lines, longest first} 
325 python ./buildscripts/coverage.py  --uncovered out-cov/*.cc
326 @end example
327
328
329 @node Problems
330 @subsection Problems
331
332 For help and questions use @email{lilypond-user@@gnu.org}.  Send bug
333 reports to @email{bug-lilypond@@gnu.org}.
334
335 Bugs that are not fault of LilyPond are documented here.
336
337 @unnumberedsubsubsec Bison 1.875
338
339 There is a bug in bison-1.875: compilation fails with "parse error
340 before `goto'" in line 4922 due to a bug in bison. To fix, please
341 recompile bison 1.875 with the following fix
342
343 @example
344 $ cd lily; make out/parser.cc
345 $ vi +4919 out/parser.cc
346 # append a semicolon to the line containing "__attribute__ ((__unused__))
347 # save
348 $ make
349 @end example
350
351
352 @unnumberedsubsubsec Solaris
353
354 Solaris7, ./configure
355
356 @file{./configure} needs a POSIX compliant shell.  On Solaris7,
357 @file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
358 is.  Run configure like
359
360 @example
361 CONFIG_SHELL=/bin/ksh ksh -c ./configure
362 @end example
363
364 @noindent
365 or
366
367 @example
368 CONFIG_SHELL=/bin/bash bash -c ./configure
369 @end example
370
371 @unnumberedsubsubsec FreeBSD
372
373 To use system fonts, dejaview must be installed.  With the default
374 port, the fonts are installed in @file{usr/X11R6/lib/X11/fonts/dejavu}.
375
376 Open the file @file{$LILYPONDBASE/usr/etc/fonts/local.conf} and add the
377 following line just after the @code{<fontconfig>} line.  (Adjust as necessary
378 for your hierarchy.)
379
380 @example
381 <dir>/usr/X11R6/lib/X11/fonts</dir>
382 @end example
383
384
385 @unnumberedsubsubsec International fonts
386
387 On MacOs X, all fonts are installed by default.  However, finding all
388 system fonts requires a bit of configuration; see
389 @uref{http://lists.gnu.org/archive/html/lilypond-user/2007-03/msg00472.html,
390 this post} on the @code{lilypond-user} mailing list.
391
392 On Linux, international fonts are installed by different means on
393 every distribution.  We cannot list the exact commands or packages
394 that are necessary, as each distribution is different, and the exact
395 package names within each distribution changes.  Here are some
396 hints, though:
397
398 @verbatim
399 Red Hat Fedora
400
401     taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
402          ttfonts-zh_CN fonts-ja fonts-hebrew 
403
404 Debian GNU/Linux
405
406    apt-get install emacs-intl-fonts xfonts-intl-.* \
407         ttf-kochi-gothic ttf-kochi-mincho \
408         xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi 
409 @end verbatim
410