I just got the source from github and built pk with 32bit option and ran spike with following command:
$ spike --isa=RV32 pk hello
I got the following error:
terminate called after throwing an instance of 'std::runtime_error' what(): could not open pk
I used riscv32-unknown-elf-gcc to compile pk for the 32b RISC-V target processor as follows:
$ ../configure --prefix=$RISCV/riscv32-unknown-elf --host=riscv32-unknown-elf
The old spike program which I got from the first RISCV workshop(last January) works ok.
The error message suggests that spike can't find the pk. Try and provide an absolute path to the pk you compiled.
Spike assumes the pk is in a particular path relative to it. It's probably looking in ($RISCV/riscv64-unknown-elf/bin/pk).