Building Digikam for Dummies on Ubuntu and other linux based distro´s
Building digiKam for dummies on Ubuntu.
Updated according the latest, input, feedback and knowledge
about the current process per Sept 17, 2011.
The following guide is intended for Ubuntu users with no
experience in compiling software from source. However,
I provide links to instructions for other platforms than
Ubuntu.
IMPORTANT NOTE:
This guide has been tested for Ubuntu 11.04.
It has been verified that this is not going to work, if you are
using Ubuntu prior to 11.04, due to inavailability of some
required dependencies.
Thanks to Dan McDaniel, Philip Johnsson,
Gert kello, Michael G Hansen, and others for their input
and feedback.
Thanks to Dmitri Popov, who revisted the text entirely to
make it a better reading experience.
Usually, you can easily install digiKam or showFoto via the
Ubuntu Software Center. Alternatively, you can install a
more recent version of the application using Philip
Johnsson´s PPA. You can find instructions on how to add the
PPA to your software sources at
http://launchpad.net/~philip5/+archive/extra
But if you want to compile digiKam from source, you can so
using the tar.gz archive of the latest official digiKam
release or source code from the project's Git repository.
NOTE
Git provides the current development source code. Although
it gives you the latest updates and bug fixes, you may also
have a newly introduced bug, in fact it is for testing
purposes, not officially released yet.
If you run into problems, you can ask for support on the
digikam user mailing list. Before you proceed make sure to
back up your system. I recommend using fsarchiver, but
there are other backup tools at your disposal.
Compiling digiKam requires 4-8 hours depending on your
hardware as well as a fair amount of persistence. However,
if goes smoothly the entire process might be completed
within an hour.
If you find typos and errors, please send the maintainer of
this text a note at sleeplessregulus@hetnet.nl.
Commands to execute in the terminal will be put between []
in this way [command].
At the end of the doc you will find some useful notes by
Michael G. Hansen. They appear to be very promising but
have not yet been tested and confirmed by the author of
this text.
Good luck!
Rinus Bakker
#########################################################
START HERE
#########################################################
First off all, you have to uninstall the current version of
digiKam from your machine. If you want latest digikam from
git skip to the DOWNLOAD FROM GIT section.
##########################################################
DOWNLOAD TARBALL
##########################################################
Navigate to
http://sourceforge.net/projects/digikam/files/digikam
and download the latest .tar.gz archive to your home
directory (e.g., /home/username/, where username is your
actual user name). Extract the downloaded archive, launch
Terminal and switch to resulting directory.
(e.g., home/username/digikam-software-compilation).
Once you've done that, go to the COMPILING section.
##########################################################
DOWNLOAD FROM GIT
##########################################################
If Git and Perl are not already installed on your machine,
install them using the following command in the Terminal:
sudo apt-get install git perl
If you are unsure, you may do so anyway, it will return a
message that you have already installed the latest version
of git and perl.
Alternatively you can install it via a package manager like
synaptic.
To download the source code, use the following commands:
[cd ~]
[git clone git://anongit.kde.org/digikam-software-compilation
digikam-software-compilation].
Switch then to the digikam-software-compilation directory:
[cd digikam-software-compilation]
Issue the [ls] command, and you should see the document
called ¨download-repos¨, this is a runnable PERL script. In
the Terminal, run the [perl download-repos] command to
download the source code from digiKam's Git repository to
the ¨/home/username/digikam-software-compilation¨ directory.
Read the COMPILING section
NOTE:
If you later want to update your build of digiKam with the
latest updates use the
[perl gits pull] command. This compares the local directory
with the remote Git repository and downloads updates.
##########################################################
COMPILING
##########################################################
Create a directory for build files and switch to it:
[mkdir build]
[cd build]
The path should look like this:
/home/username/digikam-software-compilation/build
Make sure that the gcc, cpp, make, and cmake are installed
on your machine. If cmake is not installed, use the
[sudo apt-get install cmake] to install and
Now let cmake do its work:
[cmake -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=
`kde4-config --prefix` ..]
Note the space dot dot at the end and make sure NOT to use
sudo in front of cmake. Most likely cmake will complain
about missing stuff like libkexiv2-dev, libkipi-dev,
libkdcraw-dev, etc. Install the missing packages and run
cmake again.
If cmake has finished without errors, run the [make] command
(you can install make with [sudo apt-get install make]
command).
To install the freshly build digikam on your machine use the
[sudo make install] command.
In case you want to uninstall, you can use [sudo make
uninstall] from your digikam build folder.
##########################################################
DONE!
##########################################################
You have just build a copy of digiKam with full debug
information. That gives you an opportunity to contribute to
the ongoing improvement of digikam by providing the
developers with useful information. You can read more about
contributing to digiKam at http://www.digikam.org/drupal/contrib.
##########################################################
USEFUL LINKS FOR COMPILING DIGIKAM ON OTHER PLATFORMS
##########################################################
For Fedora users
Marie-Noëlle Augendre´s wiki:
For openSUSE users
###########################################################
NOTES by Michael G. Hansen
###########################################################
On installing dependencies:
You can do a "sudo apt-get build-dep digikam kipi-plugins"
to get some of the dependencies installed in one step. This
will install all the dependencies for building the version
of digikam and kipi-plugins which is in the ubuntu repository,
that's why some packages may still have to be installed for
newer versions, but it should give you a good starting point.
On speeding up the proces:
If you have a dual-core computer, you can run "make -j 2" to
have "make" use two processes at once to speed things up and
take full advantage of your multi-core system. If you have
more cores, simply change "2" to the number of cores. I
normally use a number twice as high as the number of cores,
to account for delay due to disk access. Note that if you
encounter a build failure, error messages may be out-of-order
on the screen, re-run "make" without "-j" to get well-readable
output of the error messages.
On installation and uninstallation:
To make un-installation easier, especially if you delete the
build directory in between, use checkinstall [sudo apt-get
install checkinstall]
[sudo checkinstall --pkgname=my-digkam make install]
This will create a .deb package containing your self-built
digikam, which you can uninstall using "sudo apt-get remove
my-digikam". Another advantage is that you can keep several
versions of compiled digikam in packages, in case you
encounter a problem with a newer build.
###########################################################
END notes by Michael G. Hansen
###########################################################
Tutorial for breaking your Ubuntu packaging system
Ok, my headline may sound a bit drastic, but I don't think it's a good idea to just copy things into your /usr/ directory (except for /usr/local of course). This is especially true for people who don't know what they're doing - apparently the target audience of this tutorial.
Don't misunderstand me: I like the idea of an easy-to-follow tutorial for installing an up-to-date version of digiKam!
I thought if someone could merge Michael G. Hansen's notes into the text it would be a lot better, but apparently even checkinstall does not avoid having to mess with the package management. At least that's what I got:
dpkg: error processing /usr/src/digikam2/digikam-2.0.0/build/my-digkam_20110828-1_powerpc.deb (--install):
trying to overwrite '/usr/include/libksane/ksane.h', which is also in package libksane-dev 4:4.6.2-0ubuntu1
Other conflicting packages where:
libksane-dev libkdcraw-20-dev libkface-dev libkexiv2-10-dev libkgeomap1-data kdegraphics-libs-data
First I tried to deinstall them, but when it came to kdegraphics-libs-data with various other dependecies I gave that up and just installed with [dpkg -i --force-overwrite my-digkam_20110828-1_powerpc.deb].
Maybe some of my problems only came from me having used a custom digiKam package before, or from having forgotten to uninstall digikam2-data. Anyway I recommend using proper Debian packages, like the ones from Philips Johnsson´s PPA. Otherwise the next distribution update will most like not work flawlessly.
P.S.: Why do I have to enter this difficult CAPTCHA for the preview and for the post?t
Building Digikam for Dummies on Ubuntu and other linux based dis
Vlada,
Thanks for trying to help to make the best possible guide in the world.
Please keep sharing your experiences.
If you want to install the newest you have to update your system accordingly.
I did not find it very hard to make the required updates. It is always possible to run in to an unsolvable conflict, than you will have to choose if you want to dispose some other package that comes in the way, or just keep running digikam from official repository. It is all up to you.
A .deb package does not garantee that you will not run in to a conflict.
Whit my next build I will dig into Michael G. Hansen's notes and will integrate my findings in the text. (I made them available already for who wants to use them.
As you said:
¨Maybe some of my problems only came from me having used a custom digiKam package before, or from having forgotten to uninstall digikam2-data.¨
The instructions stated clearly to remove former installations.
Rinus
CPack
What about introducing CPack support to create *.deb files? AFAIK it is still not implemented or am I missing something?
CPack
You could make your remark more helpful by elaborating about it a bit more.
What is CPack, what makes you want it, what are the pro´s and con´s, how should it be implemented and so on.
Rinus
Compilation of DigiKam
Compilation of DigiKam somehow does not work.
I am Dummie. I have a distribution based on Linux - Debian. I proceed according to instructions, but always ends with compilation errors. I installed lots of packages cmake required. It now claims that the compilation is possible. But it is not. Still errors.
I cannot spend rest of my life compiling Digikam and learning all the programming tools used in it.
I wonder how many Dummies completed the compilation.
installation
I would install digikam2 but it wouldn't
with ppa i have the same version
and with compilation i have errors
Could you help me?
i use ubuntu 10.04.
My PPA only work with
My PPA only work with (*)ubuntu 11.04 (natty) as Digikam 2.x need a newer version of KDE libraries and framework than you have in 10.04. The Kubuntu team have dropped KDE 4.6.x support for Ubuntu 10.10 too so you will only be able to use Digikam 2.x with Ubuntu 11.04 or newer (or somehow get/build KDE 4.6.x or newer on an older Ubuntu release).
compiling with non-dynamic libraries
This will probably demonstrate my ignorance and people will start falling about laughing but....
For those of us who want to stick with 10.04 LTS (what does LTS stand for... cant remember....) but also want a newer Digikam would it be possible for a cleverer person than me to compile a version of Digikam that did not use dynamically linked libraries, so that all the needed libraries were hard wired in. Big executable I know but workable?
Probably a silly idea. You can start laughing now.
S
nothing to laugh about
Big Mike quoting Edmonton on http://www.thephotoforum.com:
If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.
Rinus
Users mailing list
Would you please sign up to the users mailing list, and put your questions and requests there. That gives better chance for support.
Rinus