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 revisited 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
https://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
https://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 https://www.digikam.org/contribute.
##########################################################
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 process:
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
###########################################################
