[Buildroot] Analysis of build failures

Frank Bergmann bergmann at rosho.de
Fri Feb 21 09:46:16 UTC 2014


Hello,

On 21.02.2014 10:08, Thomas Petazzoni wrote:
> Hello all,
>
> On Fri, 21 Feb 2014 08:30:08 +0100 (CET), Thomas Petazzoni wrote:
>
>>       nios2 |               e2fsprogs-1.42.9 | NOK | http://autobuild.buildroot.net/results/480d1337de3467520d629fa8bdee57436337ce05/
>
> Fixed by
> http://lists.busybox.net/pipermail/buildroot/2014-February/089981.html
> and
> http://lists.busybox.net/pipermail/buildroot/2014-February/089982.html,
> but I must say I don't necessarily understand the problem.

A short C-program test.c:



#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

#include <fcntl.h>

int main(int argc, char **argv) {
   return fallocate(0, 0, 0, 0);
}



That makes no sense but compiles without errors:

$> nios2-linux-gnu-gcc test.c
$> ls
a.out  test.c

But when I provide _FILE_OFFSET_BITS=64 the library uses fallocate64 
instead of fallocate:

$> nios2-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 test.c
/tmp/ccQbizFP.o: In function `main':
test.c:(.text+0x30): undefined reference to `fallocate64'
collect2: error: ld returned 1 exit status


Regards,
Frank.



More information about the buildroot mailing list