diff mbox

Analysis of build failures

Message ID 536D274F.3030100@frajasalo.de
State Superseded
Headers show

Commit Message

Frank Bergmann May 9, 2014, 7:06 p.m. UTC
On 09.05.2014 15:34, Ezequiel Garcia wrote:
> On 07 May 09:31 AM, Thomas Petazzoni wrote:
>>>       nios2 |                  fio-fio-2.1.4 | NOK | http://autobuild.buildroot.net/results/9cd30031a40f768f6090cfba44c880fb2406672b/
>>
>> Ezequiel?
>>
>
> fio does a configure-time test to see if fallocate() is there, which passes
> successfully. Then BR builds fio passing LARGE_FILE flags which makes the
> toolchain try fallocate64(), which is not implemented.
>
> However, I'm not sure how to either make the configure-time fallocate test
> fail (so fio knows there's no fallocate), or prevent BR from passing the
> LARGE_FILE flags.
>
> Disable fio for nios2?

Or patch away the fallocate function in the configure script for nios2
like the patch in attachment do ?

With regards,
Frank Bergmann.
diff mbox

Patch

From cc514be257471b271c9d1c032279deb39bba68ce Mon Sep 17 00:00:00 2001
From: Frank Bergmann <frank@frajasalo.de>
Date: Fri, 9 May 2014 20:32:20 +0200
Subject: [PATCH 1/1] fio: fix missing fallocate64()

Current nios2 toolchain is missing the falloacte64() function call. The
configure script does not detect this correctly and the C library is
swapping fallocate with fallocate64 while compiling with the LARGEFILE*
flags.

The patch disables fallocate in the configure script.

Signed-off-by: Frank Bergmann <frank@frajasalo.de>
---
 ...io-0001-nios2-configure-disable-fallocate.patch |   18 ++++++++++++++++++
 package/fio/fio.mk                                 |    4 ++++
 2 files changed, 22 insertions(+)
 create mode 100644 board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch

diff --git a/board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch b/board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch
new file mode 100644
index 0000000..97b8b63
--- /dev/null
+++ b/board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch
@@ -0,0 +1,18 @@ 
+configure: Disable fallocate
+
+Signed-off-by: Frank Bergmann <frank@frajasalo.de>
+
+--- fio-fio-2.1.4.orig/configure	2013-11-16 19:15:12.000000000 +0100
++++ fio-fio-2.1.4/configure	2014-05-09 20:06:35.000000000 +0200
+@@ -578,7 +578,10 @@ int main(int argc, char **argv)
+ }
+ EOF
+ if compile_prog "" "" "linux_fallocate"; then
+-    linux_fallocate="yes"
++    # For nios2 disable fallocate because with LARGE_FILE flags it
++    # becomes fallocate64 which isn't available
++    #linux_fallocate="yes"
++    linux_fallocate="no"
+ fi
+ echo "Linux fallocate               $linux_fallocate"
+ 
diff --git a/package/fio/fio.mk b/package/fio/fio.mk
index f9a690e..311779b 100644
--- a/package/fio/fio.mk
+++ b/package/fio/fio.mk
@@ -9,6 +9,10 @@  FIO_SITE = git://git.kernel.dk/fio.git
 FIO_LICENSE = GPLv2 + special obligations
 FIO_LICENSE_FILES = LICENSE
 
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif
+
 define FIO_CONFIGURE_CMDS
 	(cd $(@D); ./configure --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)")
 endef
-- 
1.7.9.5