3.9 Using a Virtual Machine to Compile LilyPond

TODO: rewrite for lily-git.tcl !!! do before GOP! -gp

Since it is not possible to compile Lilypond on Windows, some developers may find it useful to install a GNU/Linux virtual machine. A disk image with a special remix of Ubuntu has been created for this purpose. It has all of the Lilypond build dependencies in place, so that once installed, it is ready to compile both Lilypond and the Documentation. The lilybuntu remix is available for download here:

http://files.lilynet.net/lilybuntu.iso

We do not necessarily recommend any one virtualization tool, however the lilybuntu remix is known to work well on Sun VirtualBox, which is a free download. Consult your virtualization software’s documentation for instructions on setting up the software and for general instructions on installing a virtual machine.

Steps to setting up lilybuntu in a virtual machine:

  1. Download the lilybuntu disk image.
  2. Install lilybuntu. You will use the .iso file as the boot disk. It should not be necessary to burn it to a DVD, but consult the documentation for your virtualization software for specific instructions. If possible, use at least the recommended amount of RAM for the virtual machine (384 MB on VirtualBox), and use a dynamically expanding virtual hard drive. A virtual hard drive with 6 GB will be enough to compile LilyPond, but if you intend to build the docs and run the regression tests the virtual hard drive should be at least 10 GB. The Ubuntu installation should be straightforward, although in the partitioning stage do not be afraid to select “use entire disk,” since this is only your virtual disk and not your machine’s actual hard drive.
  3. After installation is complete, restart the virtual machine. If you are using VirtualBox, you may wish to install the “Guest Additions”, which while not essential for compiling Lilypond will allow you to use the virtual machine in full screen, Seamless mode (also known as Unity mode on other virtualization platforms) and allow you to share clipboards between the physical and virtual machine. From the Devices menu select Install Guest Additions..., the VBOXADDITIONS CDROM device will appear on the desktop. Open a terminal session. (Applications > Accessories > Terminal) and cd to the top level of the CDROM. Run the autorun.sh script as superuser (sudo ./autorun.sh ), a console window will open while the “Guest Additions” are being installed. Once the script has been finished, reboot your Virtual Machine to complete the installation of the “Guest Additions”.
  4. Open a terminal session. (Applications > Accessories > Terminal)
  5. Open Firefox (there’s an icon for it on the panel at the top of the screen) and go to the online Lilypond Contributor’s Guide.
  6. To retrieve the Lilypond source code from git, copy-and-paste each command from the CG “Main source code” section into the terminal. (paste into the terminal with keystroke CTRL+SHIFT+V)
  7. Prepare to build Lilypond by running the configuration script. Type
    ./autogen.sh
    

    When it is finished you should be presented with the three most common make options:

    Type:
        make all       to build LilyPond
        make install   to install LilyPond
        make help      to see all possible targets
    
    Edit local.make for local Makefile overrides.
    
  8. First type make all to build Lilypond. This will take a while.
  9. When Lilypond is finished building, build the documentation by typing
    make doc
    

    Depending on your system specs it could take from 30-60 minutes to finish.

At this point everything has been compiled. You may install Lilypond using make install, or you may wish to set up your system with concurrent stable and development versions as described in the previous section.


LilyPond — Contributor’s Guide