I compiled the latest digikam (6.0.0beta3 at the moment) on Ubuntu 18.04 and thought I would post my process here.
Compile exiv2 following the guide:
Darktable on ubuntu 18.04 / exiv2 is obsolete - Any PPA/snap solving this?
Compile opencv following the guide:
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
sudo make install
Don’t forget to install libqtav-dev
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
Install manually from packages.ubuntu.com:
For JPEG2000 support only. For some reason the packages did not make it from ubuntu 16.04 to 18.04
Install from ubuntu repository:
I don’t remember why did I install them
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.
Install libx264 and libx264-dev for h264 support (optional)
Compile digikam following the guide:
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.