Closed MusLead closed 1 year ago
Also having an issue with the 'zifencei' required for a M1 Pro MacBook.
I meet the same problem. Have you solved it?
So, I hope they find solution for this. The biggest problem is because this RISC-V is not designed for ARM64 architecture. Therfore we need to do something.
The steps is also from ChatGPT generated.
I assume you have installed arch x86-64 and Rosetta x64 on you mac M1. The follow this instruction bellow:
This is for those who are trying to install RISC-V on Mac with ARM-Based Processor. You should be aware that RISC-V cannot be install just with brew install riscv-tools it will return some error, becuase this RISC-V is designed for x86_64 architecture. therefore, there must be some some additional command.
''' arch --x86_64 /usr/local/bin/brew tap riscv/riscv arch --x86_64 /usr/local/bin/brew install riscv-gnu-toolchain '''
This command actually works for me to install and to compile later on using make qemu. I hope this solution can also help you guys, for those who are using Mac with processor M1/M2. If there are some suggestion for me, please let me know. Probably there is another alternative solution that better than mine.
I meet the same problem. Have you solved it?
I created the pull request above, because it fixes the issue (both the compilation error, and the resulting binary - pk - works fine) under ARM64 (Apple Silicon) by modifying the compiler options accordingly ("zifencei" explicitly enabled)
I meet the same problem. Have you solved it?
I created the pull request above, because it fixes the issue (both the compilation error, and the resulting binary - pk - works fine) under ARM64 (Apple Silicon) by modifying the compiler options accordingly ("zifencei" explicitly enabled)
how can I use your version? Does the two command 'brew tape gmerlino/homebrew-riscv' and 'brew install riskv-tools' work fine?
Can someone confirm this is still an issue? riscv-pk reverted the commit that caused this issue: https://github.com/riscv-software-src/riscv-pk/commit/acbe166dac9d1db752ee95f61e65ca82bb875afb
It still doesn't work for me, I get the same error on a M1 MacBook Pro
...
../machine/flush_icache.c: Assembler messages:
../machine/flush_icache.c:4: Error: unrecognized opcode `fence.i', extension `zifencei' required
make: *** [flush_icache.o] Error 1
make: *** Waiting for unfinished jobs....
../machine/mentry.S: Assembler messages:
../machine/mentry.S:93: Error: unrecognized opcode `fence.i', extension `zifencei' required
make: *** [mentry.o] Error 1
gmerlino's solution works fine with me. I use the commands 'brew tape gmerlino/homebrew-riscv' and 'brew install riskv-tools' instead of the official. I thought this issue could be closed.
gmerlino's solution works fine with me. I use the commands 'brew tape gmerlino/homebrew-riscv' and 'brew install riskv-tools' instead of the official. I thought this issue could be closed.
Same for me. I'm using a MacBook Pro 16 (M1 Pro) with macOS Ventura 13.4.
After merging #101 should ok (for now)
I have seen some of you who solve this problem with removing directory
riscv-gnu-toolchain--git
in Cache #73 But it does not work well. I still get a problem like this. I would love to see a solution from you guys