]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.texi
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / Documentation / topdocs / INSTALL.texi
1 \input texinfo @c -*-texinfo-*-
2 @setfilename INSTALL.info
3 @settitle INSTALL - compiling and installing GNU LilyPond
4
5 @documentencoding utf-8
6 @documentlanguage en
7
8 @node Top
9 @top
10
11 @contents
12
13 @chapter Compiling and installing on Unix
14
15
16 @html
17 <a name="download-source">
18 @end html
19
20 @section Downloading
21
22 Even numbered minor versions are `stable' (2.6, 2.8, etc), while odd
23 version are development releases (2.7, 2.9, etc).  Building LilyPond
24 is an involved process.  If possible
25 @uref{http://lilypond.org/install,download a precompiled binary} for
26 your platform.
27
28 @subsection Source code
29
30 Download source
31 @itemize @bullet
32 @item tarballs from
33 @uref{http://lilypond.org/download/} by HTTP.
34 @item tarballs from
35 @uref{http://download.linuxaudio.org/lilypond/} by HTTP.
36 @item 
37 GIT from @uref{http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary,git.sv.gnu.org}
38 @example
39 git clone git://git.sv.gnu.org/lilypond.git
40 @end example
41
42 The repository does not contain generated files.  To create
43 @file{configure}, run
44 @example
45 ./autogen.sh
46 @end example
47 @end itemize
48
49 For information on packaging, see @uref{http://lilypond.org/devel}.
50
51 @subsection Precompiled binary packages
52
53 Check out @uref{http://lilypond.org/web/install/} for up to date
54 information on binary packages for your platform.
55
56
57 @section Requirements
58
59 @subsection Compilation
60
61 In addition to the packages needed for running Lilypond (see below),
62 you need the following extra packages for building.
63
64 When installing a binary package FOO, you may need to install the
65 FOO-devel, libFOO-dev or FOO-dev package too.
66
67 @itemize
68
69 @item @uref{http://fontforge.sf.net/,FontForge} 20060125 or newer.
70
71 @item New Century Schoolbook fonts, as PFB files. These are shipped
72 with X11 and Ghostscript, and are named @file{c059033l.pfb}
73 @file{c059036l.pfb}, @file{c059013l.pfb} and @file{c059016l.pfb}
74
75 @item @uref{http://www.xs4all.nl/~hanwen/mftrace/,mftrace} (1.1.19 or
76 newer),
77
78 You will need to install some additional packages to get mftrace to
79 work.
80
81 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
82 (version 1.8.2 or newer).  If you are installing binary packages, you
83 may need to install guile-devel or guile-dev or libguile-dev too.
84
85 @item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.8 or newer).
86
87 @item
88 @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 4.x or
89 newer). 
90
91 @item @uref{http://www.python.org,Python} (version 2.3 or newer)
92
93 @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer).
94
95 @item @uref{http://www.gnu.org/software/gettext/gettext.html,gettext}.
96
97 @item @uref{http://www.gnu.org/software/flex/,Flex} 
98
99 @item @uref{http://www.perl.org/,Perl} 
100
101 @item @uref{http://www.gnu.org/software/flex/,GNU Bison} 
102
103 @item All packages required for running, including development packages with
104 header files and libraries.
105
106 @end itemize
107
108 @subsection Running requirements
109
110 Running LilyPond requires proper installation of the following
111 software
112
113 @itemize @bullet
114
115 @item @uref{http://www.freetype.org/,Freetype} (version 2).
116 @item @uref{http://www.freetype.org/,FontConfig} (version 2.2).
117 @item @uref{http://www.pango.org/,Pango} (version 1.12 or newer).
118 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
119 (version 1.8.2 or newer), or patch 1.8.1 with
120 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch}.
121 @item @uref{http://www.python.org,Python} (version 2.4 or newer).
122 @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or
123 newer. 8.50 recommended)
124 @end itemize
125
126 @subsection Building documentation
127
128 You can view the documentation online at
129 @uref{http://lilypond.org/doc/}, but you can also build it locally.
130 This process requires a successful compile of lilypond.  The
131 documentation is built by issuing
132 @quotation
133 @example
134 make web
135 @end example
136 @end quotation
137
138 Building the website requires some additional tools and packages
139
140 @itemize @bullet
141 @item The @uref{http://netpbm.sourceforge.net/,netpbm utilities}
142 @item ImageMagick
143 @item International fonts (see input/regression/utf-8.ly for hints
144 about which font packages are necessary for your platform)
145 @item Ghostscript, 8.50 with the patch from
146 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688154}
147 and the patch from
148 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688017}.
149 @end itemize
150
151 The HTML files can be installed into the standard documentation path
152 by issuing
153
154 @quotation
155 @example
156 make out=www web-install
157 @end example
158 @end quotation
159
160 @section Testing LilyPond
161
162 @html
163 <a name="testing"></a>
164 @end html
165
166 LilyPond comes with an extensive suite that excercises the entire
167 program. This suite can be used to automatically check the impact of a
168 change. This is done as follows
169
170 @example
171   make test-baseline
172   @emph{## apply your changes, compile}
173   make check
174 @end example
175
176 This will leave an HTML page @file{out/test-results/index.html}.  This
177 page shows all the important differences that your change introduced,
178 whether in the layout, MIDI, performance or error reporting.
179
180 To rerun tests, use
181
182 @example
183   make test-redo           @emph{## redo files differing from baseline}
184   make test-clean          @emph{## remove all test results}
185 @end example
186
187 @noindent
188 and then run @code{make check} again.
189
190 For tracking memory usage as part of this test, you will need GUILE
191 CVS; especially the following patch:
192 @uref{http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch}.
193
194 For checking the coverage of the test suite, do the following
195
196 @example
197   ./buildscripts/build-coverage.sh
198   @emph{# uncovered files, least covered first}
199   python ./buildscripts/coverage.py  --summary out-cov/*.cc
200   @emph{# consecutive uncovered lines, longest first} 
201   python ./buildscripts/coverage.py  --uncovered out-cov/*.cc
202 @end example
203
204 @section Building LilyPond
205
206 To install GNU LilyPond, type
207 @quotation
208 @example
209 gunzip -c lilypond-x.y.z | tar xf -
210 cd lilypond-x.y.z
211 ./configure             # run with --help for applicable options
212 make
213 make install
214 @end example
215 @end quotation
216
217 If you are not root, you should choose a @code{--prefix} argument that
218 points into your home directory, e.g.
219 @quotation
220 @example
221 ./configure --prefix=$HOME/usr
222 @end example
223 @end quotation
224
225
226 @subsection Configuring for multiple platforms
227
228 If you want to build multiple versions of LilyPond with different
229 configuration settings, you can use the @code{--enable-config=CONF}
230 option of configure.  You should use @samp{make conf=CONF} to generate
231 the output in @file{out-CONF}.  Example: Suppose you want to build
232 with and without profiling, then use the following for the normal
233 build
234
235 @quotation
236 @example
237 ./configure --prefix=$HOME/usr/ --enable-checking
238 make
239 make install
240 @end example
241 @end quotation
242
243 and for the profiling version, specify a different configuration
244
245 @quotation
246 @example
247 ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
248 make conf=prof
249 make conf=prof install
250 @end example
251 @end quotation
252
253
254 @section Emacs mode
255
256 An Emacs mode for entering music and running LilyPond is contained in
257 the source archive in the @file{elisp} directory.  Do @command{make
258 install} to install it to @var{elispdir}.  The file @file{lilypond-init.el}
259 should be placed to @var{load-path}@file{/site-start.d/} or appended
260 to your @file{~/.emacs} or @file{~/.emacs.el}.
261
262 As a user, you may want add your source path (e.g. @file{~/site-lisp/}) to
263 your @var{load-path} by appending the following line (as modified) to your
264 @file{~/.emacs}
265 @c any reason we do not advise:  (push "~/site-lisp" load-path)
266 @quotation
267 @example
268 (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
269 @end example
270 @end quotation
271
272
273 @section Vim mode
274
275 A Vim mode for entering music and running LilyPond is contained in the
276 source archive in @code{$VIM} directory.
277
278 The LilyPond file type is detected if the file @file{~/.vim/filetype.vim} @c
279 has the following content
280 @quotation
281 @example
282 if exists("did_load_filetypes")
283   finish
284 endif
285 augroup filetypedetect
286   au! BufNewFile,BufRead *.ly           setf lilypond
287 augroup END
288 @end example
289 @end quotation
290
291 Please include this path by appending the following line to your
292 @file{~/.vimrc}
293
294 @quotation
295 @example
296 set runtimepath+=/usr/local/share/lilypond/$@{LILYPOND_VERSION@}/vim/
297 @end example
298 @end quotation
299
300 @noindent
301 where $@{LILYPOND_VERISON@} is your lilypond version.  If Lilypond was not
302 installed in @file{/usr/local/}, then change this path accordingly.
303
304
305 @section Problems
306
307 For help and questions use @email{lilypond-user@@gnu.org}.  Send bug
308 reports to @email{bug-lilypond@@gnu.org}.
309
310 Bugs that are not fault of LilyPond are documented here.
311
312 @subsection Bison 1.875
313
314 There is a bug in bison-1.875: compilation fails with "parse error
315 before `goto'" in line 4922 due to a bug in bison. To fix, please
316 recompile bison 1.875 with the following fix
317
318 @quotation
319 @example
320 $ cd lily; make out/parser.cc
321 $ vi +4919 out/parser.cc
322 # append a semicolon to the line containing "__attribute__ ((__unused__))
323 # save
324 $ make
325 @end example
326 @end quotation
327
328
329 @unnumberedsubsec MacOS X
330
331 For Fink, use the following command to compile.
332
333 @verbatim
334 export GUILE=guile-1.6
335 export GUILE_CONFIG=guile-1.6-config
336 export PKG_CONFIG_PATH=/sw/lib/freetype219/lib/pkgconfig/:/sw/lib/fontconfig2/lib/pkgconfig/
337 ./configure
338 @end verbatim
339
340 @unnumberedsubsec  Solaris
341
342 @itemize @bullet
343 @item Solaris7, ./configure
344
345 @file{./configure} needs a POSIX compliant shell.  On Solaris7,
346 @file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
347 is.  Run configure like
348 @quotation
349 @example
350         CONFIG_SHELL=/bin/ksh ksh -c ./configure
351 @end example
352 @end quotation
353 or
354 @quotation
355 @example
356         CONFIG_SHELL=/bin/bash bash -c ./configure
357 @end example
358 @end quotation
359
360 @end itemize
361
362 @bye
363