]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.texi
release: 1.3.62
[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 @node Top, , , (dir)
6 @top
7
8 @chapter INSTALL - compiling and installing GNU LilyPond
9
10
11 @section Abstract
12
13 This document explains what you need to install LilyPond, and what you
14 should do.  If you are going to compile and install LilyPond often,
15 e.g. when doing development, you might want to check out the
16 @file{buildscripts/set-lily.sh} script.  It sets some environment
17 variables and symlinks, which comes in handy when you have to compile
18 LilyPond more often.
19
20 @section Obtaining
21
22 You can get the latest version of LilyPond at
23 @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/,
24 ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}.
25
26
27 @emph{If you upgrade by patching do remember to rerun autoconf after
28 applying the patch}.
29
30 If you do not want to download the entire archive for each version, the
31 safest method for upgrading is to use @file{xdelta}, see
32 @uref{ftp://ftp.xcf.berkeley.edu/pub/xdelta/}.
33
34 The following command produces @file{lilypond-1.1.55.tar.gz} from
35 @file{lilypond-1.1.54} identical (up to compression dates) to the .55 on
36 the FTP site.
37 @example
38   xdelta patch lilypond-1.1.54-1.1.55.xd lilypond-1.1.54.tar.gz
39 @end example
40
41 @section Prerequisites
42
43 For compilation you need:
44
45 @itemize @bullet
46 @item A GNU system: GNU LilyPond is known to run on these GNU systems: Linux
47     (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and
48 Solaris.
49
50 @item Lots of disk space: LilyPond takes between 30 and 100 mb to
51 compile if you use debugging information.  If you are short on
52 disk-space run configure with @code{--disable-debugging}.
53
54 @item
55 Although we recommend to use Unix, LilyPond is known to run on Windows
56 NT/95/98 as well.  See Section Windows NT/95,es.
57
58 @item  EGCS 1.1 or newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/}.
59
60 @item  Python 1.5,
61 Check out
62 @uref{ftp://ftp.python.org} or @uref{ftp://ftp.cwi.nl/pub/python}.
63
64 @item  GUILE 1.3.4 or newer,  check out
65 @uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}.
66 Version 1.4 is recommended for better performance.
67
68 @item GNU Make. 
69 Check out
70 @uref{ftp://ftp.gnu.org/gnu/make/,ftp://ftp.gnu.org/gnu/make/}.
71
72 @item Flex (version 2.5.4 or newer). 
73 Check out @uref{ftp://ftp.gnu.org/gnu/flex/,ftp://ftp.gnu.org/gnu/flex/}.
74
75 @item Bison (version 1.25 or newer).
76 Check out @uref{ftp://ftp.gnu.org/gnu/bison/,ftp://ftp.gnu.org/gnu/bison/}.
77
78 @item Texinfo (version 4.0 or newer). 
79 Check out @uref{ftp://ftp.gnu.org/gnu/texinfo/,ftp://ftp.gnu.org/gnu/texinfo/}.
80 Most documentation is in texinfo.
81
82 @item The geometry package for LaTeX is needed to use ly2dvi.  
83 Available at 
84 @uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry}
85 or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de}
86
87 @item MetaPost, needed for generating PostScript fonts. Please
88 note that tetex-0.4pl8 (included with Redhat 5.x) does not include
89 @file{mfplain.mp}, which is needed for producing the scalable font
90 files.
91
92 If you do not want to use PostScript output, edit @file{mf/GNUmakefile}.
93
94
95 @end itemize
96
97 @section Running
98
99 GNU LilyPond does use a lot of resources. For operation you need the
100 following software
101
102 @itemize @bullet
103 @item TeX
104 @item A PostScript printer and/or viewer (such as Ghostscript) is strongly
105     recommended.  Xdvi will show all embedded PostScript too if you have
106     Ghostscript installed.
107 @item  GUILE 1.3.4, check out @uref{http://www.gnu.org/programs/guile.html,http://www.gnu.org/software/guile/}
108 @end itemize
109
110 For running LilyPond successfully you have to help TeX and MetaFont
111 find various files.  The recommended way of doing so is adjusting the
112 environment variables in the start-up scripts of your shell.  An
113 example is given here for the Bourne shell:
114 @example 
115 export MFINPUTS="/usr/local/share/lilypond/mf:"
116 export TEXINPUTS="/usr/local/share/lilypond/tex:/usr/local/share/lilypond/ps:"
117  
118 @end example 
119
120 The empty path component
121 represents TeX and MetaFont's default search paths.  Scripts with
122 the proper paths for the bourne and C-shell respectively are generated in
123 @file{buildscripts/out/lilypond-profile} and
124 @file{buildscripts/out/lilypond-login} during compilation. 
125
126 LilyPond is a hiddeously big, slow and bloated program.  A fast CPU
127 and plenty of RAM is recommended for comfortable use.
128
129 @section Website
130
131 The website is the most convenient form to use for reading the
132 documentation on-line documentation. It is made by entering @example 
133
134   make htmldoc
135  
136 @end example 
137 This does require a  functioning  LilyPond. The binary doesn't have to
138 be installed. 
139
140 If you want to auto-generate Lily's website, you'll need some additional
141 conversion tools.
142
143 @itemize @bullet
144 @item xpmtoppm (from the Portable Bitmap Utilities) (For RedHat Linux
145              users: it is included within the package libgr-progs).
146         the original is at
147 @uref{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz,ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz}
148
149 @item pnmtopng, which is also in libgr-progs for RedHat. The original is
150 at
151 @uref{ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz,ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz}.i
152
153 The version of @file{pnmtopng} that is distributed with RedHat 5.1 and
154 5.2 contains a bug: pnmtopng is dynamically linked to the wrong
155 version of libpng, which results in cropped images.  Recompile it from 
156 source, and make sure that the pnmtopng binary is linked statically to 
157 the libpng that is included in libgr.  RedHat 6.0 does not have this 
158 problem.
159
160 @example 
161  tar xzf libgr-2.0.13.tar.gz
162       make
163       cd png
164       rm libpng.so*
165       make pnmtopng
166  
167 @end example 
168
169 You can then install the new pnmtopng into @file{/usr/local/bin/}
170
171 @item @uref{http://pertsserver.cs.uiuc.edu/~hull/bib2html,Bib2html}.
172     Which, in turn depends on man2html for proper installation.
173 man2html can be had from @uref{http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05,http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/Networking/WWW/Man2html-1.05}.
174
175 The website will build without this utility, but you will not see our
176 hypertextified bibliography.
177
178 @item @uref{http://www.zib.de/Visual/software/doc++/index.html,DOC++}
179     A documentation system for C++ sources, which is used for the
180     LilyPond sources.
181 @end itemize
182
183 @section Configuring and compiling
184
185 to install GNU LilyPond, simply type:
186 @example 
187
188         gunzip -c lilypond-x.y.z | tar xf -
189         cd lilypond-x.y.z
190         ./configure             # fill in your standard prefix with --prefix
191         make
192         make install
193  
194 @end example 
195
196 This will install a number of files, something close to:
197
198 @example 
199         /usr/local/man/man1/mi2mu.1
200         /usr/local/man/man1/convert-mudela.1
201         /usr/local/man/man1/mudela-book.1
202         /usr/local/man/man1/lilypond.1
203         /usr/local/bin/lilypond
204         /usr/local/bin/mi2mu
205         /usr/local/bin/convert-mudela
206         /usr/local/bin/mudela-book
207         /usr/local/bin/abc2ly
208         /usr/local/share/lilypond/*
209         /usr/local/share/locale/@{it,nl@}/LC_MESSAGES/lilypond.mo
210 @end example 
211
212
213 The above assumes that you are root and have the GNU development
214 tools, and your make is GNU make.  If this is not the case, you can
215 adjust your environment variables to your taste:
216
217 @example 
218
219         export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" 
220         ./configure
221  
222 @end example 
223
224 @code{CPPFLAGS} are the preprocessor flags. 
225
226 The configure script is Cygnus configure, and it will accept
227 @code{--help}. If you are not root, you will probably have to make it
228 with a different @code{--prefix} option.  Our favourite location is
229
230 @example 
231
232         ./configure --prefix=$HOME/usr
233  
234 @end example 
235
236 In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly.
237
238 Since GNU LilyPond currently is beta, you are advised to also use
239
240 @example 
241
242         --enable-debugging
243         --enable-checking
244  
245 @end example 
246
247 Options to configure include:
248
249 @table @samp
250 @item @code{--enable-printing}
251     Enable debugging print routines (lilypond @code{-D} option)
252 @item @code{--enable-optimise}
253     Set maximum optimisation: compile with @code{-O2}.  This can be
254 unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC)
255 @item @code{--enable-profiling}
256     Compile with support for profiling.
257 @item @code{--enable-config}
258     Output to a different configuration file.  Needed for multi-platform
259     builds
260 @end table
261
262 All options are documented in the @file{configure} help
263 The option @code{--enable-optimise} is recommended for Real Life usage.
264
265 If you do
266
267 @example 
268
269         make all
270  
271 @end example 
272
273 everything will be compiled, but nothing will be installed.  The
274 resulting binaries can be found in the subdirectories @file{out/} (which
275 contain all files generated during compilation).
276
277 @section Configuring for multiple platforms
278
279 If you want to compile LilyPond with different configuration settings,
280 then, you can use the @code{--enable-config} option.  Example: suppose I
281 want to build with and   without profiling.  Then I'd use the
282 following for the normal build, 
283
284 @example 
285
286       ./configure --prefix=~ --disable-optimise --enable-checking
287       make
288       make install
289       
290 @end example 
291
292 and for the profiling version, I specify a different configuration.
293
294 @example 
295
296       ./configure --prefix=~ --enable-profiling --enable-config=optprof --enable-optimise --disable-checking
297       make config=optprof
298       make config=optprof install
299  
300 @end example 
301
302
303 @section Installing
304
305 if you have done a successful @code{make}, then a simple
306
307 @example 
308
309         make install
310  
311 @end example 
312
313 should do the trick.
314
315 If you are doing an upgrade, please remember to remove obsolete
316 @file{.pk} and @file{.tfm} files of the fonts.  A script has been
317 provided to do the work for you, see @file{bin/clean-fonts.sh}.
318
319
320 @section Redhat linux
321
322 RedHat Linux users can compile an RPM. A spec file is in
323 @file{make/out/lilypond.spec}, it is distributed along with the
324 sources.
325
326 You can make the rpm by issuing
327 @example 
328
329         rpm -tb lilypond-x.y.z.tar.gz
330         rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z
331  
332 @end example 
333
334 Precompiled i386 RedHat RPMS are available from
335 @uref{ftp://freshmeat.net/pub/rpms/lilypond/,ftp://freshmeat.net/pub/rpms/lilypond/} and
336 @uref{http://linux.umbc.edu/software/lilypond/rpms/,http://linux.umbc.edu/software/lilypond/rpms/}.
337
338 For compilation on a RedHat system you need these packages,
339 in addition to the those needed for running:
340 @itemize @bullet
341 @item glibc-devel
342 @item libstdc++-devel
343 @item guile-devel
344 @item flex
345 @item bison
346 @item texinfo
347 @end itemize
348
349 @section Debian GNU/linux
350
351 A Debian package is also available; see
352 @uref{http://packages.debian.org/lilypond,http://packages.debian.org/lilypond}
353 or contact Anthony Fok @email{foka@@debian.org} for more information.
354 The build scripts are in the subdirectory @file{debian/}.
355
356 @section Windows NT/95
357
358 Separate instructions on building for W32 are available; See the files
359 in @file{Documentation/ntweb/}, included with the sources.
360
361 @section Problems
362
363 For help and questions use @email{help-gnu-music@@gnu.org} and
364 @email{gnu-music-discuss@@gnu.org}.  Please consult the faq before
365 mailing your problems.
366
367 If you find bugs, please send bug reports to
368 @email{bug-gnu-music@@gnu.org}.
369
370 Known bugs that are LilyPond's fault are listed in @file{TODO}, or
371 demonstrated in @file{input/bugs/}.
372
373 Known bugs that are not LilyPond's fault are documented here.
374
375
376 @unnumbered LinuxPPC Bugs:
377
378 @itemize @bullet
379 @item egcs-1.1.2-12c (stock LinuxPPC R5) has a serious bug, upgrade to 
380 fixed in egcs-1.1.2-12f or gcc-2.95-0a, @uref{ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/}
381
382 @item egcs-1.0.2 (LinuxPPC R4):
383 all compiling with @code{-O2} is suspect, in particular guile-1.3, and
384 Lily herself will break.
385 @end itemize
386
387
388
389 @unnumbered Linux-i386
390
391 @itemize @bullet
392 @item SuSE6.2 and similar platforms (glibc 2.1, libstdc++ 2.9.0)
393
394 Lily will crash during parsing (which suggests a C++ library
395 incompatibility).  Precise cause, precise platform description or
396 solution are not known.
397
398 Note that this only happens on some computers with the said platform.
399
400 @item libg++ 2.7
401
402 LilyPond occasionally crashes while parsing the initialisation files.
403 This is a very obscure bug, and usually entering the commandline
404 differently "fixes" it.
405
406 @example
407         lilypond input.ly 
408 @end  example
409
410 and
411 @example
412         lilypond -I. ./input.ly 
413 @end example
414 makes a difference
415
416 Typical stacktrace:
417 @example
418         SIGSEGV
419         __libc_malloc (bytes=16384)
420         ?? ()
421         yyFlexLexer::yy_create_buffer ()
422         Includable_lexer::new_input (this=0x8209a00, s=@{strh_ = @{
423 @end example
424
425 This behaviour has been observed with machines that have old libg++
426 versions (LinuxPPC feb '98, RedHat 4.x).  
427 @end itemize
428
429
430
431
432 @unnumbered Solaris:
433
434 @itemize @bullet
435 @item Sparc64/Solaris 2.6, GNU make-3.77
436
437 GNU make-3.77 is buggy on this platform, upgrade to 3.78.1 or newer.
438
439
440 @item Sparc64/Solaris 2.6, ld
441
442 Not yet resolved.
443 @end itemize
444
445
446 @unnumbered AIX
447
448 @itemize @bullet
449 @item AIX 4.3 ld
450
451 The following is from the gcc install/SPECIFIC file.
452 @quotation
453    Some versions of the AIX binder (linker) can fail with a relocation
454    overflow severe error when the -bbigtoc option is used to link
455    GCC-produced object files into an executable that overflows the TOC. A
456    fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND  
457    -BBIGTOC) is available from IBM Customer Support and from its
458    27service.boulder.ibm.com website as PTF U455193.   
459
460    Binutils does not support AIX 4.3 (at least through release 2.9). GNU
461    as and GNU ld will not work properly and one should not configure GCC
462    to use those GNU utilities. Use the native AIX tools which do
463    interoperate with GCC.
464 @end quotation
465
466 add -Wl,-bbigtoc to USER_LDFLAGS, ie:
467 @example
468     LDFLAGS='-Wl,-bbigtoc' ./configure
469 @end example
470
471 @end itemize
472
473
474 @bye
475