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