uClibc toolchain without large file support build fails

Andrew Collins bsderandrew@gmail.com
Thu Mar 21 17:32:00 GMT 2013

I'm having an issue with crosstool-ng-1.18.0 that seems the same as
the one described here on buildroot:


Essentially, if you attempt to build a uClibc-based toolchain without
large file support on a 32-bit machine/vm with recent gcc, the build
fails in

[ALL  ]    In file included from
[ALL  ]                     from
[ALL  ]                     from
[ERROR]    /home/andrew/x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include/features.h:219:5:
error: #error It appears you have defined _FILE_OFFSET_BITS=64.
Unfortunately, uClibc was built without large file support enabled.

It looks like even though the file is meant for the target, crtstuff.c
needs to pull in "auto-host.h", which pulls in the _FILE_OFFSET_BITS
and causes the uClibc headers to error out.

For now, I've simply '#undef _FILE_OFFSET_BITS' after including
"auto-host.h", which seems to work, although I'm not sure how safe it

Any ideas what a proper fix might be?

For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list