digiKam

Professional Photo Management with the Power of Open Source

Download from GIT


Quick Navigation

Tutorial Skill Level: ADVANCED

Introduction

This guide explains how to compile and install digiKam directly from the Git master repository. Follow these steps to get the latest development version up and running on your Linux system.


Install External Dependencies

Before compiling digiKam, you need to install all required tools and libraries. The full list of mandatory X and optional external dependencies required to compile and link digiKam source code is listed below. Qt:: is for the Qt framework modules and KF:: for the KDE framework modules. N/A: not applicable.

DependencyRequirementQt5 VersionQt6 VersionRemarks
GitX>= 2.xNote: to checkout source code from the git repositories. Not necessary if you compile source from tarball
CMakeX>= 3.16.0>= 3.22.0Note: multi-platform framework to configure and compile the source code
ECMX>= 5.95.0>= 6.5Note: Cmake extension framework from KDE project
CCacheoptional>= 4.xNote: to speed-up compilation. Relevant Cmake option: BUILD_WITH_CCACHE
GetTextoptional>= 0.20Note: including Msgfmt program from GetText to compile po files to mo files. Relevant Cmake option: DIGIKAMSC_COMPILE_PO
ASANoptional>= 19Note: to build with ASAN and UBSAN sanitizers. Require Clang compiler instead GNU G++. Relevant Cmake option: ENABLE_SANITIZERS
Qt::CoreX>= 5.14>= 6.4
Qt::GuiX>= 5.14>= 6.4
Qt::WidgetsX>= 5.14>= 6.4
Qt::NetworkX>= 5.14>= 6.4
Qt::NetworkAuthX>= 5.14>= 6.4
Qt::SqlX>= 5.14>= 6.4Note: uses Qt::Sqlite and Qt::Mysql plugins. Relevant Cmake options: ENABLE_MYSQLSUPPORT and ENABLE_INTERNALMYSQL
Qt::XmlX>= 5.14>= 6.4
Qt::ConcurrentX>= 5.14>= 6.4
Qt::PrintSupportX>= 5.14>= 6.4
Qt::SvgX>= 5.14>= 6.4For the vector graphic image support
Qt::WebEngineX>= 5.14>= 6.4For web contents rendering (eg. Web Service export tools)
Qt::XmlPatternsoptional>= 5.14N/AFor parsing and validate Xml. Used by Qt5 version of Rajce tool. Module removed with Qt6
Qt::X11Extrasoptional>= 5.14N/AFor Color Management support under Linux. Used by Qt5 version only. Module removed with Qt6
Qt::DBusoptional>= 5.14>= 6.4For Linux Desktop interprocesus communication support. Relevant Cmake option: ENABLE_DBUS
Qt::OpenGLoptional>= 5.14>= 6.4For Presentation tool
Qt::OpenGLWidgetsoptionalN/A>= 6.4For Presentation tool. Qt6::OpenGL split on 2 modules: core and widgets
Qt::MultimediaoptionalN/A>= 6.4For Video support. QtAvPlayer used internally for the Qt5 version
Qt::Testoptional>= 5.14>= 6.4For test codes compilation only. Relevant Cmake option BUILD_TESTING
Qt::Qmloptional>= 5.14>= 6.4For internal O2 library test codes compilation only. Relevant Cmake option BUILD_TESTING
Qt::WebViewoptional>= 5.14>= 6.4For internal O2 library test codes compilation only. Relevant Cmake option BUILD_TESTING
KF::ConfigX>= 5.95.0>= 6.5For application configuration files support
KF::XmlGuiX>= 5.95.0>= 6.5For application menu, shortcut, and toolbar settings support
KF::I18nX>= 5.95.0>= 6.5For application internationalization support. Relevant Cmake option: DIGIKAMSC_COMPILE_PO
KF::WindowSystemX>= 5.95.0>= 6.5For the host system windows properties management
KF::ServiceX>= 5.95.0>= 6.5For the host system mime-types configuration support
KF::SolidX>= 5.95.0>= 6.5For Database Collection Device Identification
KF::CoreAddonsX>= 5.95.0>= 6.5For KAboutData and KMemoryInfo components
KF::NotifyConfigoptional>= 5.95.0>= 6.5For Linux Desktop application notify configuration
KF::Notificationsoptional>= 5.95.0>= 6.5For Linux Desktop notifications integrations
KF::ThreadWeaveroptional>= 5.95.0>= 6.5For Panorama tool
KF::IconThemesoptional>= 5.95.0>= 6.5For Linux Desktop icon dialog support (KIconDialog component usage)
KF::FileMetaDataoptional>= 5.95.0>= 6.5For Plasma Desktop Files Indexer support support. Relevant Cmake option: ENABLE_KFILEMETADATASUPPORT
KF::CalendarCoreoptional>= 5.95.0>= 6.5For Calendar tool to setup ical special events
KF::KIOoptional>= 5.95.0>= 6.5For Linux Desktop Remote Export tool. Relevant Cmake option: ENABLE_KIO
KF::Sonnetoptional>= 5.95.0>= 6.5For Spellcheck in text widget (eg. caption)
KF::AkonadiContactoptional>= 5.95.0>= 6.5For Plasma Desktop Mail Contacts support. Relevant Cmake option ENABLE_AKONADICONTACTSUPPORT
libopencvX>= 4.8For Face Management. Required OpenCV modules: Core, ObjDetect, ImgProc, ImgCodecs, Dnn, and Flan
libtiffX>= 4.0For DImg TIFF image loader
libpngX>= 1.6For DImg PNG image loader
libjpegX>= 8For DNG support in RawEngine: jpeglib >= 8.0
libboostX>= 1.55.0For Versioning support
liblcmsX>= 2.xFor Color Management support
libexpatX>= 2.1.0For RAW to DNG converter
libexiv2X>= 0.27.1For Metadata low level management
libjpegxloptional>= 0.7For DNGWriter and RawEngine. To decode and encode DNG files
libheifoptional>= 1.6.0For HEIF file format support. Library must be compiled with libde265 (read) and libx265 (write)
libx265optional>= 2.2For HEIF encoding support
libxml2optional>= 2.7.0For Html Gallery tool
libxsltoptional>= 1.1.0For Html Gallery tool
Flexoptional>= 2.5.0For Panorama tool
Bisonoptional>= 2.5.0For Panorama tool
libmesaoptional>= 11.0For Presentation tool
libksaneoptional>= 21.12.022.04.2For Digital Scanner tool
libjpasperoptional>= 1.900.1For JPEG-2000 support
libeigen3optional>= 3.2For Refocus tool
liblensfunoptional>= 0.2.8For Lens Correction tool
libglib2optional>= 2.0.0For Liquid Rescale tool
libgphoto2optional>= 2.5For Digital Camera Drivers support. Need libusb-1 at run-time
libgompoptional>= 5.0For OpenMP support in RawEngine
libimagemagickoptional>= 6.7.0For ImageMagick codecs support in DImg image loader.
libffmpegoptional>= 5.xFor video/audio support. Relevant Cmake option ENABLE_MEDIAPLAYER. FFmpeg used to extract video metadata and with Qt5::QtAVPlayer
libvaapioptional>= 2.4For video/audio support. Relevant Cmake option ENABLE_MEDIAPLAYER. Intel Video codecs support in Qt5::QtAVPlayer

Most of these dependencies are available as development packages in your Linux distribution native package managers. They are typically named with a -devel suffix (e.g., libgphoto2-devel). You can install them using your system’s package manager, such as:

  • APT (Ubuntu, Debian, etc.)
  • YUM/DNF (RedHat, Fedora, CentOS, etc.)
  • Zypper (SUSE, OpenSUSE, etc.)

Checkout the digiKam Source Code from Git

To clone the digiKam source code from the Git repository, run the following commands in a directory with sufficient disk space:

git clone https://invent.kde.org/graphics/digikam.git digikam
cd digikam

This will clone the master branch, which contains the latest features and is compatible with both Qt5 and Qt6.

Note for Contributors:

If you plan to Contribute to the project, create a fork of the repository via the GitLab web interface. Make your changes in your fork, then submit a Pull Request (PR) for review and integration into the master repository.

digiKam project on gitlab


Configure with Cmake

To compile the digiKam source code with Cmake, we provide a bootstrap script for each supported plateforms:

  • bootstrap.linux: for Linux builds using native packages manager.
  • bootstrap.macports: for macOS builds using MacPorts packages manager.
  • bootstrap.vcpkg: for Windows builds using VCPKG packages manager.

These scripts are configurable with a simple text editor and options can be switched with ON and OFF keywords. Available Cmake options are listed below:

  • Packaging options:
    • DIGIKAMSC_COMPILE_DIGIKAM : Build digiKam core. This option is only turned on when we package a source tarball.
    • DIGIKAMSC_COMPILE_PO : Build application translations files.
  • Extra feature support options:
    • ENABLE_GEOLOCATION : Build digiKam with Geolocation support.
    • ENABLE_MEDIAPLAYER : Build digiKam with Media Player support.
    • ENABLE_SHOWFOTO : Build Showfoto stand-alone image editor application.
    • ENABLE_DBUS : Build digiKam with DBUS support.
    • ENABLE_APPSTYLES : Build digiKam with widget application style support.
    • ENABLE_KIO : Build digiKam with KIO support.
    • ENABLE_KFILEMETADATASUPPORT : Build digiKam with Plasma Desktop Files Indexer support.
    • ENABLE_AKONADICONTACTSUPPORT : Build digiKam with Plasma Desktop Mail Contacts support.
  • Database options:
    • ENABLE_MYSQLSUPPORT : Build digiKam with MySQL dabatase support.
    • ENABLE_INTERNALMYSQL : Build digiKam with internal MySQL server support.
  • Developers only options:
    • BUILD_WITH_QT6 : Build with Qt6 framework, else Qt5.
    • BUILD_TESTING : Build tests code.
    • BUILD_WITH_CCACHE : Build with Ccache to speed up compilations.
    • ENABLE_SANITIZERS : Build with ASAN and UBSAN sanitizers when available.
    • ENABLE_DIGIKAM_MODELTEST : Build with ModelTest on some models for debugging.

Compile and Install digiKam

To compile digiKam, follow these steps in the source code directory. It is recommended to use a separate build folder to keep the source directory clean.

  1. Run the bootstrap script to configure the build environment:

    ./bootstrap.linux
    
  2. Navigate to the build directory and start the compilation:

    cd build
    make -j4
    

    Note: The -j4 flag enables parallel compilation using 4 CPU cores. Adjust this value based on the number of cores available on your system to speed up the process.

  3. Install digiKam on your system:

    sudo make install/fast
    

The files will be installed in the standard system directory for applications (usually /usr under Linux).


Conclusion

You now have the latest development version of digiKam installed on your system! If you encounter any issues during the process, seek help from the community.

Happy compiling! 🚀