riscv-isa-sim
riscv-isa-sim copied to clipboard
spike cannot find pk
Spike cannot find pk.
spike pk hello
returns
terminate called after throwing an instance of 'std::runtime_error' what(): could not open pk (did you misspell it? If VCS, did you forget +permissive/+permissive-off?)
However,
spike $(which pk) hello
works
Install pk in the same place as gcc (your riscv-gnu-toolchain build).
Install pk in the same place as gcc (your riscv-gnu-toolchain build).
I tried installing pk at both the places "/opt/riscv/bin" and "/opt/riscv/riscv64-unknown-linux-gnu/bin". Both the paths has been added to PATH variable. Still, I'm facing this issue. Although, the above command 'spike $(which pk) hello' works for me.
Try /opt/riscv/riscv64-unknown-elf/bin (assuming you configured riscv-fesvr with --with-prefix=/opt/riscv)
On Sat, Mar 9, 2019 at 9:07 PM mukesh-cst [email protected] wrote:
Install pk in the same place as gcc (your riscv-gnu-toolchain build).
I tried installing pk at both the places "/opt/riscv/bin" and "/opt/riscv/riscv64-unknown-linux-gnu/bin". Both the paths has been added to PATH variable. Still, I'm facing this issue. Although, the above command 'spike $(which pk) hello' works for me.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-isa-sim/issues/268#issuecomment-471247787, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-7wsQuD1O5cW5XHjsiJ_03qbZHXl7Uks5vVJMUgaJpZM4Zl2SK .
@aswaterman Adding the --target=riscv64-unknown-linux-gnu while configuring the riscv-fesvr worked for me. I installed riscv toolchain while enabling multilib. So, it has installed the libraries under 'opt/riscv/riscv64-unknown-linux-gnu' directory and there is no '/opt/riscv/riscv64-unknown-elf' created for me. Thanks for the hint...
Ah - makes sense. Glad you figured it out.
I'm still unsure about the best solution to solve this issue...
- Installed the
riscv-gnu-toolchain
in/opt/riscv
- Added
/opt/riscv/bin
folder to myPATH
- Compiled Spike with
prefix=/opt/riscv/
pk
is installed in /opt/riscv/riscv64-unknown-elf
.
Even if /opt/riscv/riscv64-unknown-elf/bin
is in my PATH
, Spike still can't find pk
unless I specify the path (spike $(which pk) hello
)
Found the same issue as @pcotret while running spike.
@pcotret , @ptprasanna You need to rebuild all files after changing configure command. Make clean first. After i did that it worked for me. If you configure spike with --prefix=/opt/riscv , spike search files in /opt/riscv/riscv64-unknown-elf/bin/ .