riscv-software-src / riscv-tools

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

build failure due to previously defined environment variables #364

Closed alpkoyun closed 1 year ago

alpkoyun commented 1 year ago

Hello I opened this issue to share the solution to my a failure in which I found no answer on the net,

When I tried to build the riscv-tools I got multiple errors while trying different techniques some of them where "C compiler cannot create executables See `config.log' for more details" "checking whether the C compiler works... no" config.log usually failed at:"configure: failed program was: | / confdefs.h /"

The problem was that I used to have a riscv-unkown-elf-gcc compiler and I had some flags as environment variables to be used in the risc-v compiler. This installation probably uses same of the flags which was the cause of my error. I removed the environment variables and the problem was solved.