* Fwd: Bug#929579: fio FTCBFS: builds for the build architecture
@ 2019-05-27 8:06 Martin Steigerwald
2019-05-27 15:23 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Martin Steigerwald @ 2019-05-27 8:06 UTC (permalink / raw)
To: fio; +Cc: Helmut Grohne, Jens Axboe
[-- 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 $@
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fwd: Bug#929579: fio FTCBFS: builds for the build architecture
2019-05-27 8:06 Fwd: Bug#929579: fio FTCBFS: builds for the build architecture Martin Steigerwald
@ 2019-05-27 15:23 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-05-27 15:23 UTC (permalink / raw)
To: Martin Steigerwald, fio; +Cc: Helmut Grohne
I'd be fine with that, if someone can submit a proper, separate patch
for it.
On 5/27/19 2:06 AM, Martin Steigerwald wrote:
> 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* <tel:+49%20911%2030999%200> •
> Fax: *+49 911 30999 99* <tel:>
>
> Südwestpark 43 •
> 90449 Nürnberg •
> Germany
>
> *Martin.Steigerwald@proact.de* <mailto:Martin.Steigerwald@proact.de> •
> *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>
>
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-27 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 8:06 Fwd: Bug#929579: fio FTCBFS: builds for the build architecture Martin Steigerwald
2019-05-27 15:23 ` Jens Axboe
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.