How to build a Linux newlib?

Jeff Johnston
Mon Jul 7 15:53:00 GMT 2008

Try updating and rebuilding.  I had some fixes that weren't checked in 
for just such a problem.  The linux build uses a combination of newlib 
and system headers and it is prone to breakage when glibc changes.  In 
this case, stddef.h was no longer being brought in automatically from a 
glibc header.

-- Jeff J.

Richard Pennington wrote:
> Hi,
> I'm trying to build a Linux version of newlib on my x86 fc8 system. I 
> grabbed the latest sources from cvs and configured with:
> ../../src/configure --with-newlib --prefix=/home/rich/local/
> The build fails with:
> libtool: compile:  gcc 
> -I/home/rich/newlib/obj/linux/i686-pc-linux-gnu/newlib/targ-include 
> -I/home/rich/newlib/src/newlib/libc/include -DPACKAGE_NAME=\"newlib\" 
> -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.16.0\" 
> "-DPACKAGE_STRING=\"newlib 1.16.0\"" -DPACKAGE_BUGREPORT=\"\" 
> -I../../../../../../src/newlib/libc/argz -O2 -Wall 
> -g -O2 -c ../../../../../../src/newlib/libc/argz/argz_count.c  -fPIC 
> -DPIC -o .libs/argz_count.o
> ../../../../../../src/newlib/libc/argz/argz_count.c:11: error: 
> expected '=', ',', ';', 'asm' or '__attribute__' before 'argz_count'
> make[5]: *** [argz_count.lo] Error 1
> It looks like size_t isn't getting defined. I'm I configuring newlib 
> incorrectly for a Linux hosted library?
> -Rich

More information about the Newlib mailing list