kde-builder fails to build qt6-set
On Debian testing, trying to build the Qt 6 modules using
kde-builder qt6-set
as described at https://community.kde.org/Get_Involved/development/More#Build_Qt_using_kdesrc-build for kdesrc-build (for which kde-builder is meant to be a drop-in replacement, IIUC) fails:
$ ./kde-builder qt6-set
Fetching remote changes to sysadmin-repo-metadata
Merging sysadmin-repo-metadata changes from branch master
Holding performance profile
Building qt5compat from qt6-set (1/21)
Cloning qt5compat
Source update complete for qt5compat: 1441 files affected.
Preparing build system for qt5compat.
Running cmake targeting Ninja...
Unable to configure qt5compat with Qt6
qt5compat didn't build, stopping here.
[monitor process] recv SIGHUP, will end after updater process finishes.
[updater process] recv SIGHUP, will end after updating qtbase module.
<<< PACKAGES FAILED TO BUILD >>>
qt5compat - /home/michi/development/kde/src/log/2024-04-18-01/qt5compat/cmake.log
:-(
Your logs are saved in /home/michi/development/kde/src/log/2024-04-18-01
(additional logs are saved in /home/michi/.local/state/log/2024-04-18-60)
The qt5compat cmake log shows that it fails to find a proper Qt version, as the one on the system is too old:
# kde-builder running: 'cmake' '-B' '.' '-S' '/home/michi/development/kde/src/qt5compat' '-G' 'Ninja' '-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON' '-DCMAKE_BUILD_TYPE=Debug' '-DQT_BUILD_TESTS=FALSE' '-DCMAKE_BUILD_TYPE=RelWithDebInfo' '-DQT_AVOID_CMAKE_ARCHIVING_API=TRUE' '-DCMAKE_CXX_FLAGS:STRING=-pipe' '-DCMAKE_INSTALL_PREFIX=/home/michi/development/kde/qt'
# from directory: /home/michi/development/kde/build/qt5compat
-- The CXX compiler identification is GNU 13.2.0
-- The C compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6ConfigVersion.cmake:51 (message):
Version 6.6.3 of package Qt6 was requested but an incompatible version was
found: 6.4.2. You can pass -DQT_NO_PACKAGE_VERSION_CHECK=TRUE to disable
the version check and force the incompatible version to be used. There is
no guarantee the build will succeed. Use at your own risk. You can
silence this warning by passing
-DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE
Call Stack (most recent call first):
CMakeLists.txt:16 (find_package)
CMake Warning at /lib/x86_64-linux-gnu/cmake/Qt6/Qt6ConfigVersion.cmake:51 (message):
Version 6.6.3 of package Qt6 was requested but an incompatible version was
found: 6.4.2. You can pass -DQT_NO_PACKAGE_VERSION_CHECK=TRUE to disable
the version check and force the incompatible version to be used. There is
no guarantee the build will succeed. Use at your own risk. You can
silence this warning by passing
-DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE
Call Stack (most recent call first):
CMakeLists.txt:16 (find_package)
CMake Error at CMakeLists.txt:16 (find_package):
Could not find a configuration file for package "Qt6" that is compatible
with requested version "6.6.3".
The following configuration files were considered but not accepted:
/usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake, version: 6.4.2
/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake, version: 6.4.2
-- Configuring incomplete, errors occurred!
As far as I understand, the problem is that kde-builder attempts to build qt5compat
before building its dependencies, in particular qtbase
.
There is actually an order defined in the repo-metadata, at https://invent.kde.org/sysadmin/repo-metadata/-/blob/2646b0ee85cb76143685966549c65811b146cde2/module-definitions/qt6.ksb#L16-25:
# These have been manually placed in dependency order based on the
# .gitmodules file in https://code.qt.io/cgit/qt/qt5.git/tree/.gitmodules
# in "essential" or "addons" categories with some additions
# qtdoc should be last to give it best opportunity to make needed docs
use-modules qtbase qttools qtshadertools qtdeclarative qtsvg \
qtimageformats qtmultimedia qtwayland \
qtwebsockets qtwebchannel qtwebview qtsensors \
qtnetworkauth qt5compat qtdoc qtpositioning \
qtlocation qtvirtualkeyboard qttranslations \
qtlanguageserver qtspeech
Maybe kde-builder doesn't take that into account as it should? Or am I possibly missing something else in my setup?
(Invoking kde-builder manually for each of these modules in that order works.)
For reference: ~/.config/kdesrc-build
used: kdesrc-buildrc
PS: There's a big banner at the top saying bugs should be filed at bugs.kde.org instead of here in Gitlab, but I couldn't find a corresponding product there. Please apologize if this is the wrong place.