Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Unable to compile C-programs containing header files #23

Open
akashgj opened this issue Jan 23, 2018 · 1 comment · May be fixed by #33
Open

Unable to compile C-programs containing header files #23

akashgj opened this issue Jan 23, 2018 · 1 comment · May be fixed by #33

Comments

@akashgj
Copy link

akashgj commented Jan 23, 2018

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
Copy link

sorear commented Jan 23, 2018

This looks like a dup of riscvarchive/riscv-gcc#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.)

heidecjj added a commit to heidecjj/riscv-poky that referenced this issue Oct 14, 2018
…er error when compiling simple programs such as a hello world program. Patch found here: riscvarchive/riscv-gcc#100 (comment).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants