Compiling from Source

John Maguire edited this page Feb 12, 2018 · 28 revisions


You probably don't need to compile Clementine yourself. We already provide downloads for Debian, Ubuntu, Fedora, Windows and Mac OS X. If you don't want to use one of the above packages, or you want to compile the latest version of Clementine from git, then read on.

The instructions below are for Linux. Compiling for Windows or Mac OS X is a little more complicated.


You need CMake and the development packages for these libraries:

  • boost
  • gettext
  • libgstreamer
  • libgstreamer-plugins-base
  • liblastfm
  • libglib2.0
  • Qt 4
  • taglib
  • libfftw3 or libchromaprint
  • GLEW
  • libqjson
  • libsqlite3
  • libprotobuf and protobuf-compiler
  • libchromaprint
  • libqca2 (Qt Cryptographic Architecture for Spotify support)
  • libgpod (optional, for iPod support)
  • libplist (optional, for iPod support)
  • libusbmuxd (optional, for iPod support)
  • libmtp (optional, for MTP support)
  • libgio (optional, for various device support)
  • libcdio (optional, for CD support)
  • libspotify (optional, for Spotify support)
  • libcrypto++ (optional, for Spotify support)
  • libsparsehash (optional, for Google Drive/Dropbox/Box/Skydrive support)
  • libpulse (optional, for choosing output devices)

On Precise (12.04) or older you'll need to add a PPA to get packages for gstreamer 1.0:

sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update

On Ubuntu (and probably Debian) you can install everything you need with:

sudo apt-get install liblastfm-dev libtag1-dev gettext libboost-dev \
    libboost-serialization-dev libqt4-dev qt4-dev-tools libqt4-opengl-dev \
    cmake libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
    libglew1.5-dev libqjson-dev libgpod-dev libplist-dev \
    libusbmuxd-dev libmtp-dev libcdio-dev \
    protobuf-compiler libprotobuf-dev libcrypto++-dev \
    libfftw3-dev libsparsehash-dev libsqlite3-dev libpulse-dev \
    libqtwebkit-dev libchromaprint-dev libqca2-dev

On Fedora:

su -c "dnf install gcc-c++ liblastfm-devel taglib-devel gettext boost-devel \
    qt-devel cmake gstreamer1-devel gstreamer1-plugins-base-devel glew-devel \
    libgpod-devel qjson-devel libplist-devel \
    libusbmuxd-devel libmtp-devel protobuf-devel protobuf-compiler cryptopp-devel \
    libcdio-devel fftw-devel sparsehash-devel sqlite-devel \
    pulseaudio-libs-devel sha2-devel libchromaprint-devel qca-devel"

You can also optionally install ccache, to speed up compilation in some cases. On Ubuntu:

sudo apt-get install ccache


This is the easy bit! If bin directory doesn't exist you might want to create it.

cd bin
cmake ../
sudo make install

If you wish to have debug symbols, use

cmake  -DCMAKE_BUILD_TYPE=Debug ../

instead of

cmake ../

It's a good idea to run cmake from a separate build directory. There's a bin directory provided for you. This is a good idea because it avoids cluttering the source directories with generated files, and it lets you completely wipe the build files with rm -rf bin/*.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.