Reproduction sequence for fcntl64 bug.
Gaye Abdoulaye Walsimou
walsimou at walsimou.com
Mon Apr 19 06:11:36 UTC 2010
Rob Landley wrote:
> On Sunday 18 April 2010 02:08:30 Rob Landley wrote:
>
>> It's CONFIG_LFS. If that's enabled, busybox builds with these flags:
>>
>> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
>>
>> In the previous release, they were a NOP on 64 bit platforms. Now they
>> make fcntl into a nonexistent reference to fcntl64 and break the build.
>>
>> Rob
>>
>
> Simple standalone reproduction for the fcntl64 bug. Create a "hello.c"
> containing:
>
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> printf("%d\n", fcntl(0, F_GETFL));
> return 0;
> }
>
> Then build it normally to make sure it works:
>
> $ x86_64-cc hello.c --static
> $ ./a.out
> 32770
>
> Then build it with -D_FILE_OFFSET_BITS=64:
>
> $ x86_64-cc hello.c --static -D_FILE_OFFSET_BITS=64
> /tmp/ccQNby1P.o: In function `main':
> hello.c:(.text+0x1f): undefined reference to `fcntl64'
> collect2: ld returned 1 exit status
>
> Rob
>
Hello Rob,
Yes I confirm and many packages in which fcntl is used are affected
(busybox, libxml2, etc.)
More information about the uClibc
mailing list