* another kvm-70 compile bug with rhel/centos 5.2
@ 2008-06-25 20:43 Farkas Levente
2008-06-27 13:03 ` Farkas Levente
2008-06-29 15:47 ` Avi Kivity
0 siblings, 2 replies; 9+ messages in thread
From: Farkas Levente @ 2008-06-25 20:43 UTC (permalink / raw)
To: kvm
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.
--
Levente "Si vis pacem para bellum!"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-25 20:43 another kvm-70 compile bug with rhel/centos 5.2 Farkas Levente
@ 2008-06-27 13:03 ` Farkas Levente
2008-06-29 9:11 ` Avi Kivity
2008-06-29 15:47 ` Avi Kivity
1 sibling, 1 reply; 9+ messages in thread
From: Farkas Levente @ 2008-06-27 13:03 UTC (permalink / raw)
To: kvm
anyone like to fix it?
Farkas Levente wrote:
> 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.
>
--
Levente "Si vis pacem para bellum!"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-27 13:03 ` Farkas Levente
@ 2008-06-29 9:11 ` Avi Kivity
0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-06-29 9:11 UTC (permalink / raw)
To: Farkas Levente; +Cc: kvm
Farkas Levente wrote:
> anyone like to fix it?
Don't worry, we'll get it fixed.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-25 20:43 another kvm-70 compile bug with rhel/centos 5.2 Farkas Levente
2008-06-27 13:03 ` Farkas Levente
@ 2008-06-29 15:47 ` Avi Kivity
2008-06-29 17:22 ` Farkas Levente
2008-06-29 17:24 ` Farkas Levente
1 sibling, 2 replies; 9+ messages in thread
From: Avi Kivity @ 2008-06-29 15:47 UTC (permalink / raw)
To: Farkas Levente; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
Farkas Levente wrote:
> 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.
--
error compiling committee.c: too many arguments to function
[-- Attachment #2: rhel-5.2.patch --]
[-- Type: text/plain, Size: 497 bytes --]
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index c28d759..1ad515f 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -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
*/
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-29 15:47 ` Avi Kivity
@ 2008-06-29 17:22 ` Farkas Levente
2008-06-29 17:24 ` Farkas Levente
1 sibling, 0 replies; 9+ messages in thread
From: Farkas Levente @ 2008-06-29 17:22 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> Farkas Levente wrote:
>> 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
-----------------------------------------
--
Levente "Si vis pacem para bellum!"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-29 15:47 ` Avi Kivity
2008-06-29 17:22 ` Farkas Levente
@ 2008-06-29 17:24 ` Farkas Levente
2008-06-29 17:50 ` Avi Kivity
1 sibling, 1 reply; 9+ messages in thread
From: Farkas Levente @ 2008-06-29 17:24 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Avi Kivity wrote:
> Farkas Levente wrote:
>> 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))
-------------------------------
--
Levente "Si vis pacem para bellum!"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-29 17:24 ` Farkas Levente
@ 2008-06-29 17:50 ` Avi Kivity
2008-07-01 1:13 ` Erik Bussink
0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2008-06-29 17:50 UTC (permalink / raw)
To: Farkas Levente; +Cc: kvm
[-- Attachment #1: Type: text/plain, Size: 840 bytes --]
Farkas Levente wrote:
> Avi Kivity wrote:
>> Farkas Levente wrote:
>>> 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))
> -------------------------------
>
Ah, swapped _CODE and _VERSION. Updated patch attached.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
[-- Attachment #2: rhel-5.2.patch --]
[-- Type: text/x-patch, Size: 494 bytes --]
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index c28d759..1ad515f 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -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
*/
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-06-29 17:50 ` Avi Kivity
@ 2008-07-01 1:13 ` Erik Bussink
2008-07-01 7:11 ` Avi Kivity
0 siblings, 1 reply; 9+ messages in thread
From: Erik Bussink @ 2008-07-01 1:13 UTC (permalink / raw)
To: Avi Kivity; +Cc: Farkas Levente, kvm
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 kvm
kvm_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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: another kvm-70 compile bug with rhel/centos 5.2
2008-07-01 1:13 ` Erik Bussink
@ 2008-07-01 7:11 ` Avi Kivity
0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2008-07-01 7:11 UTC (permalink / raw)
To: mailinglist; +Cc: Farkas Levente, kvm
Erik Bussink wrote:
> 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)
>
>
That's already in kvm-userspace.git.
> 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 ?
>
>
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.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-07-01 7:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 20:43 another kvm-70 compile bug with rhel/centos 5.2 Farkas Levente
2008-06-27 13:03 ` Farkas Levente
2008-06-29 9:11 ` Avi Kivity
2008-06-29 15:47 ` Avi Kivity
2008-06-29 17:22 ` Farkas Levente
2008-06-29 17:24 ` Farkas Levente
2008-06-29 17:50 ` Avi Kivity
2008-07-01 1:13 ` Erik Bussink
2008-07-01 7:11 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox