Source: kwin-x11
Version: 4:6.7.4-1
Tags: patch
User: [email protected]
Usertags: ftcbfs
Control: affects 1146581 + src:kwin-x11

kwin-x11 fails to cross build from source. On the source, the build says
that one should define KF6_HOST_TOOLING. The actual problem is more
nuanced. kwin-x11 needs a fork of qtwaylandscanner named
qtwaylandscanner_kde. While the readme says that it should be deleted
for Qt6, that's not where we are. The build system has a few options:
1. One may define -DQTWAYLANDSCANNER_KDE_EXECUTABLE=... to supply one
   explicitly.
2. One may define -DKF6_HOST_TOOLING=... and have it build one.
3. One may build natively.

While the KF6_HOST_TOOLING path sounds obvious, this variable is
consumed by a pile of other KF6 modules. They end up attempting to
rebuild tools rather than using installed ones. As a result, we'd vastly
increase Build-Depends and build time. I prefer treating
qtwaylandscanner_kde as the exception here. So the route I'm proposing
in the attached patch is explicitly building qtwaylandscanner_kde and
providing its executable name to the build. This is also due to the note
that it is supposed to disappear. Hope you agree with this choice.

Until Python fixes #1146581, actually cross building kwin-x11 continues
to fail.

Helmut
diff -Nru kwin-x11-6.7.4/debian/changelog kwin-x11-6.7.4/debian/changelog
--- kwin-x11-6.7.4/debian/changelog     2026-08-10 17:48:27.000000000 +0200
+++ kwin-x11-6.7.4/debian/changelog     2026-11-21 09:17:12.000000000 +0100
@@ -1,3 +1,10 @@
+kwin-x11 (4:6.7.4-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Add a native qtwaylandscanner_kde build pass. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sat, 21 Nov 2026 09:17:12 +0100
+
 kwin-x11 (4:6.7.4-1) unstable; urgency=medium
 
   [ Aurélien COUDERC ]
diff -Nru kwin-x11-6.7.4/debian/clean kwin-x11-6.7.4/debian/clean
--- kwin-x11-6.7.4/debian/clean 1970-01-01 01:00:00.000000000 +0100
+++ kwin-x11-6.7.4/debian/clean 2026-11-21 09:17:12.000000000 +0100
@@ -0,0 +1 @@
+obj-native_qtwaylandscanner_kde
diff -Nru kwin-x11-6.7.4/debian/control kwin-x11-6.7.4/debian/control
--- kwin-x11-6.7.4/debian/control       2026-08-10 08:27:40.000000000 +0200
+++ kwin-x11-6.7.4/debian/control       2026-11-21 09:17:12.000000000 +0100
@@ -90,6 +90,7 @@
                python3:any,
                qt6-5compat-dev (>= 6.10.0~),
                qt6-base-dev (>= 6.10.0~),
+               qt6-base-dev:native,
                qt6-base-private-dev (>= 6.10.0~),
                qt6-declarative-dev (>= 6.10.0~),
                qt6-declarative-private-dev (>= 6.8.0~),
diff -Nru kwin-x11-6.7.4/debian/rules kwin-x11-6.7.4/debian/rules
--- kwin-x11-6.7.4/debian/rules 2026-02-24 19:18:57.000000000 +0100
+++ kwin-x11-6.7.4/debian/rules 2026-11-21 09:17:12.000000000 +0100
@@ -1,11 +1,24 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+include /usr/share/dpkg/architecture.mk
+
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
        dh $@
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+# We need a native qtwaylandscanner_kde. Debian does not presently package one.
+# We might have it built automatically by setting -DKF6_HOST_TOOLING, but then
+# we'd also build all sorts of other tools such as KF6Kauth, KF6ColorScheme,
+# and KF6Package. Instead, supply exactly qtwaylandscanner_kde.
+override_dh_auto_configure:
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure 
--sourcedir=src/wayland/tools --builddir=obj-native_qtwaylandscanner_kde 
--reload-all-buildenv-variables
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build 
--sourcedir=src/wayland/tools --builddir=obj-native_qtwaylandscanner_kde 
--reload-all-buildenv-variables
+       dh_auto_configure -- 
-DQTWAYLANDSCANNER_KDE_EXECUTABLE=$(CURDIR)/obj-native_qtwaylandscanner_kde/qtwaylandscanner_kde
+endif
+
 override_dh_auto_test:
        # Disable auto tests at build time
        :

Reply via email to