Is it impossible to build kvmtool
pashaniaosi opened this issue · 4 comments
hello, when I follow the Step5("KVM RISCV64 on QEMU") to build kvmtool, there are something wrong:
Makefile:363: Skipping optional libraries: bfd zlib aio
CC builtin-balloon.static.o
In file included from include/linux/rbtree.h:32,
from include/kvm/devices.h:4,
from include/kvm/pci.h:10,
from include/kvm/vfio.h:6,
from include/kvm/kvm-config.h:5,
from include/kvm/kvm.h:6,
from builtin-balloon.c:9:
include/linux/kernel.h:5:10: fatal error: asm/kernel.h: No such file or directory
5 | #include "asm/kernel.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:477: builtin-balloon.static.o] Error 1
so, I list all the files in riscv/include/asm
:
kvm.h
the file kernel.h
is not found in the directory(riscv/include/asm
), but it can be found in other directories(mips/include/asm, x86/include/asm
). So, I doubt the git repository of kvmtool lost the header file kernel.h of riscv.
I try to fix the error by deleting this line (#include "asm/kernel.h"
). It really works, but whether would affect the result of make
?
Please export "ARCH=riscv" and "CROSS_COMPILE" environment variable before building.
Please export "ARCH=riscv" and "CROSS_COMPILE" environment variable before building.
I have done this before building. According to the error message, it lost a header file "kernel.h" in the directory (riscv/include/asm
) and I can't find this file in the kvmtool repository.
KVMTOOL only includes UAPI headers exported from the kernel.
Regards,
Anup
The newest commit had fixed this issue.
The official repository had added missing asm/kernel.h
header.