Bug#929579: fio FTCBFS: builds for the build architecture
Hi Helmut. Am Montag, den 27.05.2019, 09:47 +0200 schrieb Martin Steigerwald: > Helmut Grohne - 26.05.19, 16:22: > > Source: fio > > Version: 3.12-2 […] > > fio fails to cross build from source, because it configures for the > > build architecture. fio's configure is very different from autotools > > and requires the user to export a variable called CROSS_COMPILE. > > Even > > then, it uses the wrong pkg-config and runs compiled executables. > > The > > attached patch makes fio cross buildable. Please consider applying > > it. […] > It appears to me that your change would make sense for upstream to > consider, as according to you there is a bug with cross building in > fio's own configure logic. If so it might make the most sense to > propose the change to upstream via f...@vger.kernel.org (cc to Jens > Axboe and me please), in order to keep the Debian > diff to a minimum. Especially as your patch changes several non- > consecutive lines. […] > According to the debdiff your patch does not contain a Author: and > Description: line. Please add those. > > Please consider issuing a merge request for your change then¹. […] I updated the packaging to fio-3.15 which should contain the patches you submitted to upstream. Please provide a merge request for the Debian specific changes that are needed to enable cross-building. In case you need to make Debian specific changes to the upstream source code, please make sure your patch contains Author: and Descripton: lines. Please document your changes in the changelog under your name. Please also test cross building before submitting your merge request. The package uses git-buildpackage so please use 'gbp clone' to clone the repository and branch from 'master' branch to generate your merge request, which should contain only changes in 'debian' directory. > [1] https://salsa.debian.org/debian/fio Thanks, Mit freundlichen Grüßen / With kind regards Martin Steigerwald • Proact Deutschland GmbH Trainer Telefon: +49 911 30999 0 • Fax: +49 911 30999 99 Südwestpark 43 • 90449 Nürnberg • Germany martin.steigerw...@proact.de • www.proact.de Amtsgericht Nürnberg • HRB 18320 Geschäftsführer: Oliver Kügow • Richard Müller • Jakob Høholdt • Peter Mikael Javestad – Delivering Business Agility –
Bug#929579: fio FTCBFS: builds for the build architecture
Hello Helmut, Helmut Grohne - 26.05.19, 16:22: > Source: fio > Version: 3.12-2 > Tags: patch > User: helm...@debian.org > Usertags: rebootstrap > > fio fails to cross build from source, because it configures for the > build architecture. fio's configure is very different from autotools > and requires the user to export a variable called CROSS_COMPILE. Even > then, it uses the wrong pkg-config and runs compiled executables. The > attached patch makes fio cross buildable. Please consider applying > it. Thank you for your bug report and your patch. It appears to me that your change would make sense for upstream to consider, as according to you there is a bug with cross building in fio's own configure logic. If so it might make the most sense to propose the change to upstream via f...@vger.kernel.org (cc to Jens Axboe and me please), in order to keep the Debian diff to a minimum. Especially as your patch changes several non-consecutive lines. Otherwise and probably interim I would carry the change in the package: According to the debdiff your patch does not contain a Author: and Description: line. Please add those. Please consider issuing a merge request for your change then¹. I do not consider this change to be important enough to warrant a freeze exception for Buster. [1] https://salsa.debian.org/debian/fio Thank you, Mit freundlichen Grüßen / With kind regards Martin Steigerwald • Proact Deutschland GmbH Trainer Telefon: +49 911 30999 0 • Fax: +49 911 30999 99 Südwestpark 43 • 90449 Nürnberg • Germany martin.steigerw...@proact.de • www.proact.de Amtsgericht Nürnberg • HRB 18320 Geschäftsführer: Oliver Kügow • Richard Müller • Jakob Høholdt • Peter Mikael Javestad – Delivering Business Agility –
Bug#929579: fio FTCBFS: builds for the build architecture
Source: fio Version: 3.12-2 Tags: patch User: helm...@debian.org Usertags: rebootstrap fio fails to cross build from source, because it configures for the build architecture. fio's configure is very different from autotools and requires the user to export a variable called CROSS_COMPILE. Even then, it uses the wrong pkg-config and runs compiled executables. The attached patch makes fio cross buildable. Please consider applying it. Helmut diff --minimal -Nru fio-3.12/debian/changelog fio-3.12/debian/changelog --- fio-3.12/debian/changelog 2019-01-21 09:29:38.0 +0100 +++ fio-3.12/debian/changelog 2019-05-25 14:14:03.0 +0200 @@ -1,3 +1,13 @@ +fio (3.12-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) ++ Export CROSS_COMPILE. ++ cross.patch: Apply $CROSS_COMPILE to pkg-config and avoid running + compiled code. + + -- Helmut Grohne Sat, 25 May 2019 14:14:03 +0200 + fio (3.12-2) unstable; urgency=medium * control: Depend on libglusterfs-dev instead of glusterfs-common diff --minimal -Nru fio-3.12/debian/patches/cross.patch fio-3.12/debian/patches/cross.patch --- fio-3.12/debian/patches/cross.patch 1970-01-01 01:00:00.0 +0100 +++ fio-3.12/debian/patches/cross.patch 2019-05-25 14:14:03.0 +0200 @@ -0,0 +1,42 @@ +--- fio-3.12.orig/configure fio-3.12/configure +@@ -1336,31 +1336,30 @@ + return GTK_CHECK_VERSION(2, 18, 0) ? 0 : 1; /* 0 on success */ + } + EOF +-GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0) ++GTK_CFLAGS=$(${cross_prefix}pkg-config --cflags gtk+-2.0 gthread-2.0) + ORG_LDFLAGS=$LDFLAGS + LDFLAGS=$(echo $LDFLAGS | sed s/"-static"//g) + if test "$?" != "0" ; then + echo "configure: gtk and gthread not found" + exit 1 + fi +-GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0) ++GTK_LIBS=$(${cross_prefix}pkg-config --libs gtk+-2.0 gthread-2.0) + if test "$?" != "0" ; then + echo "configure: gtk and gthread not found" + exit 1 + fi +-if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then +- $TMPE +- if test "$?" = "0" ; then ++if ! ${cross_prefix}pkg-config --atleast-version 2.18.0 gtk+-2.0; then ++ echo "GTK found, but need version 2.18 or higher" ++ gfio="no" ++else ++ if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then + gfio="yes" + GFIO_LIBS="$LIBS $GTK_LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + else +-echo "GTK found, but need version 2.18 or higher" ++echo "Please install gtk and gdk libraries" + gfio="no" + fi +-else +- echo "Please install gtk and gdk libraries" +- gfio="no" + fi + LDFLAGS=$ORG_LDFLAGS + fi diff --minimal -Nru fio-3.12/debian/patches/series fio-3.12/debian/patches/series --- fio-3.12/debian/patches/series 2018-11-28 18:09:19.0 +0100 +++ fio-3.12/debian/patches/series 2019-05-25 14:14:03.0 +0200 @@ -3,3 +3,4 @@ fio2gnuplot-manpage configure-no-configlog genfio-interpreter +cross.patch diff --minimal -Nru fio-3.12/debian/rules fio-3.12/debian/rules --- fio-3.12/debian/rules 2018-11-28 18:09:19.0 +0100 +++ fio-3.12/debian/rules 2019-05-25 14:14:03.0 +0200 @@ -9,12 +9,18 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +include /usr/share/dpkg/architecture.mk + export DEB_LDFLAGS_MAINT_PREPEND := -Wl,-z,defs -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS = hardening=+all export V = 1 +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- +endif + %: dh $@