Bug#929579: fio FTCBFS: builds for the build architecture

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#929579: fio FTCBFS: builds for the build architecture

Helmut Grohne
Source: fio
Version: 3.12-2
Tags: patch
User: [hidden email]
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

fio_3.12-2.1.debdiff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#929579: fio FTCBFS: builds for the build architecture

Martin Steigerwald-5
Hello Helmut, Helmut Grohne - 26.05.19, 16:22: > Source: fio > Version: 3.12-2 > Tags: patch > User: [hidden email] > 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 [hidden email] (cc to Jens Axboe <[hidden email]> 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: <a href="tel:+49%20911%2030999%200" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#7D7D7D;">+49 911 30999 0 • 
Fax: <a href="tel:" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#7D7D7D;">+49 911 30999 99
Südwestpark 43 • 
90449 Nürnberg • 
Germany
[hidden email] • 
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 –
Proact Wissenstag
Reply | Threaded
Open this post in threaded view
|

Bug#929579: [PATCH 1/2] configure: apply ${cross_prefix} to pkg-config calls

Helmut Grohne
In reply to this post by Helmut Grohne
Otherwise, we're searching for build architecture libraries which is not
what we want.

Signed-off-by: Helmut Grohne <[hidden email]>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index b0052dc1..82bd432e 100755
--- a/configure
+++ b/configure
@@ -1344,14 +1344,14 @@ int main(void)
   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
--
2.20.1

Reply | Threaded
Open this post in threaded view
|

Bug#929579: [PATCH 2/2] configure: check for gtk version using pkg-config

Helmut Grohne
In reply to this post by Helmut Grohne
The previous way of running a program was incompatible with cross
compilation. The program is still being compiled as a sanity check, but
no longer run.

Signed-off-by: Helmut Grohne <[hidden email]>
---
 configure | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 82bd432e..383175ae 100755
--- a/configure
+++ b/configure
@@ -1356,19 +1356,18 @@ 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
--
2.20.1

Reply | Threaded
Open this post in threaded view
|

Bug#929579: [PATCH 1/2] configure: apply ${cross_prefix} to pkg-config calls

Jens Axboe-4
In reply to this post by Helmut Grohne
On 5/27/19 1:32 PM, Helmut Grohne wrote:
> Otherwise, we're searching for build architecture libraries which is not
> what we want.

Applied 1-2, thanks.

--
Jens Axboe

Reply | Threaded
Open this post in threaded view
|

Bug#929579: [PATCH 1/2] configure: apply ${cross_prefix} to pkg-config calls

Martin Steigerwald-5
Hi Jens, hi Helmut, (unfortunately our signature software seems to add HTML to the mail and vger.kernel.org rejects the mail then… so it won't appear on fio mailing list. This is nothing I can influence from my mail client.) Jens Axboe - 27.05.19, 22:51:
Mit freundlichen Grüßen / With kind regards
Martin Steigerwald • 
Proact Deutschland GmbH
Trainer
Telefon: <a href="tel:+49%20911%2030999%200" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#7D7D7D;">+49 911 30999 0 • 
Fax: <a href="tel:" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#7D7D7D;">+49 911 30999 99
Südwestpark 43 • 
90449 Nürnberg • 
Germany
[hidden email] • 
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 –
Proact Wissenstag
> On 5/27/19 1:32 PM, Helmut Grohne wrote: > > Otherwise, we're searching for build architecture libraries which is > > not what we want. > > Applied 1-2, thanks. Thanks. When there is a new fio release I update the package and am ready to apply/merge the Debian related parts of the cross build changes. Ciao,
Reply | Threaded
Open this post in threaded view
|

Bug#929579: [PATCH 1/2] configure: apply ${cross_prefix} to pkg-config calls

Jens Axboe-4
Your IT department needs a stern talking to... But I'd just use
your personal email then, any kind of html email will be a problem
on any of the vger hosted lists.


On 5/28/19 6:57 AM, Martin Steigerwald wrote:

> Hi Jens, hi Helmut, (unfortunately our signature software seems to add HTML to the mail and vger.kernel.org rejects the mail then… so it won't appear on fio mailing list. This is nothing I can influence from my mail client.) Jens Axboe - 27.05.19, 22:51:
> Mit freundlichen Grüßen / With kind regards​
>
> Martin Steigerwald  •
> Proact Deutschland GmbH
>
> Trainer
>
> Telefon: *+49 911 30999 0* <tel:+49%20911%2030999%200>  •
> Fax: *+49 911 30999 99* <tel:>
>
> Südwestpark 43  •
> 90449 Nürnberg  •
> Germany
>
> *[hidden email]* <mailto:[hidden email]>  •
> *www.proact.de* <https://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 –
>
> Proact Wissenstag <https://go.proact.eu/Proact-Wissenstage-Anmeldung>
>
>  > On 5/27/19 1:32 PM, Helmut Grohne wrote: > > Otherwise, we're searching for build architecture libraries which is > > not what we want. > > Applied 1-2, thanks. Thanks. When there is a new fio release I update the package and am ready to apply/merge the Debian related parts of the cross build changes. Ciao,


--
Jens Axboe