Skip to contentSkip to conversation

compiling with icc: kvm.h(240): error

PATCH Antoine Martin 2 participants 2 messages Oct 23, 2008 – Nov 9, 2008 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

I am testing kernel builds with Intel's ICC and got a failure on KVM (not that the rest was very smooth either...) Just in case someone is interested, here it is (this kernel tree is loosely based on linux-next + other patches):

CC [M] arch/x86/kvm/svm.o - due to: include/linux/bounds.h
icc -Wp,-MD,arch/x86/kvm/.svm.o.d -nostdinc -isystem icc -I/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude -I/usr/src/fastboot.git/arch/x86/include -include include/linux/autoconf.h -Wall -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -freg-struct-return -mtune=generic -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -Ivirt/kvm -Iarch/x86/kvm -DMODULE -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(svm) -DKBUILD_MODNAME=KBUILD_STR(kvm_amd) -c -o arch/x86/kvm/.tmp_svm.o arch/x86/kvm/svm.c
icc: command line warning #10156: ignoring option '-W'; no argument required include/linux/kvm.h(240): error: "padding" has already been declared in the current scope

              __u64 padding;
                    ^

arch/x86/kvm/mmu.h(54): remark #869: parameter "vcpu" was never referenced static inline int is_long_mode(struct kvm_vcpu *vcpu)
(...)

Patch following the same approach used in this file:

include/linux/kvm.h 2008-10-23 17:58:15.000000000 +0100 renamed from include/linux/kvm.h 2008-10-17 16:29:41.000000000 +0100 +0 -0
@@ -234,10 +234,10 @@

/* for KVM_GET_DIRTY_LOG */

struct kvm_dirty_log {
       __u32 slot;

- __u32 padding;
+ __u32 padding1;
union {
void __user *dirty_bitmap; /* one bit per page */
- __u64 padding;

+               __u64 padding2;
       };
};

Cheers
Antoine

#1 lore raw
Quoted 18 lines · Antoine Martin

Hi,

I am testing kernel builds with Intel's ICC and got a failure on KVM (not that the rest was very smooth either...) Just in case someone is interested, here it is (this kernel tree is loosely based on linux-next + other patches):

CC [M] arch/x86/kvm/svm.o - due to: include/linux/bounds.h icc -Wp,-MD,arch/x86/kvm/.svm.o.d -nostdinc -isystem icc

(quoted diff) +0 -2
-I/usr/lib/gcc/i486-pc-linux-gnu/4.3.2/include -D__KERNEL__ -Iinclude 
-I/usr/src/fastboot.git/arch/x86/include -include 

include/linux/autoconf.h -Wall -fno-strict-aliasing -fno-common

(quoted diff) +0 -6
-Werror-implicit-function-declaration -Os -m32   -freg-struct-return  
-mtune=generic  -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 
-pipe   -Iinclude/asm-x86/mach-default   -fno-omit-frame-pointer   
-Ivirt/kvm -Iarch/x86/kvm -DMODULE -DKBUILD_STR(s)=#s 
-DKBUILD_BASENAME=KBUILD_STR(svm) -DKBUILD_MODNAME=KBUILD_STR(kvm_amd) 
-c -o arch/x86/kvm/.tmp_svm.o arch/x86/kvm/svm.c

icc: command line warning #10156: ignoring option '-W'; no argument required include/linux/kvm.h(240): error: "padding" has already been declared in the current scope

Quoted 3 lines
              __u64 padding;
                    ^

Please resend with a changelog entry and signoff.

Signature · 1 line
error compiling committee.c: too many arguments to function