Trying to build newlib native on SUSE 10.1
Jeff Johnston
jjohnstn@redhat.com
Tue Nov 21 02:45:00 GMT 2006
Robert Mykland wrote:
> Eventually we will build newlib on our cross compiler, but for starters
> I just wanted to build newlib native on my SUSE 10.1 machine. The
> configures work fine -- at least they run with no errors reported.
> Building from the top level, I ran into the problem that I don't have
> makeinfo installed on my machine. Can I skip this part of the build? I
> also tried building just the libc directory from a separate directory
> like the FAQ says, but it gives me the following error:
>
You can't build from the libc directory and you have to configure from
the top-level. There are flags you need to have set and passed down
from the top-level. In your case, you aren't setting up the -I flags to
point to the build targ-include or source libc/include directories and
you are picking up system header files instead of the ones from newlib
(newlib header files include _ansi.h which has the definition of the
_DEFUN macro you are getting the error for).
Let's start from the beginning. Check out the current repository (which
will eventually become 1.15.0) or untar the newlib 1.14.0 package into
it's own source directory ($SOURCE_DIR). The source directory will have
newlib and libgloss as subdirectories. Create a separate directory to
do the build in ($BUILD_DIR). Try the following (note the --with-newlib
on the end of the configure)
> cd $BUILD_DIR
>$SOURCE_DIR/configure --prefix=`pwd` --target=i686-pc-linux-gnu
--with-newlib
>make all-target-newlib install-target-newlib
What happens?
-- Jeff J.
> /bin/sh ../libtool --mode=compile gcc -DPACKAGE=\"newlib\"
> -DVERSION=\"1.14.0\" -I.
> -I/home/mykland/work/newlib-1.14.0/newlib/libc/argz -O2 -Wall
> -D_I386MACH_ALLOW_HW_INTERRUPTS -DHAVE_FCNTL -fPIC
> -D_I386MACH_NEED_SOTYPE_FUNCTION -DMISSING_SYSCALL_NAMES
> -fno-builtin -g -O2 -c
> /home/mykland/work/newlib-1.14.0/newlib/libc/argz/argz_add.c
> gcc -DPACKAGE=\"newlib\" -DVERSION=\"1.14.0\" -I.
> -I/home/mykland/work/newlib-1.14.0/newlib/libc/argz -O2 -Wall
> -D_I386MACH_ALLOW_HW_INTERRUPTS -DHAVE_FCNTL -fPIC
> -D_I386MACH_NEED_SOTYPE_FUNCTION -DMISSING_SYSCALL_NAMES -fno-builtin -g
> -O2 -c /home/mykland/work/newlib-1.14.0/newlib/libc/argz/argz_add.c
> -fPIC -DPIC -o .libs/argz_add.o
> /home/mykland/work/newlib-1.14.0/newlib/libc/argz/argz_add.c:13: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before '_DEFUN'
> make[1]: *** [argz_add.lo] Error 1
> make[1]: Leaving directory `/home/mykland/work/libc/argz'
> make: *** [all-recursive] Error 1
>
> I get this error whether I'm trying to build in place or build in a
> separate directory as the FAQ suggests. SUSE 10.1 is using gcc version
> 4.1.0.
>
> Cheers,
>
> -- Robert.
>
More information about the Newlib
mailing list