Digikam - build from source

I try to build digikam from source in KDE 6 and I get the following errors. Any solution?

> cd  ~/digikam
> ./bootstrap.linux
Qt      Install Path : /usr
digiKam Install Path : /usr
CMake binary         : cmake
Build Directory      : /home/chris/digikam/build
Build for Qt6        : 0
ECM min version      : 
-- CMake version: 3.31.3
-- ----------------------------------------------------------------------------------
-- Starting CMake configuration for digikam
-- 
-- Target Build Type: Debug
-- Suitable Qt5 >= 5.14.0 detected: '5.15.16'.
-- ----------------------------------------------------------------------------------
-- Top level compilation configuration for digikam
-- 
-- digikam will be compiled....................... YES
-- Translations will be compiled.................. NO
-- Tests code will be compiled.................... YES
-- ----------------------------------------------------------------------------------
-- Check dependencies for digikam version 8.6.0
-- 
CMake Error at /usr/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5NetworkAuth"
  with any of the following names:

    Qt5NetworkAuthConfig.cmake
    qt5networkauth-config.cmake

  Add the installation prefix of "Qt5NetworkAuth" to CMAKE_PREFIX_PATH or set
  "Qt5NetworkAuth_DIR" to a directory containing one of the above files.  If
  "Qt5NetworkAuth" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  core/cmake/rules/RulesQtFramework.cmake:7 (find_package)
  core/CMakeLists.txt:37 (include)


-- Configuring incomplete, errors occurred!

Hi - just checking, have you also tried using KDE Builder? https://kde-builder.kde.org/

Yes I get the following error:

In file included from /usr/include/qt6/QtCore/QLoggingCategory:1,
                 from /home/chris/kde/src/digikam/core/app/utils/digikam_debug.h:21,
                 from /home/chris/kde/src/digikam/core/libs/metadataengine/engine/metaengine_exif.cpp:33:
/usr/include/qt6/QtCore/qloggingcategory.h:110:5: error: "QT_BUILDING_QT" is not defined, evaluates to 0 [-Werror=undef]
  110 | #if QT_BUILDING_QT
      |     ^~~~~~~~~~~~~~
In file included from /home/chris/kde/usr/include/KF6/KI18n/klocalizedstring.h:21,
                 from /home/chris/kde/src/digikam/core/libs/metadataengine/engine/metaengine_exif.cpp:29:
/home/chris/kde/usr/include/KF6/KI18n/klocalizedcontext.h:43:20: warning: attribute ignored in declaration of ‘class KLocalizedContext’ [-Wattributes]
   43 | class KI18N_EXPORT KLocalizedContext : public QObject
      |                    ^~~~~~~~~~~~~~~~~
/home/chris/kde/usr/include/KF6/KI18n/klocalizedcontext.h:43:20: note: attribute for ‘class KLocalizedContext’ must follow the ‘class’ keyword
cc1plus: some warnings being treated as errors
ninja: build stopped: subcommand failed.

Should I change my kde-builder config?

@chrislongros:

KDE Plasma 6 uses Qt6.

  • You need to be aware of the digiKam requirements for building in a Qt6 environment.

The digiKam download page mentions API documentation for developers – <Download from GIT>

  • The API document details all the dependencies which have to be met before you can build digiKam.

Yes, I have for example qt6-networkauth installed but the script requires somehow Qt5NetworkAuth

I think it tries to build against Qt5

@chrislongros:

The digiKam dependencies list I pointed you to, includes some Qt5 resources – despite your Qt6 environment and, the digiKam product being Qt6 compatible, to build it, you’ll need the Qt5 resources indicated in the digiKam dependencies list.

I installed the packages according to the dependency errors and I get the following info:

KDE Frameworks 
Version 5.116.0

Qt 
Version 5.15.16 (built against 5.15.13)

@chrislongros:

Looking at your original post again, I notice that “Qt5NetworkAuth” is missing.

  • You need to install a Qt5 NetworkAuth development package – don’t know what the package name on your system is but, on this system it’s “libqt5-qtnetworkauth-devel” –
 > ls -al /usr/lib64/cmake/Qt5NetworkAuth/
insgesamt 24
drwxr-xr-x  2 root root  4096  8. Jan 17:26 ./
drwxr-xr-x 70 root root  4096  8. Jan 17:26 ../
-rw-r--r--  1 root root 10340 28. Mai 2024  Qt5NetworkAuthConfig.cmake
-rw-r--r--  1 root root   289 28. Mai 2024  Qt5NetworkAuthConfigVersion.cmake
 > 
 > ls -al /usr/lib64/cmake/Qt5Network/
insgesamt 24
drwxr-xr-x  2 root root  4096 13. Aug 18:33 ./
drwxr-xr-x 70 root root  4096  8. Jan 17:26 ../
-rw-r--r--  1 root root 10285  7. Aug 09:07 Qt5NetworkConfig.cmake
-rw-r--r--  1 root root   289  7. Aug 09:07 Qt5NetworkConfigVersion.cmake
 >

I am on Arch Linux and I installed the required packages from the extra repos eg.:

extra/qt5-networkauth 5.15.16+kde+r1-3 (qt5) [installed]

Why is digikam build against Qt5? Should I install them from the AUR ?

aur/qt5-networkauth-git 5.15.9.r0.g59311ee-1 (+0 0.00) ?