Error Building Newlib for arm-none-eabi

R0b0t1 r030t1@gmail.com
Wed Feb 21 04:33:00 GMT 2018


On Tue, Feb 20, 2018 at 8:45 PM, R0b0t1 <r030t1@gmail.com> wrote:
> Sorry list, I'm not seeing replies in my mailbox. I recently read this
> on the web interface:
>
> ```
> Robot,
>
> Are you sure you have the PATH right, etc?
> I just did:
> /home/jaap/tst-newlib/gcc-arm-none-eabi-7-2017-q4-major/src/newlib/configure \
> --build=x86_64-linux-gnu \
> --host=x86_64-linux-gnu \
> --target=arm-none-eabi \
> --prefix=/home/jaap/tst-newlib/gcc-arm-none-eabi-7-2017-q4-major/build-native/target-libs
> \
> --disable-newlib-supplied-syscalls \
>         --enable-newlib-reent-small \
>         --disable-newlib-fvwrite-in-streamio \
>         --disable-newlib-fseek-optimization \
>         --disable-newlib-wide-orient \
>         --disable-newlib-unbuf-stream-opt \
>         --enable-newlib-global-atexit \
>         --enable-newlib-retargetable-locking \
>         --disable-nls
>
> make -j8
>
> The newlib version I used to test this is the version in git
> ea543d3ffa129dd4976aa19d47cf6c8f7ce09a11
> (with comment line fix declaration of fhandler_socket::socketpair)
> and it did compile without any error.
>
> Jaap de Wolff
> ```
>
> I tried HEAD at the time of writing and the commit you referenced.
> Both give me the same error in gets.c. PATH is set properly, if I do
> not set it properly the scripts can not find arm-none-eabi-cc. Is
> there anything else I should make sure is in the path?
>
> I used your options provided.
>
> Cheers,
>      R0b0t1

Extant in 2.5.0.20171222:

In file included from
/home/R0b0t1/devel/toolgen/source/newlib-2.5.0.20171222/newlib/libc/include/ssp/stdio.h:34:0,
                 from
/home/R0b0t1/devel/toolgen/source/newlib-2.5.0.20171222/newlib/libc/include/stdio.h:800,
                 from
../../../../../../../source/newlib-2.5.0.20171222/newlib/libc/stdio/gets.c:62:
../../../../../../../source/newlib-2.5.0.20171222/newlib/libc/stdio/gets.c:97:8:
error: expected declaration specifiers or '...' before
'__builtin_object_size'
 _DEFUN(gets, (buf),
        ^

This may be something to do with my environment, but it is hard to
know what. My system's GCC is 7.3, as is the code I am using to
compile the arm-none-eabi crosschain. These issues are mirrored in my
package manager (Portage) where newlib has been broken for some time.

Any help would be extremely helpful. This issue has existed for
multiple years, and is keeping newlib from compiling on Gentoo.

Thanks in advance,
     R0b0t1



More information about the Newlib mailing list