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

Bug#876131: qtbase-opensource-src FTCBFS: uses the build architecture toolchain



Hi,

On Mon, Sep 18, 2017 at 05:04:40PM -0300, Lisandro Damián Nicanor Pérez Meyer wrote:
> The only way I could accept that if we could build-depend on a
> specific version (the same version we are trying to compile).
> 
> Helmut told me that's not possible, and I know from experience that
> having a window opened to build qt with an oder qmake it's calling for
> big troubles.

We arrived at a compromise: Turn the check into a build-time check.
Rather than having dpkg-checkbuilddeps verify the property, we can have
debian/rules check the version.

I also updated the patch to the current version.

Limitations:
 * Only works for arm64 and armel since no other architectures have
   matching mkspecs
 * Fails when it encounters mysql_config. I didn't figure out yet how to
   make it use pkg-config mysqlclient instead, but that's what needs to
   happen.

Helmut
diff --minimal -Nru qtbase-opensource-src-5.12.5+dfsg/debian/changelog qtbase-opensource-src-5.12.5+dfsg/debian/changelog
--- qtbase-opensource-src-5.12.5+dfsg/debian/changelog	2019-12-31 12:19:15.000000000 +0100
+++ qtbase-opensource-src-5.12.5+dfsg/debian/changelog	2020-01-16 16:27:50.000000000 +0100
@@ -1,3 +1,13 @@
+qtbase-opensource-src (5.12.5+dfsg-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: (Closes: #876131)
+    + Pass --external-hostbindir to use the native qmake.
+    + Pass a cross platform_arg.
+    + Verify that the qmake self-dependency exactly matches the version.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Thu, 16 Jan 2020 16:27:50 +0100
+
 qtbase-opensource-src (5.12.5+dfsg-5) unstable; urgency=medium
 
   [ Pino Toscano ]
diff --minimal -Nru qtbase-opensource-src-5.12.5+dfsg/debian/control qtbase-opensource-src-5.12.5+dfsg/debian/control
--- qtbase-opensource-src-5.12.5+dfsg/debian/control	2019-12-31 12:19:15.000000000 +0100
+++ qtbase-opensource-src-5.12.5+dfsg/debian/control	2020-01-16 16:27:50.000000000 +0100
@@ -66,6 +66,7 @@
                libxrender-dev,
                pkg-kde-tools (>= 0.15.17~),
                publicsuffix,
+               qt5-qmake-bin <cross>,
                unixodbc-dev,
                zlib1g-dev
 Build-Depends-Indep: qdoc-qt5 (>= 5.12) <!nodoc>,
diff --minimal -Nru qtbase-opensource-src-5.12.5+dfsg/debian/rules qtbase-opensource-src-5.12.5+dfsg/debian/rules
--- qtbase-opensource-src-5.12.5+dfsg/debian/rules	2019-12-31 12:19:15.000000000 +0100
+++ qtbase-opensource-src-5.12.5+dfsg/debian/rules	2020-01-16 16:27:50.000000000 +0100
@@ -52,14 +52,15 @@
 	cpu_opt = -no-sse2 -no-pch
 endif
 
-ifeq ($(DEB_HOST_ARCH_OS),linux)
-	platform_arg = linux-g++
-else ifeq ($(DEB_HOST_ARCH_OS),hurd)
-	platform_arg = hurd-g++
-else ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
-	platform_arg = gnukfreebsd-g++
-else
-	$(error Unknown qmake mkspec for $(DEB_HOST_ARCH_OS))
+mkspec_osmap_kfreebsd = gnukfreebsd
+platform_os = $(or $(mkspec_osmap_$(DEB_HOST_ARCH_OS)),$(DEB_HOST_ARCH_OS))
+platform_arg = $(platform_os)-g++
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+platform_arg = $(platform_os)-$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_LIBC)$(filter-out base,$(DEB_HOST_ARCH_ABI))-g++
+endif
+ifneq (,$(filter cross,$(DEB_BUILD_PROFILES)))
+extra_configure_opts += -external-hostbindir /usr/lib/qt5/bin
 endif
 
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -72,6 +73,9 @@
 	dh $@ --with pkgkde_symbolshelper
 
 override_dh_auto_configure:
+ifneq (,$(filter cross,$(DEB_BUILD_PROFILES)))
+	test "`dpkg-query -f '$${Version}' -W qt5-qmake-bin`" = "$(DEB_VERSION)"
+endif
 	MAKEFLAGS="-j$(NUMJOBS) ${CXXFLAGS:%=EXTRA_CXXFLAGS+=%} ${LDFLAGS:%=EXTRA_LFLAGS+=%}" \
 	        ./configure \
 	            -confirm-license \

Reply to: