]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.texi
(Top): document ncsb requirement.
[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.4, 2.6 etc), while odd
23 version are development releases (2.5, 2.7, etc).  Building LilyPond
24 is an involved process.  If possible
25 @uref{http://lilypond.org/download,download a precompiled binary}
26 for 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} 20050624 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.9 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.5 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 3.3 or
93 newer).  EGCS and 2.x are known to cause crashes.
94
95 @item @uref{http://www.python.org,Python} (version 2.1 or newer except
96 for Cygwin/Mingw where version 2.3 or newer is needed).
97
98 @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer).
99
100 @item @uref{http://www.gnu.org/software/gettext/gettext.html,gettext}.
101
102
103 @item @uref{http://www.gnu.org/software/flex/,Flex} 
104
105 @item @uref{http://www.perl.org/,Perl} 
106
107 @item @uref{http://www.gnu.org/software/flex/,GNU Bison} 
108
109 @item All packages required for running, including development packages with
110 header files and libraries.
111
112 @end itemize
113
114 @subsection Running requirements
115
116 Running LilyPond requires proper installation of the following
117 software
118
119 @itemize @bullet
120
121 @item @uref{http://www.freetype.org/,Freetype} (version 2).
122 @item @uref{http://www.freetype.org/,FontConfig} (version 2.2).
123 @item @uref{http://www.pango.org/,Pango} (version 1.6 or newer).
124 @item @uref{http://www.gnu.org/software/guile/guile.html,GUILE}
125 (version 1.6.5 or newer).
126 @item @uref{http://www.python.org,Python} (version 2.1 or newer).
127 @item @uref{http://www.ghostscript.com,Ghostscript} (version 8.15 or
128 newer)
129 @end itemize
130
131 @subsection Building documentation
132
133 You can view the documentation online at
134 @uref{http://lilypond.org/doc/}, but you can also build it locally.
135 This process requires a successful compile of lilypond.  The
136 documentation is built by issuing
137 @quotation
138 @example
139 make web
140 @end example
141 @end quotation
142
143 Building the website requires some additional tools and packages
144
145 @itemize @bullet
146 @item The @uref{http://netpbm.sourceforge.net/,netpbm utilities}
147 @item ImageMagick
148 @item International fonts (see input/regression/utf-8.ly for hints
149 about which font packages are necessary for your platform)
150 @item Ghostscript, 8.15 with the patch from
151 @uref{http://bugs.ghostscript.com/show_bug.cgi?id=688154}
152
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 The most time-consuming part of compiling LilyPond is tracing the
179 Type1 fonts. You can shortcut this operation by issuing
180 one of the following commands
181
182 @quotation
183 @example
184 make -C mf get-pfa                # requires rpm2cpio
185 make -C mf get-debian-pfa         # may not be up to date
186 @end example
187 @end quotation
188
189 If you are not root, you should choose a @code{--prefix} argument that
190 points into your home directory, e.g.
191 @quotation
192 @example
193 ./configure --prefix=$HOME/usr
194 @end example
195 @end quotation
196
197
198 @subsection Configuring for multiple platforms
199
200 If you want to build multiple versions of LilyPond with different
201 configuration settings, you can use the @code{--enable-config=CONF}
202 option of configure.  You should use @samp{make conf=CONF} to generate
203 the output in @file{out-CONF}.  Example: Suppose you want to build
204 with and without profiling, then use the following for the normal
205 build
206
207 @quotation
208 @example
209 ./configure --prefix=$HOME/usr/ --enable-checking
210 make
211 make install
212 @end example
213 @end quotation
214
215 and for the profiling version, specify a different configuration
216
217 @quotation
218 @example
219 ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
220 make conf=prof
221 make conf=prof install
222 @end example
223 @end quotation
224
225
226 @section Emacs mode
227
228 An Emacs mode for entering music and running LilyPond is contained in
229 the source archive in the @file{elisp} directory.  Do @command{make
230 install} to install it to @var{elispdir}.  The file @file{lilypond-init.el}
231 should be placed to @var{load-path}@file{/site-start.d/} or appended
232 to your @file{~/.emacs} or @file{~/.emacs.el}.
233
234 As a user, you may want add your source path (e.g. @file{~/site-lisp/}) to
235 your @var{load-path} by appending the following line (as modified) to your
236 @file{~/.emacs}
237 @c any reason we do not advise:  (push "~/site-lisp" load-path)
238 @quotation
239 @example
240 (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
241 @end example
242 @end quotation
243
244
245 @section Vim mode
246
247 A Vim mode for entering music and running LilyPond is contained in the
248 source archive in @code{$VIM} directory.
249
250 The LilyPond file type is detected if the file @file{~/.vim/filetype.vim} @c
251 has the following content
252 @quotation
253 @example
254 if exists("did_load_filetypes")
255   finish
256 endif
257 augroup filetypedetect
258   au! BufNewFile,BufRead *.ly           setf lilypond
259 augroup END
260 @end example
261 @end quotation
262
263 Please include this path by appending the following line to your
264 @file{~/.vimrc}
265
266 @quotation
267 @example
268 set runtimepath+=/usr/local/share/lilypond/$@{LILYPOND_VERSION@}/vim/
269 @end example
270 @end quotation
271
272 @noindent
273 where $@{LILYPOND_VERISON@} is your lilypond version.  If Lilypond was not
274 installed in @file{/usr/local/}, then change this path accordingly.
275
276
277 @section Problems
278
279 For help and questions use @email{lilypond-user@@gnu.org}.  Send bug
280 reports to @email{bug-lilypond@@gnu.org}.
281
282 Bugs that are not fault of LilyPond are documented here.
283
284 @subsection Bison 1.875
285
286 There is a bug in bison-1.875: compilation fails with "parse error
287 before `goto'" in line 4922 due to a bug in bison. To fix, please
288 recompile bison 1.875 with the following fix
289
290 @quotation
291 @example
292 $ cd lily; make out/parser.cc
293 $ vi +4919 out/parser.cc
294 # append a semicolon to the line containing "__attribute__ ((__unused__))
295 # save
296 $ make
297 @end example
298 @end quotation
299
300
301
302 @unnumberedsubsec Gcc-3.0.4
303
304 Gcc 3.0.4 is flaky; upgrade GCC.
305
306 @unnumberedsubsec Flex-2.5.4a and gcc-3.x
307
308 Flex 2.5.4a does not produce g++-3.1.1 compliant C++ code.  To compile
309 LilyPond with gcc-3.1.1 or higher you may do
310
311 @quotation
312 @example
313 CONF=gcc-3.1 ./lexer-gcc-3.1.sh
314 CPPFLAGS=-I$(pwd)/lily/out-gcc-3.1 CC=gcc-3.1 CXX=g++-3.1 \
315 ./configure --enable-config=gcc-3.1
316 CONF=gcc-3.1 ./lexer-gcc-3.1.sh
317 make conf=gcc-3.1
318 @end example
319 @end quotation
320
321 @unnumberedsubsec MacOS X
322
323 For Fink, use the following command to compile.
324
325 @verbatim
326 export GUILE=guile-1.6
327 export GUILE_CONFIG=guile-1.6-config
328 export PKG_CONFIG_PATH=/sw/lib/freetype219/lib/pkgconfig/:/sw/lib/fontconfig2/lib/pkgconfig/
329 ./configure --without-kpathsea
330 @end verbatim
331
332 @unnumberedsubsec OpenBSD
333
334 @itemize @bullet
335 @item
336 Refer to the section ``Linking to kpathsea'': GCC on OpenBSD doesn't
337 set include paths for kpathsea.
338 @end itemize
339
340 @unnumberedsubsec NetBSD
341
342 @itemize @bullet
343 @item The flex precompiled in NetBSD-1.4.2 is broken.
344 Upgrade to flex-2.5.4a.
345 @end itemize
346
347 @unnumberedsubsec  Solaris
348
349 @itemize @bullet
350 @item Solaris7, ./configure
351
352 @file{./configure} needs a POSIX compliant shell.  On Solaris7,
353 @file{/bin/sh} is not yet POSIX compliant, but @file{/bin/ksh} or bash
354 is.  Run configure like
355 @quotation
356 @example
357         CONFIG_SHELL=/bin/ksh ksh -c ./configure
358 @end example
359 @end quotation
360 or
361 @quotation
362 @example
363         CONFIG_SHELL=/bin/bash bash -c ./configure
364 @end example
365 @end quotation
366
367 @end itemize
368
369 @bye
370