My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CompilingFromSource  
General instructions for compiling and installing Clementine
Featured
Updated Feb 26, 2012 by davidsansome

Introduction

You probably don't need to compile Clementine yourself. We already provide packages for 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.

Note that Slackware users can use the build script maintained by Lassi Kojo.

Prerequisites

You need CMake and the development packages for these libraries:

  • boost
  • gettext
  • libgstreamer
  • libgstreamer-plugins-base
  • liblastfm
  • Qt 4
  • taglib
  • libfftw3 or libchromaprint
  • GLEW
  • libqjson
  • libgpod (optional, for iPod support)
  • libimobiledevice (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)
  • libprotobuf and protobuf-compiler (optional, for Spotify support)
  • libspotify (optional, for Spotify support)
  • libqca (optional, for Spotify support)

On Ubuntu 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 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \
    libglew1.5-dev libqjson-dev libgpod-dev libimobiledevice-dev libplist-dev \
    libusbmuxd-dev libmtp-dev libindicate-qt-dev libcdio-dev \
    protobuf-compiler libprotobuf-dev libqca2-dev libqca2-plugin-ossl \
    libfftw3-dev

On Fedora:

su -c "yum install gcc-c++ liblastfm-devel taglib-devel gettext boost-devel \
    qt-devel cmake gstreamer-devel gstreamer-plugins-base-devel glew-devel \
    libgpod-devel qjson-devel libimobiledevice-devel libplist-devel \
    usbmuxd-devel libmtp-devel protobuf-devel protobuf-compiler qca2-devel \
    llibcdio-devel qca-ossl fftw-devel"

On openSUSE:

sudo zypper install cmake libqt4-devel gcc gcc-c++ boost-devel liblastfm-devel \
    gettext-tools glew-devel taglib-devel gstreamer-0_10-devel \
    gstreamer-0_10-plugins-base-devel libmtp-devel ligpod-devel \
    libqjson-devel libimobiledevice-devel libplist-devel \
    libusbmuxd-devel libcdio-devel fftw3-devel protobuf-devel \
    libprotobuf-lite6

On Mandriva:

su -c "urpmi gcc-c++ gcc libqt4-devel cmake libtaglib-devel boost-devel gettext \
    liblastfm-devel libgstreamer-devel libgstreamer-plugins-base-devel \
    libglew-devel libqjson-devel libgpod-devel libimobiledevice-devel \
    libplist-devel libmtp-devel libusbmuxd-devel qt4-linguist libcdio-devel \
    fftw3-devel"

On Pardus:

sudo pisi it boost-devel gettext-devel gstreamer-devel liblastfm-devel \
    taglib-devel qt-devel cmake gst-plugins-base-devel glew-devel \
    libqjson-devel libgpod-devel libimobiledevice-devel libplist-devel \
    usbmuxd-devel libmtp-devel glibc-devel libindicate-devel pkgconfig \
    libxml2-devel libusb-devel glib2-devel libindicate-qt-devel \
    libcdio-devel libX11-devel kernel-headers zlib-devel fftw3-devel

Compiling

This is the easy bit!

mkdir bin
cd bin
cmake ../
make
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/*.

Comment by kadaimx, Mar 26, 2010

Libnotify is not longer required after Revision 502, because Clementine now talks directly through DBus to the system.

Comment by kadaimx, Apr 6, 2010

From revision 586 onwards, gstreamer is used for audio playback. To get a full-featured playback, you might need to install the next packages:

gstreamer0.10-x gstreamer0.10-gnomevfs gstreamer0.10-pulseaudio gstreamer0.10-plugins-good gstreamer0.10-plugins-base

In case that you get around compiling errors, try then installing the next packages:

libglib2.0-dev libxml2-dev python-gobject-dev

Comment by kadaimx, Apr 6, 2010

In case you come across the next compiling problem:

Linking CXX static library libqxt.a 4% Built target qxt 4% Generating clementine_sk.qm /bin/sh: lconvert: not found make2?: [src/clementine_sk.qm] Error 127 make1?: [src/CMakeFiles/clementine_lib.dir/all] Error 2 make: all? Error 2

Install: qt4-dev-tools

And it may then solve the issue.

Comment by himyname...@gmail.com, Apr 6, 2010

This pretty much goes without saying, but for anyone building from source, you'll definitely need the libgstreamer0.10-dev package. Took me a few minutes to figure that puzzler out.

Comment by rollan...@gmail.com, Apr 7, 2010

Intsalling qt4-dev-tools haven't solved the problem described in third comment for me.

Comment by kadaimx, Apr 7, 2010

Interesting, it is the very same lconvert issue thing? Or is just another error?

Have you all other libraries installed also?

Comment by rollan...@gmail.com, Apr 7, 2010

Error is looks like 4% Generating clementine_sk.qm /bin/sh: lconvert: command not found 586 revision was compiled fine.

Comment by kadaimx, Apr 7, 2010

You are using 9.04 do not? Maybe the problem might be related to it (both, yout taglib and this problem) Maybe you can try to get the most up-to-date packages? (or the karmic dev ones, because those ones appears to work)

Just get them to compile this one?

Comment by rollan...@gmail.com, Apr 7, 2010

I'm using ALTLinux:)

Comment by kadaimx, Apr 7, 2010

Ups, then I was confusing you with someone else XD But then, you can then try to install all the Qt4-dev related packages from your distro.

Or in any case, get close to the support forums of your distro and ask there, seeking what package has that function.

Comment by rollan...@gmail.com, Apr 7, 2010

I solved this error by declarin direct path to lconvert in CMakeLists.txt :)

Comment by kadaimx, Apr 18, 2010

Other (more) packages required for even more complete playback on buntu 10.04 and later include:

gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly-multiverse

Please note that if you only are looking for MP3 playback, use the next ones only gstreamer0.10-plugins-ugly (default) gstreamer0.10-fluendo-mp3 (alternate)

Reference: http://wiki.songbirdnest.com/Developer/Articles/Media_Cores/GStreamer_Setup

Comment by kadaimx, Apr 19, 2010

Important: A dependency required, but not asked inside CMakeList.txt is the "gettext" (without quotes) binary. Gettext is ussed to read the pod files and compilation (at least on Fedora 12, and probably elsewere) will fail.

Comment by cosmin.h...@gmail.com, Apr 28, 2010

If your CMake cannot find the Phonon headers, although they are installed, this can be solved by running cmake -DQT_PHONON_INCLUDE_DIR=/usr/include/phonon ..

Comment by fabrice....@gmail.com, May 14, 2010

There's nothing in the /bin rep in the 0.3 src ...

Comment by project member davidsansome, May 15, 2010
There's nothing in the /bin rep in the 0.3 src ...

It's supposed to be empty, you run cmake inside it and let it dump all the generated files there.

Comment by nicoda...@gmail.com, May 18, 2010
[00:27] <nicodache@korsakov> ~/clementine $ cd bin
[00:27] <nicodache@korsakov> ~/clementine/bin $ cmake 
cmake version 2.8.1
Usage
    cmake options? <path-to-source> 
    cmake options? <path-to-existing-build> 

Options
    -C <initial-cache> = Pre-load a script to populate the cache.

(output truncated)

and obviously :

[00:28] <nicodache@korsakov> ~/clementine/bin $ make
make: *** No targets specified and no makefile found. Stop.

And if I do cmake ../CMakeLists.txt, the generated files are (of course) in the top directory (as if I typed cd ..; cmake CMakeLists.txt)

Did I miss something ?

Comment by project member john.maguire, May 18, 2010

Yes, you did. It says

cmake ..

not

cmake
Comment by vnu00...@gmail.com, Jun 13, 2010

I can not compile source. Make gives me: code? 53% Building CXX object src/CMakeFiles/clementine_lib.dir/radio/magnatuneconfig.cpp.o 53% Building CXX object src/CMakeFiles/clementine_lib.dir/radio/magnatunedownloaddialog.cpp.o /tmp/clementine-player-read-only/src/radio/magnatunedownloaddialog.cpp: In member function ‘virtual void MagnatuneDownloadDialog?::closeEvent(QCloseEvent)’: /tmp/clementine-player-read-only/src/radio/magnatunedownloaddialog.cpp:292: error: ‘class QNetworkReply’ has no member named ‘isRunning’ make2?: [src/CMakeFiles/clementine_lib.dir/radio/magnatunedownloaddialog.cpp.o] Błąd 1 make1?: [src/CMakeFiles/clementine_lib.dir/all] Błąd 2 make: all? Błąd 2 [darek@Linux_Mandriva? build]$

[/code] I have no idea what can be wrong. Need help. I use mdv 2010 free and kernel 2.6.31.12-desktop-3mnb

Comment by project member john.maguire, Jun 13, 2010

You need a newer version of Qt; 4.6 or higher.

Comment by nicoda...@gmail.com, Jun 22, 2010

using debian sid and latest rev of clementine svn :

nicodache@rachmaninov:~/clementine/bin$ cmake ..
-- Building engines: gst
-- Skipping engines: vlc xine qt-phonon
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLEW_INCLUDE_DIRS
   used as include directory in directory /home/nicodache/clementine/3rdparty/libprojectm
   used as include directory in directory /home/nicodache/clementine/3rdparty/libprojectm/NativePresetFactory
   used as include directory in directory /home/nicodache/clementine/3rdparty/libprojectm/MilkdropPresetFactory
   used as include directory in directory /home/nicodache/clementine/3rdparty/libprojectm/Renderer
GLEW_LIBRARIES
    linked by target "projectM" in directory /home/nicodache/clementine/3rdparty/libprojectm

-- Configuring incomplete, errors occurred!

and also :

ii  libprojectm-data                     1.2.0-3                        Advanced Milkdrop-compatible music visualiza
ii  libprojectm-dev                      1.2.0-3                        Advanced Milkdrop-compatible music visualiza
ii  libprojectm2                         1.2.0-3                        Advanced Milkdrop-compatible music visualiza
ii  libvisual-projectm                   1.2.0-1                        libvisual module for projectM

I do not have that problem with gentoo (and same rev of clementine). any idea what package I miss ?

Comment by project member john.maguire, Jun 22, 2010

Something like libglew1.5-dev

Comment by vnu00...@gmail.com, Jun 27, 2010

I just install new mandriva 2010 spring and still have problem:

37% Building CXX object 3rdparty/universalchardet/CMakeFiles/chardet.dir/nsSJISProber.cpp.o 37% Building CXX object 3rdparty/universalchardet/CMakeFiles/chardet.dir/nsUniversalDetector.cpp.o 37% Building CXX object 3rdparty/universalchardet/CMakeFiles/chardet.dir/nsUTF8Prober.cpp.o Linking CXX static library libchardet.a 37% Built target chardet 37% Generating translations/clementine_ar.qm /bin/sh: QT_LCONVERT_EXECUTABLE-NOTFOUND: nie znaleziono polecenia make2?: [src/translations/clementine_ar.qm] Błąd 127 make1?: [src/CMakeFiles/clementine_lib.dir/all] Błąd 2 make: all? Błąd 2 [darek@Linux_Mandriva? build]$ I have no idea what is still wrong? Any idea? Need help

Comment by baf...@gmail.com, Jul 13, 2010

@vnu007dl the error is: "QT_LCONVERT_EXECUTABLE-NOTFOUND". lconvert is part of the qt4-linguist package on mandriva, so if you install that package, the build problem you were having should go away.

note also that there is already a clementine package in mandriva-2010.1 (spring), so you may not need to compile from source at all...

Comment by dadoreve...@gmail.com, Aug 10, 2010

When i tryed compiling from svn the new source i receive this message

`46% Building CXX object src/CMakeFiles/clementine_lib.dir/devices/devicemanager.cpp.o In file included from /usr/include/glib-2.0/gio/gio.h:49,

from /home/dado/clementine-player-read-only/src/devices/giolister.h:22, from /home/dado/clementine-player-read-only/src/devices/devicemanager.cpp:35: /usr/include/glib-2.0/gio/gdbusintrospection.h:151: error: expected unqualified-id before ‘protected’ /usr/include/glib-2.0/gio/gdbusintrospection.h:151: error: expected ‘;’ before ‘protected’ make2?: src/CMakeFiles/clementine_lib.dir/devices/devicemanager.cpp.o? Errore 1 make1?: src/CMakeFiles/clementine_lib.dir/all? Errore 2 make: all? Errore 2`

Comment by DaaXWize...@gmail.com, Sep 23, 2010

Hi,

Having this error when trying to build on a openSUSE 11.2 :

/home/daax/Téléchargement/clementine-0.5.1/bin/3rdparty/qsqlite/moc_qsql_sqlite.cxx:14:2: error: #error "This file was generated using the moc from 4.5.3. It" /home/daax/Téléchargement/clementine-0.5.1/bin/3rdparty/qsqlite/moc_qsql_sqlite.cxx:15:2: error: #error "cannot be used with the include files from this version of Qt." /home/daax/Téléchargement/clementine-0.5.1/bin/3rdparty/qsqlite/moc_qsql_sqlite.cxx:16:2: error: #error "(The moc has changed too much.)" make2?: [3rdparty/qsqlite/CMakeFiles/qsqlite.dir/moc_qsql_sqlite.cxx.o] Erreur 1 make1?: [3rdparty/qsqlite/CMakeFiles/qsqlite.dir/all] Erreur 2 make: all? Erreur 2

What should I do?

Comment by J.Lath...@gmail.com, Oct 2, 2010

How do I uninstall the application in Ubuntu? I compiled it. I keep making the stupid mistake by compiling from sources from my desktop from svn. So, I'd like to just uninstall, move the directory to my home folder, install again, and svn update.

Comment by project member davidsansome, Oct 3, 2010

You should be able to uninstall by typing "make uninstall" from the directory where you compiled it.

Comment by ondrej.m...@gmail.com, Dec 12, 2010

Compiling with other Qt than system Qt (this is actually a cmake thingie, but took me long enough to figure it out so that it might be helpful to others):

Compiling for local (non-system-wide installation):

export QT_QMAKE_EXECUTABLE=~/local/qtsdk-2010.05/qt/bin/qmake
export QTDIR=~/local/qtsdk-2010.05/qt #shouldn't be necessary, but won't hurt
export PATH=~/local/qtsdk-2010.05/qt/bin:"$PATH"
cmake -DCMAKE_INSTALL_PREFIX=~/local/clementine .
Comment by nicoda...@gmail.com, Jan 7, 2011

Hi,

I cannot make the latest rev under my gentoo ~amd64.

here is the error message :

[ 77%] Building CXX object src/CMakeFiles/clementine_lib.dir/qrc_data.cxx.o
[ 77%] Building CXX object src/CMakeFiles/clementine_lib.dir/qrc_translations.cxx.o
Linking CXX static library libclementine_lib.a         
[100%] Built target clementine_lib
[100%] Building CXX object src/CMakeFiles/clementine.dir/main.cpp.o
Linking CXX executable ../clementine
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtCore    
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [clementine] Erreur 1
make[1]: *** [src/CMakeFiles/clementine.dir/all] Erreur 2
make: *** [all] Erreur 2

I tried the same with a brand new & clean checkout of revision 2500, and I could run make against it.

did you add any dependencies/requirements in the last weeks that would prevent it from compiling ?

Comment by nicoda...@gmail.com, Jan 10, 2011

with the help of some friend on IRC, I was able to locate some difference about libQtCore.so

[23:12] <nicodache@korsakov> ~ $ sudo ln -s /usr/lib64/qt4/libQtCore.so /usr/lib64/libQtCore.so

This fixed my compilation issue.

Hope this will help some gentoo user.

Comment by mblk...@gmail.com, Jan 18, 2011

libarchive-dev is also required at Ubuntu 10.10. Without it cmake ../ gives a error:

-- Found PythonLibs?: /usr/lib/libpython2.6.so ... -- checking for module 'libarchive' -- package 'libarchive' not found CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig?.cmake:266 (message):

A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig?.cmake:320 (pkg_check_modules_internal) CMakeLists.txt:61 (pkg_check_modules)
Comment by project member davidsansome, Jan 18, 2011

libarchive-dev should be optional now, but I've added it above anyway. Thanks!

Comment by vayerx, Jan 19, 2011

Thers is no gtest/gmock in 3rdparty directory

CMake Error in tests/CMakeLists.txt:
    Cannot find source file "gmock-cardinalities.cc".
Comment by ThomasM...@gmail.com, Jan 22, 2011

Trying to install the .deb package in Kubuntu 10.10 64bit generates a "dependency is not satisfiable" error for libgdk-pixbuf2, even after running the huge "sudo apt-get install" list above. Downloading and installing gdk-pixbuf from https://launchpad.net/ubuntu/+source/gdk-pixbuf also did not resolve the dependency error.

Installing from source worked (thankfully) and I am happily running Clementine right now.

Comment by ivanovne...@gmail.com, Jan 22, 2011

One thing is not mentioned, on Ubuntu Maverick 10.10 the scripts will not work if you not install also python-qt4. It seems that python-qt4-dev is not enough. If this is wrong I apologize but I installed it now and I am able to use the scripts, before I couldnt.

Comment by markel...@gmail.com, Feb 20, 2011

With the latest svn (2854) I get the following error. http://pastebin.com/VA0YDLye

Comment by cmin...@gmail.com, Mar 3, 2011

With the latest svn (2903) I get the following error http://pastebin.com/vYF6mXhJ

Comment by markel...@gmail.com, Mar 5, 2011

OK now, 2913 builds fine ;)

Comment by markel...@gmail.com, Mar 29, 2011

Thanks Nickollai ;) With latest build I get the following error

[ 66%] Building CXX object src/CMakeFiles/clementine_lib.dir/smartplaylists/generator.cpp.o
/media/archbuild/aur/clementine-git/src/clementine-build/src/scripting/uiinterface.cpp: In member function ‘void UIInterface::MenuDestroyed()’:
/media/archbuild/aur/clementine-git/src/clementine-build/src/scripting/uiinterface.cpp:73:5: error: ‘prephitmp.267’ may be used uninitialized in this function [-Werror=uninitialized]
cc1plus: all warnings being treated as errors

make[2]: *** [src/CMakeFiles/clementine_lib.dir/scripting/uiinterface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/CMakeFiles/clementine_lib.dir/all] Error 2
make: *** [all] Error 2
Comment by markel...@gmail.com, Mar 29, 2011

It was new gcc's fault after all. I switched back to the old one and it builds fine.

Comment by vatriani...@gmail.com, May 9, 2011

Get completly worked with some aditions (rev 3254)

To work with libspotify download and unpack the libary from: http://developer.spotify.com/en/libspotify/overview/

install it with root rights to /usr/lib with (ubuntu)

  $ sudo make install

For libpjproject go here: install it with root rights to /usr/lib with (ubuntu)

  $ svn checkout https://svn.pjsip.org/repos/pjproject/branches/1.x pjproject
  $ cd pjproject
  $ ./configure
  $ make dep 
  $ make
  $ sudo make install
Comment by Coertvan...@gmail.com, Jul 12, 2011

For people having trouble in Ubuntu 11.04 generating the dependencies for qt4, Ubuntu qmake defaults to qmake-qt3. If you have this problem, this may help:

$ sudo update-alternatives --set qmake /usr/bin/qmake-qt4

(or where ever qmake-qt4 may reside)

Comment by schehaid...@gmail.com, Aug 13, 2011

how could i compmile the source code on windows7 plateform ?? I ve Qt SDK and MS visula 6 installed.

Powered by Google Project Hosting