riscv-tests
riscv-tests copied to clipboard
error: invalid suffix "x" on integer constant
There is something wrong when I run make to build it Here is the detail, could someone tell me how to solve this problem? Thank you!
/Users/cp0/riscv-tests/isa/../env/v/vm.c: In function 'coherence_torture':
<command-line>: error: invalid suffix "x" on integer constant
/Users/cp0/riscv-tests/isa/../env/v/vm.c:197:25: note: in expansion of macro 'ENTROPY'
unsigned int random = ENTROPY;
/Users/cp0/riscv-tests/isa/../env/v/vm.c: In function 'vm_boot':
<command-line>: error: invalid suffix "x" on integer constant
/Users/cp0/riscv-tests/isa/../env/v/vm.c:212:25: note: in expansion of macro 'ENTROPY'
unsigned int random = ENTROPY;
make[1]: *** [rv32ui-v-simple] Error 1
make: *** [isa] Error 2
I have the same issue trying to build on Mac OS 10.14.5 :/ Can't immediately see why this is occurring
@amineejaam what OS are you on, just wondering
The culprit is this line: https://github.com/riscv/riscv-tests/blob/master/isa/Makefile#L61
It works fine on bash on Ubuntu. If you can figure out how to fix it for your platform without breaking it on this one, please make a PR.
@aswaterman I'm pretty busy at the moment, but thanks for pointing out the root cause. I'll see if I can get it working under Mac OS and then test it in a VM when I get a moment.
👍
I had this error just now (macOS 10.14), and thanks to this issue learned that the build is failing because macOS no longer has md5sum
installed by default.
brew install md5sha1sum
fixed my build on this platform. So maybe the fix is to check for it in autoconf (which is beyond me) and report this suggestion on macOS if it's not found.