riscvarchive / riscv-poky

Port of the Yocto Project to the RISC-V ISA
http://www.riscv.org
62 stars 46 forks source link

Unable to compile C-programs containing header files #23

Open akashgj opened 6 years ago

akashgj commented 6 years ago

I followed procedures described in readme.md and I am able to boot riscv-linux using spike. While compiling C-program containing header files like stdio.h it is showing some error like

root@riscv64:~# riscv64-poky-linux-gcc hello.c riscv64-poky-linux-gcc hello.c In file included from /usr/include/bits/types.h:130:0, from /usr/include/stdio.h:35, from hello.c:1: /usr/include/bits/types.h:143:12: internal compiler error: in grokdeclarator, at c/c-decl.c:6769 __STD_TYPE FSID_T_TYPE fsid_t; / Type of file system IDs. / ^ Please submit a full bug report, with preprocessed source if appropriate. See https://gcc.gnu.org/bugs/ for instructions.

If header files are omitted, the program is compiled with some warnings. How to resolve this problem?

sorear commented 6 years ago

This looks like a dup of https://github.com/riscv/riscv-gcc/issues/100 . You might check if updating gcc to the tip of the 7.2 branch or later fixes it. (If so, poky should be updated.)