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