Source: qtbase-opensource-src Version: 5.9.1+dfsg-9 Severity: wishlist User: helm...@debian.org Usertags: rebootstrap
qtbase-opensource-src fails to cross build from source, because it uses the build architecture compiler and stuff. I looked a bit and it seems one should pass something else for -platform for cross compilation. It seems to search directories below mkspecs/ and for arm64 and armel there are particular directories available. We only need to come up with the right platform_arg (see patch attached). After doing so, the build fails to run its own qmake. That's kinda expected. It seems that the remedy is passing -external-hostbindir and it expects to find a qmake binary in that directory. With a self-dependency, we can use the build architecture qmake and the build goes a lot further until it bumps into #794103: > make[2]: Entering directory > '/<<BUILDDIR>>/qtbase-opensource-src-5.9.1+dfsg/config.tests/unix/psql' > aarch64-linux-gnu-g++ -c -g -O2 > -fdebug-prefix-map=/<<BUILDDIR>>/qtbase-opensource-src-5.9.1+dfsg=. > -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time > -D_FORTIFY_SOURCE=2 -O2 -Wall -W -fPIC -I. > -I/<<BUILDDIR>>/qtbase-opensource-src-5.9.1+dfsg/mkspecs/linux-aarch64-gnu-g++ > -o psql.o psql.cpp > psql.cpp:40:10: fatal error: libpq-fe.h: No such file or directory > #include "libpq-fe.h" > ^~~~~~~~~~~~ > compilation terminated. > Makefile:171: recipe for target 'psql.o' failed > make[2]: *** [psql.o] Error 1 > make[2]: Leaving directory > '/<<BUILDDIR>>/qtbase-opensource-src-5.9.1+dfsg/config.tests/unix/psql' Still, that's a lot more than the initial attempt. Please have a look at the patch and use the bits that look reasonable. Improve the others. ;) Helmut
diff --minimal -Nru qtbase-opensource-src-5.9.1+dfsg/debian/changelog qtbase-opensource-src-5.9.1+dfsg/debian/changelog --- qtbase-opensource-src-5.9.1+dfsg/debian/changelog 2017-08-20 18:13:27.000000000 +0200 +++ qtbase-opensource-src-5.9.1+dfsg/debian/changelog 2017-09-18 21:16:40.000000000 +0200 @@ -1,3 +1,10 @@ +qtbase-opensource-src (5.9.1+dfsg-9.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Partially fix FTCBFS. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 18 Sep 2017 21:16:40 +0200 + qtbase-opensource-src (5.9.1+dfsg-9) unstable; urgency=medium [ Lisandro Damián Nicanor Pérez Meyer ] diff --minimal -Nru qtbase-opensource-src-5.9.1+dfsg/debian/control qtbase-opensource-src-5.9.1+dfsg/debian/control --- qtbase-opensource-src-5.9.1+dfsg/debian/control 2017-08-20 18:13:27.000000000 +0200 +++ qtbase-opensource-src-5.9.1+dfsg/debian/control 2017-09-18 21:16:40.000000000 +0200 @@ -62,6 +62,7 @@ libxrender-dev, pkg-kde-tools (>= 0.15.17~), publicsuffix, + qt5-qmake:native <cross>, unixodbc-dev, zlib1g-dev Build-Depends-Indep: libqt5sql5-sqlite (>= 5.8.0+dfsg~) <!nodoc>, diff --minimal -Nru qtbase-opensource-src-5.9.1+dfsg/debian/rules qtbase-opensource-src-5.9.1+dfsg/debian/rules --- qtbase-opensource-src-5.9.1+dfsg/debian/rules 2017-08-20 18:13:27.000000000 +0200 +++ qtbase-opensource-src-5.9.1+dfsg/debian/rules 2017-09-18 21:16:40.000000000 +0200 @@ -3,11 +3,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) -DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) -DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) +include /usr/share/dpkg/architecture.mk export PATH := $(PATH):$(shell pwd)/bin export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS) $(shell getconf LFS_CFLAGS) @@ -61,6 +57,12 @@ else $(error Unknown qmake mkspec for $(DEB_HOST_ARCH_OS)) endif +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +mkspec_osmap_kfreebsd = gnukfreebsd +platform_arg = $(or $(mkspec_osmap_$(DEB_HOST_ARCH_OS)),$(DEB_HOST_ARCH_OS))-$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_LIBC)$(filter-out base,$(DEB_HOST_ARCH_ABI))-g++ +extra_configure_opts += -external-hostbindir /usr/lib/$(DEB_BUILD_MULTIARCH)/qt5/bin +endif + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))