Compile latest digikam on Ubuntu 18.04

Hello,
I compiled the latest digikam (6.0.0beta3 at the moment) on Ubuntu 18.04 and thought I would post my process here.

  1. Compile exiv2 following the guide:
    Darktable on ubuntu 18.04 / exiv2 is obsolete - Any PPA/snap solving this?

  2. Compile opencv following the guide:
    https://docs.opencv.org/3.4/d7/d9f/tutorial_linux_install.html

    I did not set any cmake parameters neither did I use “-j7” (several threads) but instead used the usual:
    git clone https://github.com/opencv/opencv.git
    git clone https://github.com/opencv/opencv_contrib.git
    mkdir build
    cd build
    cmake …
    make
    sudo make install

  3. Install QtAV:
    http://www.qtav.org/install.html

    Don’t forget to install libqtav-dev

  4. Install miscellaneous dependencies:
    sudo apt install extra-cmake-modules help2man libboost-graph-dev libeigen3-dev libgphoto2-dev libjpeg-dev libkf5akonadicontact-dev libkf5calendarcore-dev libkf5doctools-dev libkf5filemetadata-dev libkf5kipi-dev libkf5notifications-dev libkf5notifyconfig-dev libkf5sane-dev libkf5threadweaver-dev liblcms2-dev liblensfun-dev liblqr-1-0-dev libmarble-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev libqtav-dev libtiff-dev libusb-1.0-0-dev libxslt1-dev libxml2-dev pkg-kde-tools qtbase5-dev qtbase5-dev-tools qtmultimedia5-dev libqtwebkit-dev

  5. Install manually from packages.ubuntu.com:
    libjasper1
    libjasper-runtime
    libjasper-dev

    For JPEG2000 support only. For some reason the packages did not make it from ubuntu 16.04 to 18.04

  6. Install from ubuntu repository:
    libqt5webview5
    libqt5webview5-dev

    I don’t remember why did I install them :slight_smile:

  7. Install ffmpeg:
    sudo apt install ffmpeg libavformat-dev libavutil-dev libavcodec-dev libswscale-dev libavfilter-dev

    I actually compiled ffmpeg following this guide first https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu but I had some issues with it later (digikam compiler did not detect it) so I purged it and installed from the repo.

  8. Install libx264 and libx264-dev for h264 support (optional)

  9. Compile digikam following the guide:
    https://www.digikam.org/download/git/

    For some reason I got a compile error and had to install libqtav-dev again. Maybe I accidentally removed it when was dealing with the ffmpeg issue.

Done.

1 Like

Thanks for sharing!

It should work on Debian too. I have a Debian install and will try it there later

Qt5 Install Path : /home/vishal/anaconda3
digiKam Install Path : /usr
CMake binary : cmake
Build Directory : /home/vishal/Desktop/digikam/digikam/build
– CMake version: cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).


– Starting CMake configuration for digikam

– Main one documentation directory is missing. Compilation of documentation is disabled…
– Documentation translations directory is missing.
– You can use DIGIKAMSC_CHECKOUT_DOC option to extract doc i18n files from git repositories.


– Top level compilation configuration for digikam

– digikam will be compiled… YES
– Extract application translations files… NO
– Extract documentation translations files… NO
– Translations will be compiled… NO
– Handbooks will be compiled… NO
– Tests code will be compiled… YES


– Check dependencies for digikam version 7.2.0-beta1

– Could NOT find KF5Sane , checked the following files:
/usr/lib/x86_64-linux-gnu/cmake/KF5Sane/KF5SaneConfig.cmake (version 5.1.0)

– KF5::KIOWidgets include dirs: /usr/include/KF5/KIOWidgets;/usr/include/KF5
– Libjpeg version: 84
– Using libjpeg sub-directory: libjpeg/84
– Boost version: 1.65.1
– Found lcms version 2.09, /usr/lib/x86_64-linux-gnu/liblcms2.so
– Checking for module ‘x265’
– Package x265 was not found in the pkg-config search path.
Perhaps you should add the directory containing `x265.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘x265’, required by ‘world’, not found
– Could NOT find X265 (missing: X265_INCLUDE_DIRS X265_LIBRARIES)
CMake Error at core/CMakeLists.txt:181 (find_package):
By not providing “Findexiv2.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “exiv2”, but
CMake did not find one.

Could not find a package configuration file provided by “exiv2” with any of
the following names:

exiv2Config.cmake
exiv2-config.cmake

Add the installation prefix of “exiv2” to CMAKE_PREFIX_PATH or set
“exiv2_DIR” to a directory containing one of the above files. If “exiv2”
provides a separate development package or SDK, be sure it has been
installed.

How to solve this error ?
I have already installed it via
sudo apt install libkf5sane-dev

Install the exiv2 package.

Could NOT find KF5Sane , checked the following files:
/usr/lib/x86_64-linux-gnu/cmake/KF5Sane/KF5SaneConfig.cmake (version 5.1.0)

Thanks but It is showing same error
i think there is problem with KF5Sane version because i have already installed it but error remains the same

Do you have the -dev packages for kfsane and exiv2?

i already installed it via —> sudo apt install libkf5sane5-dev

Output —

libkf5sane-dev is already the newest version (17.12.3-0ubuntu1).

and exiv2 via —> sudo apt-get install -y exiv2