|
CompilingFromSource
General instructions for compiling and installing Clementine
Featured IntroductionYou 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. PrerequisitesYou need CMake and the development packages for these libraries:
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-devOn 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-lite6On 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-develCompilingThis 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/*. | |
Libnotify is not longer required after Revision 502, because Clementine now talks directly through DBus to the system.
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
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.
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.
Intsalling qt4-dev-tools haven't solved the problem described in third comment for me.
Interesting, it is the very same lconvert issue thing? Or is just another error?
Have you all other libraries installed also?
Error is looks like 4% Generating clementine_sk.qm /bin/sh: lconvert: command not found 586 revision was compiled fine.
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?
I'm using ALTLinux:)
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.
I solved this error by declarin direct path to lconvert in CMakeLists.txt :)
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
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.
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 ..
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.
[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 :
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 ?
Yes, you did. It says
not
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
You need a newer version of Qt; 4.6 or higher.
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 :
I do not have that problem with gentoo (and same rev of clementine). any idea what package I miss ?
Something like libglew1.5-dev
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
@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...
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`
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?
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.
You should be able to uninstall by typing "make uninstall" from the directory where you compiled it.
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):
Hi,
I cannot make the latest rev under my gentoo ~amd64.
here is the error message :
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 ?
with the help of some friend on IRC, I was able to locate some difference about libQtCore.so
This fixed my compilation issue.
Hope this will help some gentoo user.
libarchive-dev is also required at Ubuntu 10.10. Without it cmake ../ gives a error:
libarchive-dev should be optional now, but I've added it above anyway. Thanks!
Thers is no gtest/gmock in 3rdparty directory
CMake Error in tests/CMakeLists.txt: Cannot find source file "gmock-cardinalities.cc".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.
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.
With the latest svn (2854) I get the following error. http://pastebin.com/VA0YDLye
With the latest svn (2903) I get the following error http://pastebin.com/vYF6mXhJ
OK now, 2913 builds fine ;)
There are hourly updated git mirror http://gitorious.org/clementine/clementine and ebuild for svn trunk http://gitorious.org/gentoo-multimedia/gentoo-multimedia/blobs/master/media-sound/clementine/clementine-9999.ebuild
Thanks Nickollai ;) With latest build I get the following error
It was new gcc's fault after all. I switched back to the old one and it builds fine.
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)
For libpjproject go here: install it with root rights to /usr/lib with (ubuntu)
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)
how could i compmile the source code on windows7 plateform ?? I ve Qt SDK and MS visula 6 installed.