another kvm-70 compile bug with rhel/centos 5.2
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:
---------------------------------------------------
make KDIR=/usr/src/kernels/2.6.18-92.1.1.el5-x86_64
make -C /usr/src/kernels/2.6.18-92.1.1.el5-x86_64 M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -Iinclude -I`pwd`/include-compat \ -include include/linux/autoconf.h \ -include `pwd`/external-module-compat.h"
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.1.1.el5-x86_64'
LD /home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/built-in.o
CC [M] /home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/svm.o
In file included from <command line>:2:/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/external-module-compat.h:351:
error: redefinition of typedef 'bool' include/linux/types.h:36: error: previous declaration of 'bool' was here make[2]: *** [/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/svm.o] Error 1 make[1]: *** [_module_/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.1.1.el5-x86_64'
make: *** [all] Error 2
---------------------------------------------------
yours.
Signature · 1 line
Levente "Si vis pacem para bellum!"
anyone like to fix it?
Quoted 26 lines · Farkas Levente
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:
---------------------------------------------------
make KDIR=/usr/src/kernels/2.6.18-92.1.1.el5-x86_64make -C /usr/src/kernels/2.6.18-92.1.1.el5-x86_64 M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -Iinclude -I`pwd`/include-compat \ -include include/linux/autoconf.h \ -include `pwd`/external-module-compat.h"make[1]: Entering directory `/usr/src/kernels/2.6.18-92.1.1.el5-x86_64'
LD/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/built-in.o
CC [M]/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/svm.o
In file included from <command line>:2:/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/external-module-compat.h:351:error: redefinition of typedef 'bool'
include/linux/types.h:36: error: previous declaration of 'bool' was here make[2]: *** [/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel/svm.o] Error 1 make[1]: *** [_module_/home/robot/rpm/BUILD/kvm-kmod-70/_kmod_build_/kernel] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.1.1.el5-x86_64'
make: *** [all] Error 2
---------------------------------------------------
yours.
Signature · 1 line
Levente "Si vis pacem para bellum!"
Quoted 1 line · Farkas Levente
anyone like to fix it?
Don't worry, we'll get it fixed.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 5 lines · Farkas Levente
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:error: redefinition of typedef 'bool'
Please try the attached patch, and let me know if it helps.
Signature · 1 line
error compiling committee.c: too many arguments to function
kernel/external-module-compat.h +4 -0
@@ -349,10 +349,14 @@ uint64_t div64_u64(uint64_t dividend, uint64_t divisor);#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,19 ) +#if !defined(RHEL_RELEASE_VERSION ) || (RHEL_RELEASE_VERSION <RHEL_RELEASE_CODE (5 ,2 )) +typedef _Bool bool ;#endif +#endif +/* * PF_VCPU is a Linux 2.6.24 addition */
Quoted 8 lines · Avi Kivity
Quoted 5 lines · Farkas Levente
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:error: redefinition of typedef 'bool'
Please try the attached patch, and let me know if it helps.
not working on centos-5.2:
-----------------------------------------
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.1.6.el5-x86_64'
LD /home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel/built-in.o
CC [M] /home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel/svm.o
In file included from <command line>:1:/home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel/external-module-compat.h:350:40: warning: "RHEL_RELEASE_VERSION" is not defined /home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel/external-module-compat.h:350:80: error: missing binary operator before token "(" make[2]: *** [/home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel/svm.o] Error 1
make[1]: *** [_module_/home/robot/rpm/BUILD/kvm-kmod-69/_kmod_build_/kernel] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.1.6.el5-x86_64'
make: *** [all] Error 2
-----------------------------------------
Signature · 1 line
Levente "Si vis pacem para bellum!"
Quoted 9 lines · Avi Kivity
Quoted 5 lines · Farkas Levente
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:error: redefinition of typedef 'bool'
Please try the attached patch, and let me know if it helps.
FYI:/lib/modules/2.6.18-92.1.6.el5/build/include/linux/version.h:
-------------------------------
#define LINUX_VERSION_CODE 132626
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define RHEL_MAJOR 5
#define RHEL_MINOR 2
#define RHEL_RELEASE_CODE 1282
#define RHEL_RELEASE_VERSION(a,b) (((a) << 8) + (b))
-------------------------------
Signature · 1 line
Levente "Si vis pacem para bellum!"
Quoted 11 lines · Farkas Levente
Quoted 9 lines · Avi Kivity
Quoted 5 lines · Farkas Levente
hi,
i'm just try to recompile kvm-70 with the latest centos-5.2 (aka rhel-5.2) kernel, but i've got a new compile error:error: redefinition of typedef 'bool'
Please try the attached patch, and let me know if it helps.
Quoted 11 lines
FYI:
/lib/modules/2.6.18-92.1.6.el5/build/include/linux/version.h:
-------------------------------
#defineLINUX_VERSION_CODE132626
#defineKERNEL_VERSION(a,b,c)(((a) << 16) + ((b) << 8) + (c)) #defineRHEL_MAJOR5
#defineRHEL_MINOR2
#defineRHEL_RELEASE_CODE1282
#defineRHEL_RELEASE_VERSION(a,b)(((a) << 8) + (b))
-------------------------------
Ah, swapped _CODE and _VERSION. Updated patch attached.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
kernel/external-module-compat.h +4 -0
@@ -349,10 +349,14 @@ uint64_t div64_u64(uint64_t dividend, uint64_t divisor);#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,19 ) +#if !defined(RHEL_RELEASE_CODE ) || (RHEL_RELEASE_CODE <RHEL_RELEASE_VERSION (5 ,2 )) +typedef _Bool bool ;#endif +#endif +/* * PF_VCPU is a Linux 2.6.24 addition */
Thanks Avi for the rhel-5.2.patch. I was able to successfully apply it to kvm-70. In addition I found myself having to make one more small modification for RHEL 5.2
I found myself also having to modify the kernel/external-module-compat.h at line 670 (as per emails from Andrea Arcangeli on June 18th)
and change
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) && defined(CONFIG_KALLSYMS)
to
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) && defined(CONFIG_KALLSYMS)
So now I can successfully build KVM-70 on RHEL 5.2 for the AMD-V, and load the modules in the kernel (2.6.18-92.1.6.el5
[root@eowyn ~]# lsmod | grep kvm
[root@eowyn ~]# modprobe kvm
[root@eowyn ~]# modprobe kvm_amd
[root@eowyn ~]# lsmod | grep kvmkvm_amd 62888 0
kvm 178416 1 kvm_amd
[root@eowyn ~]#
The only thing that I seem to be halting my progression right now is that I cannot find the qemu-kvm helper program. It doesn't seem like it was compiled and installed. Yet I find now qemu-system-x86_64 instead.
[root@eowyn ~]# which qemu-kvm/usr/bin/which: no qemu-kvm in (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@eowyn ~]# which qemu-nbd/usr/local/bin/qemu-nbd
[root@eowyn ~]# ll /usr/local/bin/qem*
-rwxr-xr-x 1 root root 128616 Jul 1 02:54 /usr/local/bin/qemu-img -rwxr-xr-x 1 root root 130808 Jul 1 02:54 /usr/local/bin/qemu-nbd -rwxr-xr-x 1 root root 6740783 Jul 1
02:54 /usr/local/bin/qemu-system-x86_64
I'm able to start a virtual machine with qemu-system-x86_64. Should I stop looking for a qemu-kvm ?
Thanks for any pointers.
Erik Bussink
Quoted 7 lines · Erik Bussink
Thanks Avi for the rhel-5.2.patch. I was able to successfully apply it to kvm-70. In addition I found myself having to make one more small modification for RHEL 5.2
I found myself also having to modify the
kernel/external-module-compat.hat line 670 (as per emails from Andrea Arcangeli on June 18th)
Quoted 9 lines
and change #if
LINUX_VERSION_CODE<KERNEL_VERSION(2,6,19)&&defined(CONFIG_KALLSYMS)to
#if
LINUX_VERSION_CODE<KERNEL_VERSION(2,6,17)&&defined(CONFIG_KALLSYMS)
That's already in kvm-userspace.git.
Quoted 17 lines
The only thing that I seem to be halting my progression right now is that I cannot find the qemu-kvm helper program. It doesn't seem like it was compiled and installed. Yet I find now qemu-system-x86_64 instead.
[root@eowyn ~]# which qemu-kvm
/usr/bin/which: no qemu-kvm in (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)[root@eowyn ~]# which qemu-nbd
/usr/local/bin/qemu-nbd[root@eowyn ~]# ll
/usr/local/bin/qem*(quoted diff) +0
-3-rwxr-xr-x 1 root root 128616 Jul 1 02:54 /usr/local/bin/qemu-img -rwxr-xr-x 1 root root 130808 Jul 1 02:54 /usr/local/bin/qemu-nbd -rwxr-xr-x 1 root root 6740783 Jul 102:54
/usr/local/bin/qemu-system-x86_64
Quoted 4 lines
I'm able to start a virtual machine with qemu-system-x86_64. Should I stop looking for a qemu-kvm ?
qemu-kvm is Fedora's name for qemu-system-x86_64. It was renamed so you could run plain qemu and kvm side by side.
Signature · 1 line
error compiling committee.c: too many arguments to function