]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.texi
804355a3e4b6ce53c49a48e61856f443d52c23e7
[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 @itemize @bullet
34 @uref{http://lilypond.org/download/} by HTTP.
35 @item @uref{ftp://sca.uwaterloo.ca/pub/} by FTP (Canadian mirror).
36 @end itemize
37 @item 
38 CVS from @uref{http://savannah.gnu.org/cvs/?group=lilypond,savannah.gnu.org}
39 @itemize @bullet
40 @c @quotation
41 @example
42 CVS_RSH=ssh cvs -d:ext:anoncvs@@savannah.gnu.org:/cvsroot/lilypond co lilypond
43 @end example
44 @c @end quotation
45 The CVS repository does not contain generated files.  To create
46 @file{configure}, run
47 @example
48 ./autogen.sh
49 @end example
50 @end itemize
51 @end itemize
52
53 For information on packaging, see @uref{http://lilypond.org/devel}.
54
55 @subsection Precompiled binary packages
56
57 Check out @uref{http://lilypond.org/web/install/} for up to date
58 information on binary packages for your platform.
59
60
61 @section Requirements
62
63 @subsection Compilation
64
65 In addition to the packages needed for running Lilypond (see below),
66 you need the following extra packages for building.
67
68 When installing a binary package FOO, you may need to install the
69 FOO-devel, libFOO-dev or FOO-dev package too.
70
71 @itemize
72
73 @item @uref{http://fontforge.sf.net/,FontForge} 20060125 or newer.
74
75 @item New Century Schoolbook fonts, as PFB files. These are shipped
76 with X11 and Ghostscript, and are named @file{c059033l.pfb}
77 @file{c059036l.pfb}, @file{c059013l.pfb} and @file{c059016l.pfb}
78
79 @item @uref{http://www.xs4all.nl/~hanwen/mftrace/,mftrace} (1.1.19 or
80 newer),
81
82 You will need to install some additional packages to get mftrace to
83 work.
84
85 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
86 (version 1.6.7 or newer).  If you are installing binary packages, you
87 may need to install guile-devel or guile-dev or libguile-dev too.
88
89 @item @uref{ftp://ftp.gnu.org/gnu/texinfo/,Texinfo} (version 4.8 or newer).
90
91 @item
92  @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 4.x or
93 newer). 
94
95 @item @uref{http://www.python.org,Python} (version 2.3 or newer)
96
97 @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer).
98
99 @item @uref{http://www.gnu.org/software/gettext/gettext.html,gettext}.
100
101
102 @item @uref{http://www.gnu.org/software/flex/,Flex} 
103
104 @item @uref{http://www.perl.org/,Perl} 
105
106 @item @uref{http://www.gnu.org/software/flex/,GNU Bison} 
107
108 @item All packages required for running, including development packages with
109 header files and libraries.
110
111 @end itemize
112
113 @subsection Running requirements
114
115 Running LilyPond requires proper installation of the following
116 software
117
118 @itemize @bullet
119
120 @item @uref{http://www.freetype.org/,Freetype} (version 2).
121 @item @uref{http://www.freetype.org/,FontConfig} (version 2.2).
122 @item @uref{http://www.pango.org/,Pango} (version 1.12 or newer).
123 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
124 (version 1.8.0 or newer).
125 @item @uref{http://www.python.org,Python} (version 2.4 or newer).
126 @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or
127 newer. 8.50 recommended)
128 @end itemize
129
130 @subsection Building documentation
131
132 You can view the documentation online at
133 @uref{http://lilypond.org/doc/}, but you can also build it locally.
134 This process requires a successful compile of lilypond.  The
135 documentation is built by issuing
136 @quotation
137 @example
138 make web
139 @end example
140 @end quotation
141
142 Building the website requires some additional tools and packages
143
144 @itemize @bullet
145 @item The @uref{http://netpbm.sourceforge.net/,netpbm utilities}
146 @item ImageMagick
147 @item International fonts (see input/regression/utf-8.ly for hints
148 about which font packages are necessary for your platform)
149 @item Ghostscript, 8.50 with the patch from
150 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688154}
151 and the patch from
152 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688017}.
153 @end itemize
154
155 The HTML files can be installed into the standard documentation path
156 by issuing
157
158 @quotation
159 @example
160 make out=www web-install
161 @end example
162 @end quotation
163
164
165 @section Building LilyPond
166
167 To install GNU LilyPond, type
168 @quotation
169 @example
170 gunzip -c lilypond-x.y.z | tar xf -
171 cd lilypond-x.y.z
172 ./configure             # run with --help for applicable options
173 make
174 make install
175 @end example
176 @end quotation
177
178 If you are not root, you should choose a @code{--prefix} argument that
179 points into your home directory, e.g.
180 @quotation
181 @example
182 ./configure --prefix=$HOME/usr
183 @end example
184 @end quotation
185
186
187 @subsection Configuring for multiple platforms
188
189 If you want to build multiple versions of LilyPond with different
190 configuration settings, you can use the @code{--enable-config=CONF}
191 option of configure.  You should use @samp{make conf=CONF} to generate
192 the output in @file{out-CONF}.  Example: Suppose you want to build
193 with and without profiling, then use the following for the normal
194 build
195
196 @quotation
197 @example
198 ./configure --prefix=$HOME/usr/ --enable-checking
199 make
200 make install
201 @end example
202 @end quotation
203
204 and for the profiling version, specify a different configuration
205
206 @quotation
207 @example
208 ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
209 make conf=prof
210 make conf=prof install
211 @end example
212 @end quotation
213
214
215 @section Emacs mode
216
217 An Emacs mode for entering music and running LilyPond is contained in
218 the source archive in the @file{elisp} directory.  Do @command{make
219 install} to install it to @var{elispdir}.  The file @file{lilypond-init.el}
220 should be placed to @var{load-path}@file{/site-start.d/} or appended
221 to your @file{~/.emacs} or @file{~/.emacs.el}.
222
223 As a user, you may want add your source path (e.g. @file{~/site-lisp/}) to
224 your @var{load-path} by appending the following line (as modified) to your
225 @file{~/.emacs}
226 @c any reason we do not advise:  (push "~/site-lisp" load-path)
227 @quotation
228 @example
229 (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
230 @end example
231 @end quotation
232
233
234 @section Vim mode
235
236 A Vim mode for entering music and running LilyPond is contained in the
237 source archive in @code{$VIM} directory.
238
239 The LilyPond file type is detected if the file @file{~/.vim/filetype.vim} @c
240 has the following content
241 @quotation
242 @example
243 if exists("did_load_filetypes")
244   finish
245 endif
246 augroup filetypedetect
247   au! BufNewFile,BufRead *.ly           setf lilypond
248 augroup END
249 @end example
250 @end quotation
251
252 Please include this path by appending the following line to your
253 @file{~/.vimrc}
254
255 @quotation
256 @example
257 set runtimepath+=/usr/local/share/lilypond/$@{LILYPOND_VERSION@}/vim/
258 @end example
259 @end quotation
260
261 @noindent
262 where $@{LILYPOND_VERISON@} is your lilypond version.  If Lilypond was not
263 installed in @file{/usr/local/}, then change this path accordingly.
264
265
266 @section Problems
267
268 For help and questions use @email{lilypond-user@@gnu.org}.  Send bug
269 reports to @email{bug-lilypond@@gnu.org}.
270
271 Bugs that are not fault of LilyPond are documented here.
272
273 @subsection Bison 1.875
274
275 There is a bug in bison-1.875: compilation fails with "parse error
276 before `goto'" in line 4922 due to a bug in bison. To fix, please
277 recompile bison 1.875 with the following fix
278
279 @quotation
280 @example
281 $ cd lily; make out/parser.cc
282 $ vi +4919 out/parser.cc
283 # append a semicolon to the line containing "__attribute__ ((__unused__))
284 # save
285 $ make
286 @end example
287 @end quotation
288
289
290
291 @unnumberedsubsec Gcc-3.0.4
292
293 Gcc 3.0.4 is flaky; upgrade GCC.
294
295 @unnumberedsubsec Flex-2.5.4a and gcc-3.x
296
297 Flex 2.5.4a does not produce g++-3.1.1 compliant C++ code.  To compile
298 LilyPond with gcc-3.1.1 or higher you may do
299
300 @quotation
301 @example
302 CONF=gcc-3.1 ./lexer-gcc-3.1.sh
303 CPPFLAGS=-I$(pwd)/lily/out-gcc-3.1 CC=gcc-3.1 CXX=g++-3.1 \
304 ./configure --enable-config=gcc-3.1
305 CONF=gcc-3.1 ./lexer-gcc-3.1.sh
306 make conf=gcc-3.1
307 @end example
308 @end quotation
309
310 @unnumberedsubsec MacOS X
311
312 For Fink, use the following command to compile.
313
314 @verbatim
315 export GUILE=guile-1.6
316 export GUILE_CONFIG=guile-1.6-config
317 export PKG_CONFIG_PATH=/sw/lib/freetype219/lib/pkgconfig/:/sw/lib/fontconfig2/lib/pkgconfig/
318 ./configure
319 @end verbatim
320
321 @unnumberedsubsec NetBSD
322
323 @itemize @bullet
324 @item The flex precompiled in NetBSD-1.4.2 is broken.
325 Upgrade to flex-2.5.4a.
326 @end itemize
327
328 @unnumberedsubsec  Solaris
329
330 @itemize @bullet
331 @item Solaris7, ./configure
332
333 @file{./configure} needs a POSIX compliant shell.  On Solaris7,
334 @file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
335 is.  Run configure like
336 @quotation
337 @example
338         CONFIG_SHELL=/bin/ksh ksh -c ./configure
339 @end example
340 @end quotation
341 or
342 @quotation
343 @example
344         CONFIG_SHELL=/bin/bash bash -c ./configure
345 @end example
346 @end quotation
347
348 @end itemize
349
350 @bye
351