]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/install.itely
be781c96262be121449fffe9f4cedaa9e3701630
[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 @c \version "2.11.51"
11
12 @ifclear INSTALL
13 @node Install
14 @chapter Install
15 @end ifclear
16
17 There are two sets of releases for LilyPond: stable releases, and
18 unstable development releases.  Stable versions have an even-numbered
19 @q{minor} version number (i.e. 2.8, 2.10, 2.12, etc).  Development
20 versions have an odd-numbered @q{minor} version number (i.e. 2.7, 2.9,
21 2.11, etc).
22
23 Building LilyPond is a very involved process, so we @strong{highly}
24 recommend using the precompiled binaries.
25
26 @menu
27 * Precompiled binaries::        
28 * Compiling from source::       
29 @end menu
30
31
32 @node Precompiled binaries
33 @section Precompiled binaries
34
35 @unnumberedsubsec Downloading
36
37 Check out @uref{http://lilypond.org/web/install/} for up to date
38 information on binary packages for your platform.  If your operating
39 system is not covered on that general page, please see the complete list
40 at @uref{http://download.linuxaudio.org/lilypond/binaries/}
41
42 We currently create binaries for
43
44 @example
45 darwin-ppc  - MacOS X powerpc
46 darwin-x86  - MacOS X intel
47 freebsd-64  - FreeBSD 6.x, x86_64
48 freebsd-x86 - FreeBSD 4.x, x86
49 linux-64    - Any GNU/Linux distribution, x86_64
50 linux-arm   - Any GNU/Linux distribution, arm
51 linux-ppc   - Any GNU/Linux distribution, powerpc
52 linux-x86   - Any GNU/Linux distribution, x86
53 mingw       - Windows x86
54 @end example
55
56
57 @node Compiling from source
58 @section Compiling from source
59
60 @ignore
61 You can also compile LilyPond directly from the source code. This
62 requires that you can read English, so this section is not
63 translated.  If you really want to compile LilyPond, see
64 @iftex
65 @c DO NOT translate the following line at all.
66 @ref{Compiling from source,,,lilypond-program,Application Usage}.
67 @end iftex
68 @ifhtml
69 @c Please translate the following line (but not the .html file name)
70 the @uref{Compiling-from-source.html,documentation in English}.
71 @end ifhtml
72 @end ignore
73
74 @c TRANSLATORS:
75 @c   Please **do not** translate anything below this line.  Users
76 @c   should not be compiling LilyPond themselves; if they really 
77 @c   want to do so, they should be able to read the English docs,
78 @c   because they'll probably need to ask questions in English
79 @c   on the -devel list.   -gp
80 @c Instead, please uncomment and translate the paragraph above,
81 @c and remove all stuff (menu, nodes, contents) below this line.
82
83 @menu
84 * Downloading source code::     
85 * Requirements::                
86 * Building LilyPond::           
87 * Building documentation::      
88 * Testing LilyPond::            
89 * Problems::                    
90 @end menu
91
92 @node Downloading source code
93 @subsection Downloading source code
94
95 Download source
96
97 @itemize
98 @item tarballs from
99 @uref{http://lilypond.org/download/} by HTTP.
100 @item tarballs from
101 @uref{http://download.linuxaudio.org/lilypond/} by HTTP.
102 @item 
103 GIT from @uref{http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary,git.sv.gnu.org}
104
105 @example
106 git clone git://git.sv.gnu.org/lilypond.git
107 @end example
108
109 The repository does not contain generated files.  To create
110 @file{configure}, run
111 @example
112 ./autogen.sh
113 @end example
114 @end itemize
115
116 For information on packaging, see @uref{http://lilypond.org/devel}.
117
118
119 @node Requirements
120 @subsection Requirements
121
122 @unnumberedsubsubsec Compilation
123
124 In addition to the packages needed for running LilyPond (see below), you
125 need the following extra packages for building.
126
127 When installing a binary package FOO, you may need to install the
128 FOO-devel, libFOO-dev or FOO-dev package too.
129
130 @itemize
131
132 @item @uref{http://fontforge.sf.net/,FontForge} 20060125 or newer.
133
134 @item @uref{http://metafont.tutorial.free.fr/,MetaFont} (mf-nowin, mf, mfw or 
135 mfont binaries) and @uref{http://cm.bell-labs.com/who/hobby/MetaPost.html,MetaPost}
136 (mpost binary), usually packaged with a @LaTeX{} distribution like
137 tetex or texlive.
138
139 @item @uref{http://www.lcdf.org/~eddietwo/type/#t1utils,t1utils}
140 (version 1.33 or newer recommended).
141
142 @item New Century Schoolbook fonts, as PFB files.  These are shipped with
143 X11 and Ghostscript, and are named @file{c059033l.pfb}
144 @file{c059036l.pfb}, @file{c059013l.pfb} and @file{c059016l.pfb}.
145
146 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE} (version
147 1.8.2 or newer).  If you are installing binary packages, you may need to
148 install guile-devel or guile-dev or libguile-dev too.
149
150 @item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.11 or newer).
151
152 @item @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 3.4 or
153 newer.  4.x is strongly recommended).
154
155 @item @uref{http://www.python.org,Python} (version 2.4 or newer)
156
157 @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer).
158
159 @item @uref{http://www.gnu.org/software/gettext/gettext.html,gettext}.
160
161 @item @uref{http://www.gnu.org/software/flex/,Flex}.
162
163 @item @uref{http://www.perl.org/,Perl}.
164
165 @item @uref{http://www.gnu.org/software/flex/,GNU Bison}.
166
167 @item All packages required for running, including development packages with
168 header files and libraries.
169
170 @end itemize
171
172
173 @unnumberedsubsubsec Running requirements
174
175 Running LilyPond requires proper installation of the following software
176
177 @itemize
178
179 @item @uref{http://www.freetype.org/,Freetype} (version 2.1.10 or newer).
180 @item @uref{http://www.freetype.org/,FontConfig} (version 2.2).
181 @item @uref{http://www.pango.org/,Pango} (version 1.12 or newer).
182 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
183 (version 1.8.2 or newer), or patch 1.8.1 with
184 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch}.
185 @item @uref{http://www.python.org,Python} (version 2.4 or newer).
186 @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or
187 newer. 8.50 recommended)
188 @item Dejaview.  (This is normally installed by default)
189 @end itemize
190
191 International fonts are required to create music with international text
192 or lyrics.
193
194
195 @unnumberedsubsubsec Requirements for building documentation
196
197 You can view the documentation online at
198 @uref{http://lilypond.org/doc/}, but you can also build it locally.
199 This process requires a successful compile of LilyPond, and some
200 additional tools and packages:
201
202 @itemize
203 @item The @uref{http://netpbm.sourceforge.net/,netpbm utilities}
204 @item ImageMagick
205 @item International fonts (see input/regression/utf-8.ly for hints
206 about which font packages are necessary for your platform)
207 @item Ghostscript, 8.50 with the patch from
208 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688154}
209 and the patch from
210 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688017}, or use
211 a release of Ghostscript which includes these patches, for example
212 8.60 or newer.
213 @item @uref{http://www.nongnu.org/texi2html/,Texi2HTML} 1.79 or newer
214 is strongly recommended to build documentation in HTML; support for
215 building HTML documentation using @command{makeinfo} from GNU Texinfo
216 is deprecated.
217 @end itemize
218
219
220 @node Building LilyPond
221 @subsection Building LilyPond
222
223 @unnumberedsubsubsec Compiling
224
225 To install GNU LilyPond, type
226
227 @example
228 gunzip -c lilypond-x.y.z | tar xf -
229 cd lilypond-x.y.z
230 ./configure             # run with --help for applicable options
231 make
232 su -c 'make install'
233 @end example
234
235 @noindent
236 If you are not root, you should choose a @code{--prefix} argument that
237 points into your home directory, e.g.
238
239 @example
240 ./configure --prefix=$HOME/usr
241 @end example
242
243
244 @unnumberedsubsubsec Compiling for multiple platforms
245
246 If you want to build multiple versions of LilyPond with different
247 configuration settings, you can use the @code{--enable-config=CONF}
248 option of @command{configure}.  You should use @code{make conf=CONF}
249 to generate the output in @file{out-CONF}.  For example, suppose you
250 want to build with and without profiling, then use the following for
251 the normal build
252
253 @example
254 ./configure --prefix=$HOME/usr/ --enable-checking
255 make
256 make install
257 @end example
258
259 and for the profiling version, specify a different configuration
260
261 @example
262 ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
263 make conf=prof
264 make conf=prof install
265 @end example
266
267
268 @unnumberedsubsubsec Compiling outside the source tree
269
270 It is possible to compile LilyPond in a build tree different from the
271 source tree, with @code{--srcdir} option of @command{configure}:
272
273 @example
274 mkdir lily-build && cd lily-build
275 @var{sourcedir}/configure --srcdir=@var{sourcedir}
276
277 @end example
278
279
280 @unnumberedsubsubsec Useful @command{make} variables
281
282 If a less verbose build output if desired, the variable
283 @code{QUIET_BUILD} may be set to @code{1} on @command{make} command
284 line, or in @file{local.make} at top of the build tree.
285
286
287 @node Building documentation
288 @subsection Building documentation
289
290 This requires a successful compile of LilyPond, or using an external
291 LilyPond binary.
292
293 @menu
294 * Commands for building documentation:: Compiling and installing the documentation.
295 * Building documentation without compiling LilyPond:: Using a LilyPond binary already installed.
296 @end menu
297
298 @node Commands for building documentation
299 @unnumberedsubsubsec Commands for building documentation
300
301 The documentation is built by issuing
302
303 @example
304 make web
305 @end example
306
307 After compilation, the HTML documentation tree is available in
308 @file{out-www/offline-root/}, and can be browsed locally.
309
310 The HTML and PDF files can be installed into the standard documentation
311 path by issuing
312
313 @example
314 make web-install
315 @end example
316
317 @noindent
318 This also installs Info documentation with images if the installation
319 prefix is properly set; otherwise, instructions for manual installation
320 of Info documentation are printed on standard output.
321
322 It is also possible to build a documentation tree in
323 @file{out-www/online-root/}, with special processing, so it can be used
324 on a website with content negotiation for automatic language selection;
325 this can be achieved by issuing
326
327 @example
328 make WEB_TARGETS=online web
329 @end example
330
331 @noindent
332 and both @q{offline} and @q{online} targets can be generated by issuing
333
334 @example
335 make WEB_TARGETS="offline online" web
336 @end example
337
338 Several targets are available to clean the documentation build and
339 help with maintaining documentation; an overview of these targets is
340 available with
341
342 @example
343 make help
344 @end example
345
346 @noindent
347 from every directory in the build tree.  Most targets for
348 documentation maintenance are available from @file{Documentation/};
349 for more information, see @file{Documentation/user/README.txt} and
350 @file{Documentation/TRANSLATION}.
351
352 The makefile variable @code{QUIET_BUILD} may be set to @code{1} for a
353 less verbose build output, just like for building the programs.
354
355 @knownissues
356
357 @code{-j} command-line option of @command{make} is unsupported for
358 building the documentation.  As the most time consuming task is
359 running LilyPond to build images of music, the makefile variable
360 @code{CPU_COUNT} may be set in @file{local.make} or on the command line
361 to the number of @code{.ly} files that LilyPond should process
362 simultaneously, e.g. on a bi-processor or dual core machine
363
364 @example
365 make CPU_COUNT=2 web
366 @end example
367
368 If source files have changed since last documentation build, output
369 files that need to be rebuilt are normally rebuilt, even if you do not
370 run @code{make web-clean} first.  However, building dependencies in the
371 documentation are so complex that rebuilding of some targets may not
372 be triggered as they should be; a workaround is to force rebuilding
373 by touching appropriate files, e.g.
374
375 @example
376 touch Documentation/user/*.itely
377 touch input/lsr/*.ly
378 @end example
379
380
381 @node Building documentation without compiling LilyPond
382 @unnumberedsubsubsec Building documentation without compiling LilyPond
383
384 The documentation can be built locally without compiling LilyPond
385 binary, if LilyPond is already installed on your system.
386
387 From a fresh Git checkout, do
388
389 @example
390 ./autogen.sh   # ignore any warning messages
391 cp GNUmakefile.in GNUmakefile
392 make -C python
393 nice make LILYPOND_EXTERNAL_BINARY=/path/to/bin/lilypond web
394 @end example
395
396 Please note that this may break sometimes -- for example, if a new
397 feature is added with a test file in input/regression, even the latest
398 development release of LilyPond will fail to build the docs.
399
400 You may build the manual without building all the @file{input/*}
401 stuff: change directory, for example to @file{Documentation/user},
402 issue @code{make web}, which will build documentation in a
403 subdirectory @file{out-www} from the source files in current
404 directory.  In this case, if you also want to browse the documentation
405 in its post-processed form, change back to top directory and issue
406
407 @example
408 make out=www WWW-post
409 @end example
410
411 @knownissues
412
413 You may also need to create a script for @command{pngtopnm} and
414 @code{pnmtopng}.  On GNU/Linux, I use this:
415
416 @verbatim
417 export LD_LIBRARY_PATH=/usr/lib
418 exec /usr/bin/pngtopnm "$@"
419 @end verbatim
420
421 On MacOS@tie{}X, I use this:
422
423 @verbatim
424 export DYLD_LIBRARY_PATH=/sw/lib
425 exec /sw/bin/pngtopnm "$@" 
426 @end verbatim
427
428
429
430 @node Testing LilyPond
431 @subsection Testing LilyPond
432
433 @html
434 <a name="testing"></a>
435 @end html
436
437 LilyPond comes with an extensive suite that exercises the entire
438 program.  This suite can be used to automatically check the impact of a
439 change.  This is done as follows
440
441 @example
442 make test-baseline
443 @emph{## apply your changes, compile}
444 make check
445 @end example
446
447 This will leave an HTML page @file{out/test-results/index.html}.  This
448 page shows all the important differences that your change introduced,
449 whether in the layout, MIDI, performance or error reporting.
450
451 To rerun tests, use
452
453 @example
454 make test-redo           @emph{## redo files differing from baseline}
455 make test-clean          @emph{## remove all test results}
456 @end example
457
458 @noindent
459 and then run @code{make check} again.
460
461 For tracking memory usage as part of this test, you will need GUILE
462 CVS; especially the following patch:
463 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch}.
464
465 For checking the coverage of the test suite, do the following
466
467 @example
468 ./buildscripts/build-coverage.sh
469 @emph{# uncovered files, least covered first}
470 python ./buildscripts/coverage.py  --summary out-cov/*.cc
471 @emph{# consecutive uncovered lines, longest first} 
472 python ./buildscripts/coverage.py  --uncovered out-cov/*.cc
473 @end example
474
475
476 @node Problems
477 @subsection Problems
478
479 For help and questions use @email{lilypond-user@@gnu.org}.  Send bug
480 reports to @email{bug-lilypond@@gnu.org}.
481
482 Bugs that are not fault of LilyPond are documented here.
483
484 @unnumberedsubsubsec Bison 1.875
485
486 There is a bug in bison-1.875: compilation fails with "parse error
487 before `goto'" in line 4922 due to a bug in bison.  To fix, please
488 recompile bison 1.875 with the following fix
489
490 @example
491 $ cd lily; make out/parser.cc
492 $ vi +4919 out/parser.cc
493 # append a semicolon to the line containing "__attribute__ ((__unused__))
494 # save
495 $ make
496 @end example
497
498
499 @unnumberedsubsubsec Solaris
500
501 Solaris7, ./configure
502
503 @file{./configure} needs a POSIX compliant shell.  On Solaris7,
504 @file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
505 is.  Run configure like
506
507 @example
508 CONFIG_SHELL=/bin/ksh ksh -c ./configure
509 @end example
510
511 @noindent
512 or
513
514 @example
515 CONFIG_SHELL=/bin/bash bash -c ./configure
516 @end example
517
518 @unnumberedsubsubsec FreeBSD
519
520 To use system fonts, dejaview must be installed.  With the default
521 port, the fonts are installed in @file{usr/X11R6/lib/X11/fonts/dejavu}.
522
523 Open the file @file{$LILYPONDBASE/usr/etc/fonts/local.conf} and add the
524 following line just after the @code{<fontconfig>} line.  (Adjust as necessary
525 for your hierarchy.)
526
527 @example
528 <dir>/usr/X11R6/lib/X11/fonts</dir>
529 @end example
530
531
532 @unnumberedsubsubsec International fonts
533
534 On MacOS@tie{}X, all fonts are installed by default.  However, finding all
535 system fonts requires a bit of configuration; see
536 @uref{http://lists.gnu.org/archive/html/lilypond-user/2007-03/msg00472.html,
537 this post} on the @code{lilypond-user} mailing list.
538
539 On Linux, international fonts are installed by different means on
540 every distribution.  We cannot list the exact commands or packages
541 that are necessary, as each distribution is different, and the exact
542 package names within each distribution changes.  Here are some
543 hints, though:
544
545 @verbatim
546 Red Hat Fedora
547
548     taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
549          ttfonts-zh_CN fonts-ja fonts-hebrew 
550
551 Debian GNU/Linux
552
553    apt-get install emacs-intl-fonts xfonts-intl-.* \
554         ttf-kochi-gothic ttf-kochi-mincho \
555         xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi 
556 @end verbatim
557