[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1023054: qt6-base FTCBFS: multiple reasons



Source: qt6-base
Version: 6.3.1+dfsg-10
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

qt6-base fails to cross build from source for many different reasons.
I've created a patch that makes it cross buildable and documented the
individual aspects in the changelog. Does all of that make sense to you?
The most contentious parts are probably in cross.patch. Do you think
they're upstreamable in some way?

Helmut
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/changelog qt6-base-6.3.1+dfsg/debian/changelog
--- qt6-base-6.3.1+dfsg/debian/changelog	2022-10-01 18:58:47.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/changelog	2022-10-28 19:58:00.000000000 +0200
@@ -1,3 +1,16 @@
+qt6-base (6.3.1+dfsg-10.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass QT_HOST_PATH. (Closes: #-1)
+    + cross.patch: Honour PKG_CONFIG_EXECUTABLE
+    + cross.patch: Allow building android tools
+    + Pass QT_HOST_* variables to build.
+    + Depend on a native qt toolchain for the former.
+    + Do build tools even when cross building.
+    + Add excess files t debian/not-installed.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Fri, 28 Oct 2022 19:58:00 +0200
+
 qt6-base (6.3.1+dfsg-10) unstable; urgency=medium
 
   [ Lisandro Damián Nicanor Pérez Meyer ]
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/control qt6-base-6.3.1+dfsg/debian/control
--- qt6-base-6.3.1+dfsg/debian/control	2022-09-17 19:21:11.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/control	2022-10-28 19:58:00.000000000 +0200
@@ -71,6 +71,7 @@
                ninja-build,
                pkg-config,
                pkg-kde-tools (>= 0.15.17~),
+               qt6-base-dev:native <cross>,
                unixodbc-dev,
                zlib1g-dev,
 Standards-Version: 4.6.1
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/not-installed qt6-base-6.3.1+dfsg/debian/not-installed
--- qt6-base-6.3.1+dfsg/debian/not-installed	2022-09-11 13:58:51.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/not-installed	2022-10-28 19:58:00.000000000 +0200
@@ -4,3 +4,8 @@
 usr/lib/${DEB_HOST_MULTIARCH}/cmake/Qt6/3rdparty/kwin/qt_attribution.json
 usr/lib/qt6/bin/qmake
 usr/lib/qt6/bin/qtpaths
+# cross build specific:
+usr/lib/qt6/bin/host-qmake
+usr/lib/qt6/bin/host-qtpaths
+usr/lib/qt6/bin/target_qt.conf
+usr/lib/${DEB_HOST_MULTIARCH}/qt6/mkspecs/qdevice.pri
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/patches/cross.patch qt6-base-6.3.1+dfsg/debian/patches/cross.patch
--- qt6-base-6.3.1+dfsg/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ qt6-base-6.3.1+dfsg/debian/patches/cross.patch	2022-10-28 19:58:00.000000000 +0200
@@ -0,0 +1,22 @@
+--- qt6-base-6.3.1+dfsg.orig/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
++++ qt6-base-6.3.1+dfsg/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+@@ -146,8 +146,6 @@
+     set(FEATURE_pkg_config "${pkg_config_enabled}" CACHE STRING "Using pkg-config")
+     if(NOT pkg_config_enabled)
+         qt_build_internals_disable_pkg_config()
+-    else()
+-        unset(PKG_CONFIG_EXECUTABLE CACHE)
+     endif()
+ endfunction()
+ 
+--- qt6-base-6.3.1+dfsg.orig/src/tools/configure.cmake
++++ qt6-base-6.3.1+dfsg/src/tools/configure.cmake
+@@ -2,7 +2,7 @@
+     SECTION "Deployment"
+     LABEL "Android deployment tool"
+     PURPOSE "The Android deployment tool automates the process of creating Android packages."
+-    CONDITION NOT CMAKE_CROSSCOMPILING AND QT_FEATURE_regularexpression)
++    CONDITION QT_FEATURE_regularexpression)
+ 
+ qt_feature("macdeployqt" PRIVATE
+     SECTION "Deployment"
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/patches/series qt6-base-6.3.1+dfsg/debian/patches/series
--- qt6-base-6.3.1+dfsg/debian/patches/series	2022-09-17 13:50:40.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/patches/series	2022-10-28 19:58:00.000000000 +0200
@@ -11,3 +11,4 @@
 
 # Don't use yield on CPUs that might not support it
 armel-noyield.patch
+cross.patch
diff --minimal -Nru qt6-base-6.3.1+dfsg/debian/rules qt6-base-6.3.1+dfsg/debian/rules
--- qt6-base-6.3.1+dfsg/debian/rules	2022-09-17 19:21:11.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/rules	2022-10-28 19:58:00.000000000 +0200
@@ -19,6 +19,13 @@
         extra_cmake_args += -DFEATURE_sctp=OFF
 endif
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	extra_cmake_args += \
+		-DQT_HOST_PATH=/usr \
+		-DQT_HOST_PATH_CMAKE_DIR=/usr/lib/${DEB_BUILD_MULTIARCH}/cmake \
+		-DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON
+endif
+
 %:
 	dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 

Reply to: