riscv-software-src / riscv-tools

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

Error configuring riscv-isa-sim in build.sh #339

Open Z-KN opened 3 years ago

Z-KN commented 3 years ago

When I am running build.sh and configuring riscv-isa-sim, it reports: riscv-isa-sim

Configuring project riscv-isa-sim configure: error: Spike requires a little-endian host

However, after running command "lscpu", it tells me my virtual machine's byte order is Little Endian. How can I fix this error?

jim-wilson commented 3 years ago

I would suggest checking riscv-isa-sim/build/config.log and then search for the string "checking whether byte ordering is bigendian". The configure script does a number of checks for target features to try to determine whether the target is little or big endian. There are mac specific checks, and linux specific checks. Configure tries the tests in series, ignoring ones that fail to compile, until it finds one that compile and runs, and that gives the answer. So one of these tests must have given a wrong result for you. Try and figure out why you got the wrong result for that test. You can find the source for these tests in riscv-isa-sim/configure.