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