<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- header_tag --> <html lang="en"> <head> <title>INSTALL - compiling and installing GNU LilyPond</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="INSTALL - compiling and installing GNU LilyPond"> <meta name="generator" content="makeinfo 4.11"> <link title="Top" rel="top" href="#Top"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } hr { border:0; height:1; color: #000000; background-color: #000000; } /* hr { border: none; height: 1px; color: #666666; background-color: #666666; } body { border-left: 1px solid #666666; border-right: 1px solid #666666; color: #332d28; margin-right: auto; margin-left: auto; width: 60em; list-style-type: square; font-family: Arial,Helvetica,sans-serif; padding-right: 1em; padding-left: 1em; } a { border-bottom: 1px dashed #344242; text-decoration: none; color: #344242; } a:link { text-decoration: none; } a:visited { border-bottom: 1px dashed #666666; color: #666666; } a:active { border-bottom: 1px solid #00cccc; color: #00cccc; } a:hover { border-bottom: 1px solid #1d7b85; color: #1d7b85; } blockquote { border: 1px solid #cccccc; padding: 3px; width: 40em; } .node { border-left: 1px solid #666666; margin: -0.5em 0px 1em; padding: 2px 1px 0px; font-style: italic; } .node a { border: none; text-decoration: underline; font-style: normal; font-weight: bold; } .verbatim { font-family: "Courier New",Courier,monospace; } .unnumberedsubsubsec { font-size: large; color: #1d7b85; } .subsubheading { font-size: large; color: #3b220d; } .contents { border: 1px dashed #339999; margin: 3px 2em; list-style-type: square; padding-right: 1em; width: 40em; background-color: #fcfff9; } .contents a { border-bottom: 1px dashed #423d34; text-decoration: none; color: #423d34; } .contents a:visited { border-bottom: 1px dashed #666666; color: #666666; } .contents a:active { border-bottom: 1px solid #f0d86d; color: #f0d86d; } .contents a:hover { border-bottom: 1px solid #3b220d; color: #3b220d; } .menu { border-left: 1px dashed #339999; margin: 3px 2em 1em; list-style-type: square; padding-left: 1.4em; width: 40em; } .unnumbered { } h2 { font-size: x-large; color: #1d7b85; } */ --></style> </head> <BODY BGCOLOR=WHITE TEXT=BLACK> <a name="Top"></a> <h2 class="unnumbered">INSTALL - compiling and installing GNU LilyPond</h2> <div class="contents"> <h2>Table of Contents</h2> <ul> <li><a name="toc_Top" href="#Top">INSTALL - compiling and installing GNU LilyPond</a> <ul> <li><a href="#Precompiled-binaries">Precompiled binaries</a> <ul> <li><a href="#Precompiled-binaries">Downloading</a> </li></ul> <li><a href="#Compiling-from-source">Compiling from source</a> <ul> <li><a href="#Downloading-source-code">Downloading source code</a> <li><a href="#Requirements">Requirements</a> <ul> <li><a href="#Requirements">Compilation</a> <li><a href="#Requirements">Running requirements</a> <li><a href="#Requirements">Requirements for building documentation</a> </li></ul> <li><a href="#Building-LilyPond">Building LilyPond</a> <ul> <li><a href="#Building-LilyPond">Compiling</a> <li><a href="#Building-LilyPond">Compiling for multiple platforms</a> <li><a href="#Building-LilyPond">Compiling outside the source tree</a> </li></ul> <li><a href="#Building-documentation">Building documentation</a> <ul> <li><a href="#Commands-for-building-documentation">Commands for building documentation</a> <li><a href="#Building-documentation-without-compiling-LilyPond">Building documentation without compiling LilyPond</a> </li></ul> <li><a href="#Testing-LilyPond">Testing LilyPond</a> <li><a href="#Problems">Problems</a> <ul> <li><a href="#Problems">Bison 1.875</a> <li><a href="#Problems">Solaris</a> <li><a href="#Problems">FreeBSD</a> <li><a href="#Problems">International fonts</a> </li></ul> </li></ul> </li></ul> </li></ul> </div> <!-- *- coding: us-ascii; mode: texinfo; -*- --> <!-- ***** Displaying text ***** --> <!-- we need this since @q{\} doesn't work with makeinfo 4.11 - --> <!-- say @q{@bs{}} instead --> <!-- to get decent quotes in `foo' and ``foo'' --> <!-- **** Displaying images not generated by lilypond-book --> <!-- current installation setup of Info docs requires that all images are --> <!-- expected to be found in lilypond/ subdirectory. lilypond-book already --> <!-- generates proper @image commands for images of music; these macros --> <!-- definitions do the same for other images. --> <!-- **** Headings in a doc subsection **** --> <!-- **** Links and references **** --> <!-- Definitions for references: --> <!-- @rglos --> <!-- @rlearning --> <!-- @ruser --> <!-- @rprogram --> <!-- @rlsr --> <!-- @rinternals --> <!-- all these also have a @...named version, which allows to specify the --> <!-- displayed text for the reference as second argument --> <!-- ***** HTML + bigpage is a special case (other manual names), all other --> <!-- formats are treated similarly --> <!-- **** TEX **** --> <!-- *- coding: utf-8; mode: texinfo; -*- --> <!-- This file is part of lilypond-program.tely --> <!-- \version "2.11.51" --> <!-- I don't know what this comment does. Remove? -gp --> <p>There are two sets of releases for LilyPond: stable releases, and unstable development releases. Stable versions have an even-numbered ‘minor’ version number (i.e. 2.8, 2.10, 2.12, etc). Development versions have an odd-numbered ‘minor’ version number (i.e. 2.7, 2.9, 2.11, etc). <p>Building LilyPond is a very involved process, so we <strong>highly</strong> recommend using the precompiled binaries. <p><a name="Precompiled-binaries"></a> <h3 class="section">Precompiled binaries</h3> <h4 class="unnumberedsubsec">Downloading</h4> <p>Check out <a href="http://lilypond.org/web/install/">http://lilypond.org/web/install/</a> for up to date information on binary packages for your platform. If your operating system is not covered on that general page, please see the complete list at <a href="http://download.linuxaudio.org/lilypond/binaries/">http://download.linuxaudio.org/lilypond/binaries/</a> <p>We currently create binaries for <pre class="example"> darwin-ppc - MacOS X powerpc darwin-x86 - MacOS X intel freebsd-64 - FreeBSD 6.x, x86_64 freebsd-x86 - FreeBSD 4.x, x86 linux-64 - Any GNU/Linux distribution, x86_64 linux-arm - Any GNU/Linux distribution, arm linux-ppc - Any GNU/Linux distribution, powerpc linux-x86 - Any GNU/Linux distribution, x86 mingw - Windows x86 </pre> <!-- TRANSLATORS: --> <!-- Please **do not** translate anything below this line. Users --> <!-- should not be compiling LilyPond themselves; if they really --> <!-- want to do so, they should be able to read the English docs, --> <!-- because they'll probably need to ask questions in English --> <!-- on the -devel list. -gp --> <p><a name="Compiling-from-source"></a> <h3 class="section">Compiling from source</h3> <p><a name="Downloading-source-code"></a> <h4 class="subsection">Downloading source code</h4> <p>Download source <ul> <li>tarballs from <a href="http://lilypond.org/download/">http://lilypond.org/download/</a> by HTTP. <li>tarballs from <a href="http://download.linuxaudio.org/lilypond/">http://download.linuxaudio.org/lilypond/</a> by HTTP. <li>GIT from <a href="http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=summary">git.sv.gnu.org</a> <pre class="example"> git clone git://git.sv.gnu.org/lilypond.git </pre> <p>The repository does not contain generated files. To create <samp><span class="file">configure</span></samp>, run <pre class="example"> ./autogen.sh </pre> </ul> <p>For information on packaging, see <a href="http://lilypond.org/devel">http://lilypond.org/devel</a>. <p><a name="Requirements"></a> <h4 class="subsection">Requirements</h4> <h5 class="unnumberedsubsubsec">Compilation</h5> <p>In addition to the packages needed for running LilyPond (see below), you need the following extra packages for building. <p>When installing a binary package FOO, you may need to install the FOO-devel, libFOO-dev or FOO-dev package too. <ul> <li><a href="http://fontforge.sf.net/">FontForge</a> 20060125 or newer. <li>MetaFont (mf-nowin, mf, mfw or mfont binaries), usually packaged with a LaTeX distribution like tetex or texlive. <li><a href="http://www.lcdf.org/~eddietwo/type/#t1utils">t1utils</a> (version 1.33 or newer recommended). <li>New Century Schoolbook fonts, as PFB files. These are shipped with X11 and Ghostscript, and are named <samp><span class="file">c059033l.pfb</span></samp> <samp><span class="file">c059036l.pfb</span></samp>, <samp><span class="file">c059013l.pfb</span></samp> and <samp><span class="file">c059016l.pfb</span></samp>. <li><a href="http://www.gnu.org/software/guile/guile.html">GUILE</a> (version 1.8.2 or newer). If you are installing binary packages, you may need to install guile-devel or guile-dev or libguile-dev too. <li><a href="ftp://ftp.gnu.org/gnu/texinfo/">Texinfo</a> (version 4.11 or newer). <li><a href="http://gcc.gnu.org/">The GNU c++ compiler</a> (version 3.4 or newer. 4.x is strongly recommended). <li><a href="http://www.python.org">Python</a> (version 2.4 or newer) <li><a href="ftp://ftp.gnu.org/gnu/make/">GNU Make</a> (version 3.78 or newer). <li><a href="http://www.gnu.org/software/gettext/gettext.html">gettext</a>. <li><a href="http://www.gnu.org/software/flex/">Flex</a>. <li><a href="http://www.perl.org/">Perl</a>. <li><a href="http://www.gnu.org/software/flex/">GNU Bison</a>. <li>All packages required for running, including development packages with header files and libraries. </ul> <h5 class="unnumberedsubsubsec">Running requirements</h5> <p>Running LilyPond requires proper installation of the following software <ul> <li><a href="http://www.freetype.org/">Freetype</a> (version 2.1.10 or newer). <li><a href="http://www.freetype.org/">FontConfig</a> (version 2.2). <li><a href="http://www.pango.org/">Pango</a> (version 1.12 or newer). <li><a href="http://www.gnu.org/software/guile/guile.html">GUILE</a> (version 1.8.2 or newer), or patch 1.8.1 with <a href="http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch">http://lilypond.org/vc/gub.darcs/patches/guile-1.8-rational.patch</a>. <li><a href="http://www.python.org">Python</a> (version 2.4 or newer). <li><a href="http://www.ghostscript.com">Ghostscript</a> (version 8.15 or newer. 8.50 recommended) <li>Dejaview. (This is normally installed by default) </ul> <p>International fonts are required to create music with international text or lyrics. <h5 class="unnumberedsubsubsec">Requirements for building documentation</h5> <p>You can view the documentation online at <a href="http://lilypond.org/doc/">http://lilypond.org/doc/</a>, but you can also build it locally. This process requires a successful compile of LilyPond, and some additional tools and packages <ul> <li>The <a href="http://netpbm.sourceforge.net/">netpbm utilities</a> <li>ImageMagick <li>International fonts (see input/regression/utf-8.ly for hints about which font packages are necessary for your platform) <li>Ghostscript, 8.50 with the patch from <a href="http://bugs.ghostscript.com/show_bug.cgi?id=688154">http://bugs.ghostscript.com/show_bug.cgi?id=688154</a> and the patch from <a href="http://bugs.ghostscript.com/show_bug.cgi?id=688017">http://bugs.ghostscript.com/show_bug.cgi?id=688017</a>, or use a release of Ghostscript which includes these patches, for example 8.60 or newer. </ul> <p><a name="Building-LilyPond"></a> <h4 class="subsection">Building LilyPond</h4> <h5 class="unnumberedsubsubsec">Compiling</h5> <p>To install GNU LilyPond, type <pre class="example"> gunzip -c lilypond-x.y.z | tar xf - cd lilypond-x.y.z ./configure # run with --help for applicable options make su -c 'make install' </pre> <p class="noindent">If you are not root, you should choose a <code>--prefix</code> argument that points into your home directory, e.g. <pre class="example"> ./configure --prefix=$HOME/usr </pre> <h5 class="unnumberedsubsubsec">Compiling for multiple platforms</h5> <p>If you want to build multiple versions of LilyPond with different configuration settings, you can use the <code>--enable-config=CONF</code> option of <samp><span class="command">configure</span></samp>. You should use <code>make conf=CONF</code> to generate the output in <samp><span class="file">out-CONF</span></samp>. For example, suppose you want to build with and without profiling, then use the following for the normal build <pre class="example"> ./configure --prefix=$HOME/usr/ --enable-checking make make install </pre> <p>and for the profiling version, specify a different configuration <pre class="example"> ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking make conf=prof make conf=prof install </pre> <h5 class="unnumberedsubsubsec">Compiling outside the source tree</h5> <p>It is possible to compile LilyPond in a build tree different from the source tree, with <code>--srcdir</code> option of <samp><span class="command">configure</span></samp>: <pre class="example"> mkdir lily-build && cd lily-build <var>sourcedir</var>/configure --srcdir=<var>sourcedir</var> </pre> <p><a name="Building-documentation"></a> <h4 class="subsection">Building documentation</h4> <p>This requires a successful compile of LilyPond, or using an external LilyPond binary. <p><a name="Commands-for-building-documentation"></a> <h5 class="unnumberedsubsubsec">Commands for building documentation</h5> <p>The documentation is built by issuing <pre class="example"> make web </pre> <p>After compilation, the HTML documentation tree is available in <samp><span class="file">out-www/offline-root/</span></samp>, and can be browsed locally. <p>The HTML and PDF files can be installed into the standard documentation path by issuing <pre class="example"> make web-install </pre> <p class="noindent">This also installs Info documentation with images if the installation prefix is properly set; otherwise, instructions for manual installation of Info documentation are printed on standard output. <p>It is also possible to build a documentation tree in <samp><span class="file">out-www/online-root/</span></samp>, with special processing, so it can be used on a website with content negotiation for automatic language selection; this can be achieved by issuing <pre class="example"> make WEB_TARGETS=online web </pre> <p class="noindent">and both ‘offline’ and ‘online’ targets can be generated by issuing <pre class="example"> make WEB_TARGETS="offline online" web </pre> <p>Several targets are available to clean the documentation build and help with maintaining documentation; an overview of these targets is available with <pre class="example"> make help </pre> <p class="noindent">from every directory in the build tree. Most targets for documentation maintenance are available from <samp><span class="file">Documentation/</span></samp>; for more information, see <samp><span class="file">Documentation/user/README.txt</span></samp> and <samp><span class="file">Documentation/TRANSLATION</span></samp>. <p class="noindent"> <h5 class="subsubheading">Known issues and warnings</h5> <p><code>-j</code> command-line option of <samp><span class="command">make</span></samp> is unsupported for building the documentation. As the most time consuming task is running LilyPond to build images of music, the makefile variable <code>CPU_COUNT</code> may be set in <samp><span class="file">local.make</span></samp> or on the command line to the number of <code>.ly</code> files that LilyPond should process simultaneously, e.g. on a bi-processor or Dual core machine <pre class="example"> make CPU_COUNT=2 web </pre> <p>If source files have changed since last documentation build, output files that need to be rebuilt are normally rebuilt, even if you do not run <code>make web-clean</code> first. However, building dependencies in the documentation are so complex that rebuilding of some targets may not be triggered as they should be; a workaround is to force rebuilding by touching appropriate files, e.g. <pre class="example"> touch Documentation/user/*.itely touch input/lsr/*.ly </pre> <p><a name="Building-documentation-without-compiling-LilyPond"></a> <h5 class="unnumberedsubsubsec">Building documentation without compiling LilyPond</h5> <p>The documentation can be built locally without compiling LilyPond binary, if LilyPond is already installed on your system. <p>From a fresh Git checkout, do <pre class="example"> ./autogen.sh # ignore any warning messages cp GNUmakefile.in GNUmakefile make -C python nice make LILYPOND_EXTERNAL_BINARY=/path/to/bin/lilypond web </pre> <p>Please note that this may break sometimes – for example, if a new feature is added with a test file in input/regression, even the latest development release of LilyPond will fail to build the docs. <p>You may build the manual without building all the <samp><span class="file">input/*</span></samp> stuff: change directory, for example to <samp><span class="file">Documentation/user</span></samp>, issue <code>make web</code>, which will build documentation in a subdirectory <samp><span class="file">out-www</span></samp> from the source files in current directory. In this case, if you also want to browse the documentation in its post-processed form, change back to top directory and issue <pre class="example"> make out=www WWW-post </pre> <p class="noindent"> <h5 class="subsubheading">Known issues and warnings</h5> <p>You may also need to create a script for <samp><span class="command">pngtopnm</span></samp> and <code>pnmtopng</code>. On GNU/Linux, I use this: <pre class="verbatim"> export LD_LIBRARY_PATH=/usr/lib exec /usr/bin/pngtopnm "$@" </pre> <p>On MacOS X, I use this: <pre class="verbatim"> export DYLD_LIBRARY_PATH=/sw/lib exec /sw/bin/pngtopnm "$@" </pre> <p><a name="Testing-LilyPond"></a> <h4 class="subsection">Testing LilyPond</h4> <p><a name="testing"></a> <p>LilyPond comes with an extensive suite that exercises the entire program. This suite can be used to automatically check the impact of a change. This is done as follows <pre class="example"> make test-baseline <em>## apply your changes, compile</em> make check </pre> <p>This will leave an HTML page <samp><span class="file">out/test-results/index.html</span></samp>. This page shows all the important differences that your change introduced, whether in the layout, MIDI, performance or error reporting. <p>To rerun tests, use <pre class="example"> make test-redo <em>## redo files differing from baseline</em> make test-clean <em>## remove all test results</em> </pre> <p class="noindent">and then run <code>make check</code> again. <p>For tracking memory usage as part of this test, you will need GUILE CVS; especially the following patch: <a href="http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch">http://lilypond.org/vc/gub.darcs/patches/guile-1.9-gcstats.patch</a>. <p>For checking the coverage of the test suite, do the following <pre class="example"> ./buildscripts/build-coverage.sh <em># uncovered files, least covered first</em> python ./buildscripts/coverage.py --summary out-cov/*.cc <em># consecutive uncovered lines, longest first</em> python ./buildscripts/coverage.py --uncovered out-cov/*.cc </pre> <p><a name="Problems"></a> <h4 class="subsection">Problems</h4> <p>For help and questions use <a href="mailto:lilypond-user@gnu.org">lilypond-user@gnu.org</a>. Send bug reports to <a href="mailto:bug-lilypond@gnu.org">bug-lilypond@gnu.org</a>. <p>Bugs that are not fault of LilyPond are documented here. <h5 class="unnumberedsubsubsec">Bison 1.875</h5> <p>There is a bug in bison-1.875: compilation fails with "parse error before `goto'" in line 4922 due to a bug in bison. To fix, please recompile bison 1.875 with the following fix <pre class="example"> $ cd lily; make out/parser.cc $ vi +4919 out/parser.cc # append a semicolon to the line containing "__attribute__ ((__unused__)) # save $ make </pre> <h5 class="unnumberedsubsubsec">Solaris</h5> <p>Solaris7, ./configure <p><samp><span class="file">./configure</span></samp> needs a POSIX compliant shell. On Solaris7, <samp><span class="file">/bin/sh</span></samp> is not yet POSIX compliant, but <samp><span class="file">/bin/ksh</span></samp> or bash is. Run configure like <pre class="example"> CONFIG_SHELL=/bin/ksh ksh -c ./configure </pre> <p class="noindent">or <pre class="example"> CONFIG_SHELL=/bin/bash bash -c ./configure </pre> <h5 class="unnumberedsubsubsec">FreeBSD</h5> <p>To use system fonts, dejaview must be installed. With the default port, the fonts are installed in <samp><span class="file">usr/X11R6/lib/X11/fonts/dejavu</span></samp>. <p>Open the file <samp><span class="file">$LILYPONDBASE/usr/etc/fonts/local.conf</span></samp> and add the following line just after the <code><fontconfig></code> line. (Adjust as necessary for your hierarchy.) <pre class="example"> <dir>/usr/X11R6/lib/X11/fonts</dir> </pre> <h5 class="unnumberedsubsubsec">International fonts</h5> <p>On MacOS X, all fonts are installed by default. However, finding all system fonts requires a bit of configuration; see <a href="http://lists.gnu.org/archive/html/lilypond-user/2007-03/msg00472.html">this post</a> on the <code>lilypond-user</code> mailing list. <p>On Linux, international fonts are installed by different means on every distribution. We cannot list the exact commands or packages that are necessary, as each distribution is different, and the exact package names within each distribution changes. Here are some hints, though: <pre class="verbatim"> Red Hat Fedora taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \ ttfonts-zh_CN fonts-ja fonts-hebrew Debian GNU/Linux apt-get install emacs-intl-fonts xfonts-intl-.* \ ttf-kochi-gothic ttf-kochi-mincho \ xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi </pre> <!-- footer_tag --> <div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;"> <p> <font size="-1"> This page is for LilyPond-2.11.57 (development-branch). <br> <address> Report errors to <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a>. </address> <br> Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome. </font> </p> </div> </BODY></html> <!-- Local Variables: coding: utf-8 End: -->