[Clfs-support] CLFS Embedded has build error when build gcc on Ubuntu 19.04
DELUGE
deluge at 52loli.vip
Wed Oct 16 17:33:59 PDT 2019
Hi Andrew,
Thanks for you suggestions.
On step 4.7 (http://clfs.org/view/clfs-embedded/x86/cross-tools/gcc-static.html), I replaced GCC 6.2.0 by GCC 6.5.0,
And this time, step 4.7 passed, then step 4.8 (http://clfs.org/view/clfs-embedded/x86/cross-tools/libc.html) also passed,
But on step 4.9 (http://clfs.org/view/clfs-embedded/x86/cross-tools/gcc-final.html), the error below occurred, could you give me suggestion again? Thanks.
libtool: compile: /mnt/clfs/sources/gcc-build-2/./gcc/xgcc -B/mnt/clfs/sources/gcc-build-2/./gcc/ -B/mnt/clfs/cross-tools/i686-linux-musl/bin/ -B/mnt/clfs/cross-tools/i686-linux-musl/lib/ -isystem /mnt/clfs/cross-tools/i686-linux-musl/include -isystem /mnt/clfs/cross-tools/i686-linux-musl/sys-include -DHAVE_CONFIG_H -I. -I../../../../gcc-6.5.0/libmpx/mpxrt -I.. -I../../../../gcc-6.5.0/libmpx/.. -fPIC -g -O2 -c ../../../../gcc-6.5.0/libmpx/mpxrt/mpxrt.c -fPIC -DPIC -o .libs/libmpx_la-mpxrt.o
In file included from ../../../../gcc-6.5.0/libmpx/mpxrt/mpxrt.c:54:0:
../../../../gcc-6.5.0/libmpx/mpxrt/mpxrt.c: In function 'read_mpx_status_sig':
../../../../gcc-6.5.0/libmpx/mpxrt/mpxrt.h:52:42: error: invalid application of 'sizeof' to incomplete type 'struct _libc_fpstate'
#define XSAVE_OFFSET_IN_FPMEM sizeof (struct _libc_fpstate)
^
../../../../gcc-6.5.0/libmpx/mpxrt/mpxrt.c:132:58: note: in expansion of macro 'XSAVE_OFFSET_IN_FPMEM'
uint8_t *regs = (uint8_t *)uctxt->uc_mcontext.fpregs + XSAVE_OFFSET_IN_FPMEM;
^~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:387: libmpx_la-mpxrt.lo] Error 1
make[4]: Leaving directory '/mnt/clfs/sources/gcc-build-2/i686-linux-musl/libmpx/mpxrt'
make[3]: *** [Makefile:409: all-recursive] Error 1
make[3]: Leaving directory '/mnt/clfs/sources/gcc-build-2/i686-linux-musl/libmpx'
make[2]: *** [Makefile:300: all] Error 2
make[2]: Leaving directory '/mnt/clfs/sources/gcc-build-2/i686-linux-musl/libmpx'
make[1]: *** [Makefile:11448: all-target-libmpx] Error 2
make[1]: Leaving directory '/mnt/clfs/sources/gcc-build-2'
make: *** [Makefile:868: all] Error 2
在 2019/10/15 上午12:48,“Clfs-support 代表 Andrew Bradford”<clfs-support-bounces at lists.clfs.org 代表 bradfa at gmail.com> 写入:
Hi,
On Mon, Oct 14, 2019 at 11:27 AM DELUGE <deluge at 52loli.vip> wrote:
> When I build gcc 6.2 following http://clfs.org/view/clfs-embedded/x86/cross-tools/gcc-static.html on Ubuntu 19.04 using gcc 8.3,
> The error below occurred. Can anyone tell me how can I resolve this problem? Thanks.
>
> make[1]: Nothing to be done for 'all'.
> make[1]: Leaving directory '/mnt/clfs/sources/gcc-build/fixincludes'
> make[1]: Entering directory '/mnt/clfs/sources/gcc-build/gcc'
> g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-6.2.0/gcc -I../../gcc-6.2.0/gcc/. -I../../gcc-6.2.0/gcc/../include -I../../gcc-6.2.0/gcc/../libcpp/include -I/mnt/clfs/sources/gcc-build/./gmp -I/mnt/clfs/sources/gcc-6.2.0/gmp -I/mnt/clfs/sources/gcc-build/../gcc-6.2.0/mpfr/src -I/mnt/clfs/sources/gcc-6.2.0/mpc/src -I../../gcc-6.2.0/gcc/../libdecnumber -I../../gcc-6.2.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-6.2.0/gcc/../libbacktrace -o ubsan.o -MT ubsan.o -MMD -MP -MF ./.deps/ubsan.TPo ../../gcc-6.2.0/gcc/ubsan.c
> ../../gcc-6.2.0/gcc/ubsan.c: In function 'bool ubsan_use_new_style_p(location_t)':
> ../../gcc-6.2.0/gcc/ubsan.c:1472:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
> || xloc.file == '\0' || xloc.file[0] == '\xff'
> ^~~~
> make[1]: *** [Makefile:1085: ubsan.o] Error 1
> make[1]: Leaving directory '/mnt/clfs/sources/gcc-build/gcc'
> make: *** [Makefile:4121: all-gcc] Error 2
Newer versions of GCC have different default settings for what is
considered an error or a warning as compared to older versions of GCC.
I believe that GCC releases from version 7 onwards will hit this issue
when building GCC 6.3.
I believe that newer releases of GCC version 6 (like version 6.4 or
6.5) should fix this. You could try using a newer version of GCC 6.
Or you can have a try at applying this patch from OpenEmbedded:
https://patchwork.openembedded.org/patch/138884/
Sorry, I don't have a better or more detailed answer for you right now.
Thanks,
Andrew
_______________________________________________
Clfs-support mailing list
Clfs-support at lists.clfs.org
http://lists.clfs.org/listinfo.cgi/clfs-support-clfs.org
More information about the Clfs-support
mailing list