10 INSTALL - compiling and installing GNU LilyPond
22 6: CONFIGURING and COMPILING
23 7: CONFIGURING FOR MULTIPLE PLATFORMS
34 You do something which looks remotely like
40 configure # Check out the buildscripts/set-lily.sh script
48 The detailed instructions follow here. The build-
49 scripts/set-lily.sh script sets some environment variables
50 and symlinks, which comes in handly when you have to compile
51 LilyPond very often. It is aimed at people who run (or
52 debug) LilyPond without installing.
58 For compilation you need:
61 o A GNU system: GNU LilyPond is known to run on these GNU
62 systems: Linux (PPC, intel), FreeBSD, AIX, NeXTStep,
63 IRIX, Digital Unix and Solaris.
66 o Lots of disk space: LilyPond takes between 50 and 100
67 mb to compile if you use debugging information. If you
68 are short on disk-space run configure with --disable-
71 Although we recommend to use Unix, LilyPond is known to
72 run on Windows NT/95/98 as well. See Section 11.
75 o GNU C++ version 2.7 or newer (2.8 and egcs are also
78 o Python 1.5 (Strictly speaking, you shouldn't need
79 Python for compiling and installing, but you'll need it
80 to regenerate the font tables, e.g.).
86 GNU LilyPond does use a lot of resources. For operation you
92 o A PostScript printer and/or viewer (such as
93 Ghostscript) is strongly recommended. Xdvi will show
94 all embedded PostScript too if you have Ghostscript
97 For running LilyPond successfully you have to help TeX and
98 MetaFont find various files. The recommended way of doing
99 so is adjusting the environment variables in the start-up
100 scripts of your shell. An example is given here for the
106 export MFINPUTS="/usr/local/share/lilypond/mf:"
107 export TEXINPUTS="/usr/local/share/lilypond/tex:"
112 The empty path component represents and MetaFont's default
113 search paths. Scripts with the proper paths for the bourne
114 and C-shell respectively are generated in build-
115 scripts/out/lilypond-profile and buildscripts/out/lilypond-
116 login during compilation.
122 Although not strictly necessary, these are recommended to
126 o GNU make. Check out ftp://ftp.gnu.org or any mirror of
130 o Flex (version 2.5.4 or newer). Check out
131 ftp://ftp.gnu.org or any mirror of this site.
133 o Bison (version 1.25 or newer). Check out
134 ftp://ftp.gnu.org or any mirror of this site.
137 o GUILE (version 1.2) Check out http://www.gnu.org/pro-
141 o Python (version 1.5 or newer). Check out
142 ftp://ftp.python.org or ftp://ftp.cwi.nl/pub/python.
145 o Yodl. All documentation will be in Yodl. (1.30.17)
146 ftp://pcnov095.win.tue.nl/pub/yodl
147 http://www.cs.uu.nl/~hanwen/yodl
149 o Texinfo. (version 3.12 or newer)
152 o GNU find Check out ftp://ftp.gnu.org or any mirror of
156 o The geometry package for LaTeX is needed to use ly2dvi.
157 Available at ftp://ftp.ctan.org/tex-
158 archive/macros/latex/contrib/supported/geometry or at
159 mirror site ftp://ftp.dante.de
162 o A fast computer (a full page of music typically takes 1
163 minute on my 486/133, using the --enable-checking com-
164 pile. It's lot slower than most MusiXTeX preprocessors)
170 If you want to auto-generate Lily's website, you'll need
171 some additional conversion tools.
174 o xpmtoppm (from the Portable Bitmap Utilities) (For Red-
175 Hat Linux users: it is included within the package
178 o Bib2html http://pertsserver.cs.uiuc.edu/~hull/bib2html.
179 Which, in turn depends on man2html for proper installa-
180 tion. man2html can be had from http://askdon-
181 ald.ask.uni-karlsruhe.de/hppd/hpux/Network-
182 ing/WWW/Man2html-1.05.
184 TeTeX users should not forget to rerun texhash.
186 Building the website requires pnmtopng. The version of pnm-
187 topng that is distributed with RedHat 5.1 contains a bug
188 (pnmtopng is dynamically linked to the wrong version of
189 libpng). Recompile it from source, and make sure that the
190 pnmtopng binary is linked statically to the libpng that is
199 tar xzf libgr-2.0.13.tar.gz
209 You can then install the new pnmtopng into /usr/local/bin/
212 6: CONFIGURING and COMPILING
215 to install GNU LilyPond, simply type:
229 This will install a number of files, something close to:
235 /usr/local/man/man1/mi2mu.1
236 /usr/local/man/man1/convert-mudela.1
237 /usr/local/man/man1/mudela-book.1
238 /usr/local/man/man1/lilypond.1
239 /usr/local/bin/lilypond
241 /usr/local/share/lilypond/*
242 /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo
245 The above assumes that you are root and have the GNU devel-
246 opment tools, and your make is GNU make. If this is not the
247 case, you can adjust your environment variables to your
255 export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR"
262 CPPFLAGS are the preprocessor flags.
264 The configure script is Cygnus configure, and it will accept
265 --help. If you are not root, you will probably have to make
266 it with a different --prefix option. Our favourite location
274 configure --prefix=$HOME/usr
280 In this case, you will have to set up MFINPUTS, and TEXIN-
283 Since GNU LilyPond currently is beta, you are advised to
295 Options to configure include:
299 Link in GUILE (experimental)
302 Enable debugging print routines (lilypond -D option)
305 Set maximum optimisation: compile with -O2. This can
306 be unreliable on some compiler/platform combinations
307 (eg, DEC Alpha and PPC)
310 Compile with support for profiling.
313 Output to a different configuration file. Needed for
314 multi-platform builds
316 All options are documented in the configure help The option
317 --enable-optimise is recommended for Real Life usage.
332 everything will be compiled, but nothing will be installed.
333 The resulting binaries can be found in the subdirectories
334 out/ (which contain all files generated during compilation).
337 7: CONFIGURING FOR MULTIPLE PLATFORMS
340 If you want to compile LilyPond with different configuration
341 settings, then, you can use the --enable-config option.
342 Example: suppose I want to build with and without profil-
343 ing. Then I'd use the following for the normal build,
346 configure --prefix=~ --disable-optimise --enable-checking
354 and for the profiling version, I specify a different config-
362 configure --prefix=~ --enable-profiling --enable-config=optprof --enable-optimise --disable-checking
364 make config=optprof install
374 If you have done a successful make, then a simple
389 If you are doing an upgrade, please remember to remove obso-
390 lete .pk and .tfm files of the fonts. A script has been
391 provided to do the work for you, see bin/clean-fonts.sh.
398 o The -O2 option to gcc triggers a gcc bug on DEC Alpha
399 in dstream.cc. You should turn off this flag for this
408 This is what I type in my xterm:
415 lilypond someinput.ly
423 This is what the output looks like over here:
430 GNU LilyPond 0.0.78 #4/FlowerLib 1.1.24 #0
431 Parsing ... [/home/hw/share/lilypond/init//
433 init//performer.ly]]][input/kortjakje.ly]
434 Creating elements ...[8][16][24][25]
435 Preprocessing elements...
436 Calculating column positions ... [14][25]
437 Postprocessing elements...
438 TeX output to someinput.tex ...
439 Creating MIDI elements ...MIDI output to someinput.midi ...
442 hw:~/musix/spacer$ xdvi someinput&
449 Check out the input files, some of them have comments Please
450 refer to the man page for more information.
456 RedHat Linux users can compile an RPM. A spec file is in
457 make/out/lilypond.spec. You should install a gif file
458 called lelie_icon.gif along with the sources. You can gen-
459 erate this gif file by typing
472 in the directory Documentation.
474 You can make the rpm by issuing
491 A Debian package is also available; contact Anthony Fok
492 foka@debian.org <foka@debian.org>. The build scripts are in
493 the subdirectory debian/
499 Separate instructions on building for W32 are avaible in the
506 Han-Wen Nienhuys <hanwen@cs.uu.nl>
508 Jan Nieuwenhuizen <janneke@gnu.org>