riscv-software-src / riscv-tools

RISC-V Tools (ISA Simulator and Tests)
1.13k stars 446 forks source link

c compiler cannot create executable #307

Open kingstone1927 opened 4 years ago

kingstone1927 commented 4 years ago

Annotation 2020-06-10 104830

I installed my gcc-riscv64-unknown-elf through apt-get "install gcc-riscv64-unknown-elf" I tried update build-essential and many other pkgs, but it still spits out this error.

Does anyone have suggestion?

Thanks so much.

jim-wilson commented 4 years ago

Did you try compiling a hello world program with your riscv64 compiler to verify that it works?

Try looking at the actual error in the riscv-pk/build/config.log file. There should be some output there showing an attempt to use the riscv64 compiler to compile a small testcase which got an error. We need to know what that command was and what the error was.

kingstone1927 commented 4 years ago

Did you try compiling a hello world program with your riscv64 compiler to verify that it works?

Try looking at the actual error in the riscv-pk/build/config.log file. There should be some output there showing an attempt to use the riscv64 compiler to compile a small testcase which got an error. We need to know what that command was and what the error was.

sorry for getting back to you so late. I installed each submodule individually instead of using build.sh, and that resolved the problem. I don't know why when I use build.sh, I ran into all sorts of errors, but when installing each submodule individually, it compiled finely.

Thank you so much for your help.