INSTALL - compiling and installing GNU LilyPond

Table of Contents

1 Compiling and installing on Unix

1.1 Downloading

Even numbered minor versions are `stable' (2.6, 2.8, etc), while odd version are development releases (2.7, 2.9, etc). Building LilyPond is an involved process. If possible download a precompiled binary for your platform.

1.1.1 Source code

Download source

For information on packaging, see http://lilypond.org/devel.

1.1.2 Precompiled binary packages

Check out http://lilypond.org/web/install/ for up to date information on binary packages for your platform.

1.2 Requirements

1.2.1 Compilation

In addition to the packages needed for running Lilypond (see below), you need the following extra packages for building.

When installing a binary package FOO, you may need to install the FOO-devel, libFOO-dev or FOO-dev package too.

1.2.2 Running requirements

Running LilyPond requires proper installation of the following software

1.2.3 Building documentation

You can view the documentation online at http://lilypond.org/doc/, but you can also build it locally. This process requires a successful compile of lilypond. The documentation is built by issuing

          make web
     

Building the website requires some additional tools and packages

The HTML files can be installed into the standard documentation path by issuing

          make out=www web-install
     

1.3 Building LilyPond

To install GNU LilyPond, type

          gunzip -c lilypond-x.y.z | tar xf -
          cd lilypond-x.y.z
          ./configure		# run with --help for applicable options
          make
          make install
     

If you are not root, you should choose a --prefix argument that points into your home directory, e.g.

          ./configure --prefix=$HOME/usr
     

1.3.1 Configuring for multiple platforms

If you want to build multiple versions of LilyPond with different configuration settings, you can use the --enable-config=CONF option of configure. You should use `make conf=CONF' to generate the output in out-CONF. Example: Suppose you want to build with and without profiling, then use the following for the normal build

          ./configure --prefix=$HOME/usr/ --enable-checking
          make
          make install
     

and for the profiling version, specify a different configuration

          ./configure --prefix=$HOME/usr/ --enable-profiling --enable-config=prof --disable-checking
          make conf=prof
          make conf=prof install
     

1.4 Emacs mode

An Emacs mode for entering music and running LilyPond is contained in the source archive in the elisp directory. Do make install to install it to elispdir. The file lilypond-init.el should be placed to load-path/site-start.d/ or appended to your ~/.emacs or ~/.emacs.el.

As a user, you may want add your source path (e.g. ~/site-lisp/) to your load-path by appending the following line (as modified) to your ~/.emacs

          (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
     

1.5 Vim mode

A Vim mode for entering music and running LilyPond is contained in the source archive in $VIM directory.

The LilyPond file type is detected if the file ~/.vim/filetype.vim has the following content

          if exists("did_load_filetypes")
            finish
          endif
          augroup filetypedetect
            au! BufNewFile,BufRead *.ly           setf lilypond
          augroup END
     

Please include this path by appending the following line to your ~/.vimrc

          set runtimepath+=/usr/local/share/lilypond/${LILYPOND_VERSION}/vim/
     

where ${LILYPOND_VERSION} is your lilypond version. If Lilypond was not installed in /usr/local/, then change this path accordingly.

1.6 Problems

For help and questions use lilypond-user@gnu.org. Send bug reports to bug-lilypond@gnu.org.

Bugs that are not fault of LilyPond are documented here.

1.6.1 Bison 1.875

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

          $ cd lily; make out/parser.cc
          $ vi +4919 out/parser.cc
          # append a semicolon to the line containing "__attribute__ ((__unused__))
          # save
          $ make
     

MacOS X

For Fink, use the following command to compile.

export GUILE=guile-1.6
export GUILE_CONFIG=guile-1.6-config
export PKG_CONFIG_PATH=/sw/lib/freetype219/lib/pkgconfig/:/sw/lib/fontconfig2/lib/pkgconfig/
./configure

Solaris

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.