LilyPond Contributor's Guide: 4.2.2 Requirements for compiling LilyPond

### 4.2.2 Requirements for compiling LilyPond

This section contains instructions on how to quickly and easily get all the software packages required to build LilyPond.

Most of the more popular Linux distributions only require a few simple commands to download all the software needed. For others, there is an explicit list of all the individual packages (as well as where to get them from) for those that are not already included in your distributions’ own repositories.

#### Fedora

The following instructions were tested on ‘Fedora’ versions 22 & 23 and will download all the software required to both compile LilyPond and build the documentation.

- Download and install all the LilyPond build-dependencies (approximately 700MB);

  >     sudo dnf builddep lilypond --nogpgcheck

- Download and install additional ‘build’ tools required for compiling;

  >     sudo dnf install autoconf gcc-c++

- Download `texi2html 1.82` directly from: http://download.savannah.gnu.org/releases/texi2html/texi2html-1.82.tar.gz;

  `texi2html` is only required if you intend to compile LilyPond’s own documentation (e.g. to help with any document writing). The version available in the Fedora repositories is too new and will not work. Extract the files into an appropriate location and then run the commands;

  >     ./configure
  >     make
  >     sudo make install

  This should install `texi2html 1.82` into `/usr/local/bin`, which will normally take priority over `/usr/bin` where the later, pre-installed versions gets put. Now verify that your operating system is able to see the correct version of `texi2html`.

  >     texi2html --version

- Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.

  >     sudo dnf install git

  Also see Working with source code.

Note: By default, when building LilyPond’s documentation, `pdfTeX` is be used. However ligatures (fi, fl, ff etc.) may not be printed in the PDF output. In this case XeTeX can be used instead. Download and install the `texlive-xetex` package.

>     sudo dnf install texlive-xetex

The scripts used to build the LilyPond documentation will use `XeTeX` instead of `pdfTeX` to generate the PDF documents if it is available. No additional configuration is required.

#### Linux Mint

The following instructions were tested on ‘Linux Mint 17.1’ and ‘LMDE - Betsy’ and will download all the software required to both compile LilyPond and build the documentation..

- Enable the sources repository;
  1. Using the Software Sources GUI (located under Administration).
  2. Select Official Repositories.
  3. Check the Enable source code repositories box under the Source Code section.
  4. Click the Update the cache button and when it has completed, close the Software Sources GUI.
- Download and install all the LilyPond build-dependencies (approximately 200MB);

  >     sudo apt-get build-dep lilypond

- Download and install additional ‘build’ tools required for compiling;

  >     sudo apt-get install autoconf fonts-texgyre texlive-lang-cyrillic

- Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.

  >     sudo apt-get install git

  Also see Working with source code.

Note: By default, when building LilyPond’s documentation, `pdfTeX` is be used. However ligatures (fi, fl, ff etc.) may not be printed in the PDF output. In this case XeTeX can be used instead. Download and install the `texlive-xetex` package.

>     sudo apt-get install texlive-xetex

The scripts used to build the LilyPond documentation will use `XeTex` instead of `pdfTex` to generate the PDF documents if it is available. No additional configuration is required.

#### OpenSUSE

The following instructions were tested on ‘OpenSUSE 13.2’ and will download all the software required to both compile LilyPond and build the documentation.

- Add the sources repository;

      sudo zypper addrepo -f \
      "http://download.opensuse.org/source/distribution/13.2/repo/oss/" sources

- Download and install all the LilyPond build-dependencies (approximately 680MB);

  >     sudo zypper source-install lilypond

- Download and install additional ‘build’ tools required for compiling;

  >     sudo zypper install make

- Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.

  >     sudo zypper install git

  Also see Working with source code.

Note: By default, when building LilyPond’s documentation, `pdfTeX` is be used. However ligatures (fi, fl, ff etc.) may not be printed in the PDF output. In this case XeTeX can be used instead. Download and install the `texlive-xetex` package.

>     sudo zypper install texlive-xetex

The scripts used to build the LilyPond documentation will use `XeTex` instead of `pdfTex` to generate the PDF documents if it is available. No additional configuration is required.

#### Ubuntu

The following commands were tested on Ubuntu versions `14.04 LTS`, `14.10` and `15.04` and will download all the software required to both compile LilyPond and build the documentation.

- Download and install all the LilyPond build-dependencies (approximately 200MB);

  >     sudo apt-get build-dep lilypond

- Download and install additional ‘build’ tools required for compiling;

  >     sudo apt-get install autoconf fonts-texgyre texlive-lang-cyrillic

- Although not ‘required’ to compile LilyPond, if you intend to contribute to LilyPond (codebase or help improve the documentation) then it is recommended that you also need to install `git`.

  >     sudo apt-get install git

  Also see Working with source code.

Note: By default, when building LilyPond’s documentation, `pdfTeX` is be used. However ligatures (fi, fl, ff etc.) may not be printed in the PDF output. In this case XeTeX can be used instead. Download and install the `texlive-xetex` package.

>     sudo apt-get install texlive-xetex

The scripts used to build the LilyPond documentation will use `XeTex` instead of `pdfTex` to generate the PDF documents if it is available. No additional configuration is required.

#### Other

The following individual software packages are required just to compile LilyPond.

- GNU Autoconf
- GNU Bison

  Use version 2.4.1 or newer.

- Compiler with support for C++11

  Version 4.8.5 or newer of the GNU Compiler Collection and version 3.5 or newer of Clang should work.

- Flex

  Use version 2.5.29 or newer.

- FontForge

  Use version 20120731 or newer with enabled scripting using Python 3; it must also be compiled with the ‘`--enable-double`’ switch, else this can lead to inaccurate intersection calculations which end up with poorly-rendered glyphs in the output.

- GNU gettext

  Use version 0.17 or newer.

- GNU Make

  Use version 3.78 or newer.

- MetaFont

  The `mf-nowin`, `mf`, `mfw` or `mfont` binaries are usually packaged along with TeX.

- MetaPost

  The `mpost` binary is also usually packaged with TeX.

- Perl
- Texinfo

  Use version 6.1 or newer.

- Type 1 utilities

  Use version 1.33 or newer.

- Cyrillic fonts

  Often packaged in repositories as `texlive-lang-cyrillic`.

- TeX Gyre ‘OTF’ font packages. As of LilyPond version 2.19.26, the previous default serif, san serif and monospace fonts now use Tex Gyre’s Schola, Heros and Cursor fonts respectively. Also See Fonts.

  Some distributions do not always provide ‘OTF’ font files in the Tex Gyre packages from their repositories. Use the command `fc-list | grep texgyre` to list the fonts available to your system and check that the appropriate `*.otf` files are reported. If they are not then download and manually extract the ‘OTF’ files to either your local `~/.fonts/` directory or use the `configure` command and the `--with-texgyre-dir=/path_to_otf_files/` option.

  The following font families are required:

  Schola, Heros and Cursor.

#### LilyPond — Contributor’s Guide v2.22.2 (stable-branch).