All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin.Steigerwald@proact.de>
To: "fio@vger.kernel.org" <fio@vger.kernel.org>
Cc: Helmut Grohne <helmut@subdivi.de>, Jens Axboe <axboe@kernel.dk>
Subject: Fwd: Bug#929579: fio FTCBFS: builds for the build architecture
Date: Mon, 27 May 2019 08:06:59 +0000	[thread overview]
Message-ID: <2555177.PyF0XoxEVR@merkaba> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 1524 bytes --]

Hi Jens, hi Helmut.

Jens, would the cross-build fixes contained in the attached debdiff 
(fio-3.12/debian/patches/cross.patch)  be something you would consider 
applying upstream?

I bet it could help other distributions with cross-building capabilities 
as well.

Thank you,
Martin

----------  Weitergeleitete Nachricht  ----------

Betreff: Bug#929579: fio FTCBFS: builds for the build architecture
Datum: Sonntag, 26. Mai 2019, 17:12:15 CEST
Von: Helmut Grohne <helmut@subdivi.de>
An: Debian Bug Tracking System <submit@bugs.debian.org>

Source: fio
Version: 3.12-2
Tags: patch
User: helmutg@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

-------------------------------------------------------------
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.Steigerwald@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 –

[-- Attachment #1.1.2: Type: text/html, Size: 9506 bytes --]

[-- Attachment #1.2: image157690.png --]
[-- Type: image/png, Size: 58737 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fio_3.12-2.1.debdiff --]
[-- Type: text/x-patch; name="fio_3.12-2.1.debdiff", Size: 3069 bytes --]

diff --minimal -Nru fio-3.12/debian/changelog fio-3.12/debian/changelog
--- fio-3.12/debian/changelog	2019-01-21 09:29:38.000000000 +0100
+++ fio-3.12/debian/changelog	2019-05-25 14:14:03.000000000 +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 <helmut@subdivi.de>  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.000000000 +0100
+++ fio-3.12/debian/patches/cross.patch	2019-05-25 14:14:03.000000000 +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.000000000 +0100
+++ fio-3.12/debian/patches/series	2019-05-25 14:14:03.000000000 +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.000000000 +0100
+++ fio-3.12/debian/rules	2019-05-25 14:14:03.000000000 +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 $@
 

             reply	other threads:[~2019-05-27  8:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  8:06 Martin Steigerwald [this message]
2019-05-27 15:23 ` Fwd: Bug#929579: fio FTCBFS: builds for the build architecture Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2555177.PyF0XoxEVR@merkaba \
    --to=martin.steigerwald@proact.de \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=helmut@subdivi.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.