riscv-isa-sim icon indicating copy to clipboard operation
riscv-isa-sim copied to clipboard

spike cannot find pk

Open mahsoommoosa42 opened this issue 6 years ago • 8 comments

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

mahsoommoosa42 avatar Jan 01 '19 10:01 mahsoommoosa42

Install pk in the same place as gcc (your riscv-gnu-toolchain build).

ilia-diachkov avatar Mar 07 '19 19:03 ilia-diachkov

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.

mukesh-cst avatar Mar 10 '19 05:03 mukesh-cst

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 avatar Mar 10 '19 05:03 aswaterman

@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...

mukesh-cst avatar Mar 14 '19 03:03 mukesh-cst

Ah - makes sense. Glad you figured it out.

aswaterman avatar Mar 14 '19 04:03 aswaterman

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 my PATH
  • 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)

pcotret avatar Jul 15 '20 09:07 pcotret

Found the same issue as @pcotret while running spike.

ptprasanna avatar Feb 04 '22 08:02 ptprasanna

@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/ .

sansarselim avatar Feb 15 '22 10:02 sansarselim