]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/topdocs/INSTALL.texi
release: 1.3.143
[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 @section Obtaining
11
12 You can get the latest version of LilyPond at
13 @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/,
14 ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}.
15
16
17 @emph{If you upgrade by patching do remember to rerun autoconf after
18 applying the patch}.
19
20 If you do not want to download the entire archive for each version, the
21 safest method for upgrading is to use @file{xdelta}, see
22 @uref{ftp://ftp.xcf.berkeley.edu/pub/xdelta/}.
23
24 The following command produces @file{lilypond-1.3.122.tar.gz} from
25 @file{lilypond-1.3.121} identical (up to compression dates) to the .122 on
26 the FTP site.
27 @example
28   xdelta patch lilypond-1.3.121-1.3.122.xd lilypond-1.3.121.tar.gz
29 @end example
30
31 @section Prerequisites
32
33 For compilation you need:
34
35 @itemize @bullet
36 @item A GNU system: GNU LilyPond is known to run on these GNU systems: Linux
37     (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and
38     Solaris.
39
40 @item Lots of disk space: LilyPond takes between 30 and 100 mb to
41 compile if you use debugging information.  If you are short on
42 disk-space run configure with @code{--disable-debugging}.
43
44 @item
45 Although we recommend to use Unix, LilyPond is known to run on Windows
46 NT/95/98 as well.  See Section Windows NT/95,es.
47
48 @item A reasonable C++ compiler:  EGCS 1.1, GCC 2.95.2 or newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/}.
49
50 @item  Python 1.5,
51 Check out @uref{ftp://ftp.python.org} or
52 @uref{ftp://ftp.cwi.nl/pub/python}.
53
54 @item  GUILE 1.3.4 or newer,  check out
55 @uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}.
56 Version 1.4 is recommended for better performance.
57
58 @item GNU Make. 
59 Check out
60 @uref{ftp://ftp.gnu.org/gnu/make/,ftp://ftp.gnu.org/gnu/make/}.
61
62 @item Flex (version 2.5.4a or newer). 
63 Check out @uref{ftp://ftp.gnu.org/pub/gnu/non-gnu/flex/,ftp://ftp.gnu.org/pub/gnu/non-gnu/flex/}.
64
65 @item Bison (version 1.25 or newer).
66 Check out @uref{ftp://ftp.gnu.org/gnu/bison/,ftp://ftp.gnu.org/gnu/bison/}.
67
68 @item TeX.  If you want LilyPond to use kpathsea support (recommended),
69 make sure you have tetex 1.0 or newer (1.0.6 is known to work).  You may
70 need to install a tetex-devel or tetex-dev package too.
71
72 @item Texinfo (version 4.0 or newer). 
73 Check out @uref{ftp://ftp.gnu.org/gnu/texinfo/,ftp://ftp.gnu.org/gnu/texinfo/}.
74 Most documentation is in texinfo.
75
76 @item The geometry package for LaTeX is needed to use ly2dvi.  
77 Available at 
78 @uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry}
79 or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de}
80
81 @item MetaPost, needed for generating PostScript fonts. Please
82 note that tetex-0.4pl8 (included with Red Hat 5.x) does not include
83 @file{mfplain.mp}, which is needed for producing the scalable font
84 files.
85
86 If you do not want to use PostScript output, edit @file{mf/GNUmakefile},
87 removing the line saying @code{PFA_FILES=}
88
89 @item kpathsea, a library for searching (TeX) files.  @code{kpathsea} is
90 usually included with your installation of TeX. 
91
92 @end itemize
93
94 @section Running
95
96 GNU LilyPond does use a lot of resources. For operation you need the
97 following software
98
99 @itemize @bullet
100 @item TeX.
101 @item A PostScript printer and/or viewer (such as Ghostscript) is strongly
102     recommended.  Xdvi will show all embedded PostScript too if you have
103     Ghostscript installed.
104 @item  GUILE 1.3.4, or newer.  Check out @uref{http://www.gnu.org/programs/guile.html,http://www.gnu.org/software/guile/}
105 @end itemize
106
107 For running LilyPond successfully you have to help TeX and MetaFont find
108 various files.  The recommended way of doing so is adjusting the
109 environment variables in the start-up scripts of your shell. Appropriate
110 Csh and sh scripts are left in @file{buildscripts/out/lilypond-profile}
111 and @file{buildscripts/out/lilypond-login} after compilation.
112
113 The empty path component represents TeX and MetaFont's default search
114 paths.  Scripts with the proper paths for the bourne and C-shell
115 respectively are generated in @file{buildscripts/out/lilypond-profile}
116 and @file{buildscripts/out/lilypond-login} during compilation.
117
118 LilyPond is a big and slow program.  A fast CPU and plenty of RAM is
119 recommended for comfortable use.
120
121 @section Website
122
123 The website is the most convenient form to use for reading the
124 documentation on-line documentation. It is made by entering
125
126 @example 
127
128   make web-doc
129  
130 @end example 
131 This does require a functioning LilyPond.  The executable doesn't have
132 to be installed, though.
133
134 If you want to auto-generate Lily's website, you'll need some additional
135 conversion tools.
136
137 @itemize @bullet
138 @item xpmtoppm (from the netpbm package: the Portable Bitmap Utilities) (For Red Hat Linux
139              users: it is included within the package libgr-progs).
140         The original is at
141 @uref{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz,ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz}
142
143 @item pnmtopng (also in libgr-progs for Red Hat). The original is
144 at
145 @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
146
147 The version of @file{pnmtopng} that is distributed with Red Hat 5.1 and
148 5.2 contains a bug: pnmtopng is dynamically linked to the wrong
149 version of libpng.
150
151 @item @uref{http://www.lri.fr/~filliatr/ftp/bibtex2html/, Bibtex2html}, or
152 @uref{http://www.uni-koblenz.de/ag-ki/ftp/bib2html/, Bib2html}.
153 Bibtex2html is available in debian, while bib2html is in some rpm based
154 distributions.
155 Bib2html, in turn depends on man2html for proper installation.
156 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}.
157
158 The website will build without bib converter utility, but you will not
159 see our hypertextified bibliography.
160
161 @end itemize
162
163 @section Configuring and compiling
164
165 to install GNU LilyPond, simply type:
166 @example 
167         gunzip -c lilypond-x.y.z | tar xf -
168         cd lilypond-x.y.z
169         ./configure             # fill in your standard prefix with --prefix
170         make
171         make install
172 @end example 
173
174 This will install a number of files, something close to:
175
176 @example 
177         /usr/local/man/man1/midi2ly.1
178         /usr/local/man/man1/abc2ly.1
179         /usr/local/man/man1/etf2ly.1
180         /usr/local/man/man1/convert-ly.1
181         /usr/local/man/man1/lilypond-book.1
182         /usr/local/man/man1/lilypond.1
183         /usr/local/bin/lilypond
184         /usr/local/bin/midi2ly
185         /usr/local/bin/convert-ly
186         /usr/local/bin/lilypond-book
187         /usr/local/bin/abc2ly
188         /usr/local/bin/pmx2ly
189         /usr/local/bin/musedata2ly
190         /usr/local/bin/etf2ly
191         /usr/local/share/lilypond/*
192         /usr/local/share/locale/@{....@}/LC_MESSAGES/lilypond.mo
193 @end example 
194
195
196 The above assumes that you are root and have the GNU development
197 tools, and your make is GNU make.  If this is not the case, you can
198 adjust your environment variables to your taste:
199
200 @example 
201
202         export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" 
203         ./configure
204  
205 @end example 
206
207 @code{CPPFLAGS} are the preprocessor flags. 
208
209 The configure script is Cygnus configure, and it will accept
210 @code{--help}. If you are not root, you will probably have to make it
211 with a different @code{--prefix} option.  Our favourite location is
212
213 @example 
214
215         ./configure --prefix=$HOME/usr
216  
217 @end example 
218
219 In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly.
220
221 Since GNU LilyPond currently is beta, you are advised to also use
222
223 @example 
224
225         --enable-debugging
226         --enable-checking
227  
228 @end example 
229
230 Options to configure include:
231
232 @table @samp
233 @item @code{--enable-printing}
234     Enable debugging print routines (lilypond @code{-D} option)
235 @item @code{--enable-optimise}
236     Set maximum optimisation: compile with @code{-O2}.  This can be
237 unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC)
238 @item @code{--enable-profiling}
239     Compile with support for profiling.
240 @item @code{--enable-config=CONF}
241     Output to different configuration files.  Enables different binary
242     builds alongside eachother, eg, multi-configuration (debugging,
243     profiling), or multi-platform builds.  Use `make conf=CONF' to
244     build for a specific configuration.
245 @end table
246
247 All options are documented in the @file{configure} help
248 The option @code{--enable-optimise} is recommended for Real Life usage.
249
250 If you do
251
252 @example 
253
254         make all
255  
256 @end example 
257
258 everything will be compiled, but nothing will be installed.  The
259 resulting binaries can be found in the subdirectories @file{out/} (which
260 contain all files generated during compilation).
261
262
263 @section Emacs mode
264
265
266 An emacs mode for LilyPond is included with the source archive as
267 @file{lilypond-mode.el} and @file{lilypond-font-lock.el}.  If you have
268 an RPM, it is in @file{/usr/share/doc/lilypond-X/}.  You have to install
269 it yourself.
270
271 Add this to your ~/.emacs or ~/.emacs.el:
272 @example 
273     (load-library "lilypond-mode.el")
274     (setq auto-mode-alist
275       (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
276     (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))
277 @end example
278
279 If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode
280 is automatically loaded, so you need not modify your ~/.emacs file.
281
282
283 @section Configuring for multiple platforms
284
285 If you want to build multiple versions of LilyPond with different
286 configuration settings, you can use the @code{--enable-config=CONF}
287 option.  You should use @samp{make conf=CONF} to generate the output in
288 @file{out-CONF}.  Example: suppose I want to build with and without
289 profiling.  Then I'd use the 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 conf=prof
305       make conf=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 Red Hat Linux
328
329 Red Hat 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 Red Hat 7.0 i386 RPMS are available from
342 @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
343
344 For compilation on a Red Hat 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 SuSE
357
358 [TODO: document this]
359
360 Install @code{tetex}, @code{te_mpost}, @code{te_kpath}.
361
362
363 @section Debian GNU/Linux
364
365 A Debian package is also available.  You may install it easily by using
366 apt-get as root:
367
368 @example
369         apt-get install lilypond1.3
370 @end example
371
372 Alternatively, visit
373
374 @itemize @bullet
375 @item @uref{http://packages.debian.org/lilypond,http://packages.debian.org/lilypond}
376 @item @uref{http://ftp.debian.org/debian/pool/main/l/lilypond1.3/,http://ftp.debian.org/debian/pool/main/l/lilypond1.3/}
377 for latest package uploaded to Debian unstable;
378 @item @uref{http://people.debian.org/~foka/lilypond/,http://people.debian.org/~foka/lilypond/}
379 for latest semi-unofficial build of LilyPond 1.3.121 for Debian 2.2r2 (potato) users.
380 The official stable Debian 2.2r2 is stuck with the old LilyPond-1.3.24.
381 @end itemize
382
383 You may contact Anthony Fok @email{foka@@debian.org} for more information.
384
385 The build scripts are in the subdirectory @file{debian/}; you can
386 make the .deb by doing, for example:
387
388 @example
389         $ su - root
390         # dpkg --purge lilypond lilypond1.3
391         # exit
392         $ tar xzf lilypond-1.3.122.tar.gz
393         $ cd lilypond-1.3.122
394         $ dch -p -v 1.3.122-0.local.1 "Local build."
395         $ debuild
396         $ su - root
397         # dpkg -i ../lilypond1.3_1.3.122*.deb
398         # exit
399         $
400 @end example
401
402 For compilation on a Debian GNU/Linux system you need these packages,
403 in addition to the those needed for running:
404
405 @itemize @bullet
406 @item g++, cpp, libc6-dev, libstdc++<your-libstdc++-version-here>-dev
407 @item libguile<your-libguile-version-here>-dev
408 @item make, m4, flex, bison
409 @item gettext
410 @item groff, texinfo, bibtex2html (not in 2.2r2)
411 @item tetex-base, tetex-bin, tetex-extra, libkpathsea-dev or tetex-dev
412 @item dpkg-dev, debhelper, fakeroot
413 @item gs, netpbm, pnmtopng
414 @end itemize
415
416 Most of these are listed on the Build-Depends line in the
417 debian/control file.  To ensure the creation of the lilypond deb is
418 trouble-free, we recommend that you first install the following packages
419 before starting dpkg-buildpackage by running apt-get as root.
420
421 For Debian 2.2 (or 2.2r2, 2.2r3):
422
423 @example
424         apt-get install task-debian-devel task-c++-dev \
425                 python-base libguile6-dev tetex-bin tetex-dev \
426                 tetex-extra flex bison texinfo groff gs \
427                 netpbm pnmtopng m4 gettext
428 @end example
429
430 For Debian in development ("unstable", the future 2.3 or 3.0):
431
432 @example
433         apt-get install task-debian-devel task-c++-dev \
434                 python-base libguile9-dev tetex-bin libkpathsea-dev \
435                 tetex-extra flex bison texinfo bibtex2html groff gs \
436                 netpbm pnmtopng m4 gettext
437 @end example
438
439 And, just so that old fonts from previous versions of LilyPond won't
440 interfere with your build, you may want to do this before the build too:
441
442 @example
443         dpkg --purge lilypond lilypond1.3
444 @end example
445
446
447 @section Windows NT/95
448
449 Separate instructions on building for W32 are available; See the files
450 in @file{Documentation/ntweb/}, included with the sources.
451
452 @section Problems
453
454 For help and questions use @email{help-gnu-music@@gnu.org} and
455 @email{gnu-music-discuss@@gnu.org}.  Please consult the faq before
456 mailing your problems.
457
458 If you find bugs, please send bug reports to
459 @email{bug-gnu-music@@gnu.org}.
460
461 Bugs that are LilyPond's fault are listed in our TODO list on the
462 web, or demonstrated in @file{input/bugs/}.
463
464 Bugs that are not LilyPond's fault are documented here.
465
466
467 @unnumbered LinuxPPC Bugs:
468
469 @itemize @bullet
470 @item egcs-1.1.2-12c (stock LinuxPPC R5) has a serious bug, upgrade to 
471 fixed in egcs-1.1.2-12f or gcc-2.95-0a, @uref{ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/}
472
473 @item egcs-1.0.2 (LinuxPPC R4):
474 all compiling with @code{-O2} is suspect, in particular guile-1.3, and
475 Lily herself will break.
476 @end itemize
477
478
479
480 @unnumbered Linux-i386
481
482 @itemize @bullet
483 @item SuSE6.2 and similar platforms (glibc 2.1, libstdc++ 2.9.0)
484
485 Lily will crash during parsing (which suggests a C++ library
486 incompatibility).  Precise cause, precise platform description or
487 solution are not known.
488
489 Note that this only happens on some computers with the said platform.
490
491 @item libg++ 2.7
492
493 LilyPond occasionally crashes while parsing the initialisation files.
494 This is a very obscure bug, and usually entering the commandline
495 differently "fixes" it.
496
497 @example
498         lilypond input.ly 
499 @end  example
500
501 and
502 @example
503         lilypond -I. ./input.ly 
504 @end example
505 makes a difference
506
507 Typical stacktrace:
508 @example
509         SIGSEGV
510         __libc_malloc (bytes=16384)
511         ?? ()
512         yyFlexLexer::yy_create_buffer ()
513         Includable_lexer::new_input (this=0x8209a00, s=@{strh_ = @{
514 @end example
515
516 This behaviour has been observed with machines that have old libg++
517 versions (LinuxPPC feb '98, Red Hat 4.x).  
518 @end itemize
519
520
521
522
523 @unnumbered Solaris:
524
525 @itemize @bullet
526 @item Sparc64/Solaris 2.6, GNU make-3.77
527
528 GNU make-3.77 is buggy on this platform, upgrade to 3.78.1 or newer.
529
530
531 @item Sparc64/Solaris 2.6, ld
532
533 Not yet resolved.
534 @end itemize
535
536
537 @unnumbered AIX
538
539 @itemize @bullet
540 @item AIX 4.3 ld
541
542 The following is from the gcc install/SPECIFIC file.
543 @quotation
544    Some versions of the AIX binder (linker) can fail with a relocation
545    overflow severe error when the -bbigtoc option is used to link
546    GCC-produced object files into an executable that overflows the TOC.
547    A fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND  
548    -BBIGTOC) is available from IBM Customer Support and from its
549    27service.boulder.ibm.com website as PTF U455193.   
550
551    Binutils does not support AIX 4.3 (at least through release 2.9). GNU
552    as and GNU ld will not work properly and one should not configure GCC
553    to use those GNU utilities. Use the native AIX tools which do
554    interoperate with GCC.
555 @end quotation
556
557 add -Wl,-bbigtoc to USER_LDFLAGS, ie:
558 @example
559     LDFLAGS='-Wl,-bbigtoc' ./configure
560 @end example
561
562 @end itemize
563
564
565 @bye
566