# make CHK include/linux/version.h CHK include/linux/utsrelease.h CC arch/ia64/kernel/asm-offsets.s In file included from include/linux/irq.h:185:0, from include/asm/hardirq.h:11, from include/linux/hardirq.h:7, from include/linux/interrupt.h:11, from include/asm-ia64/mca.h:16, from arch/ia64/kernel/asm-offsets.c:15: include/asm/hw_irq.h:142:1: error: conflicting types for '__irq_to_vector' include/linux/irq.h:179:12: note: previous declaration of '__irq_to_vector' was here make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1 make: *** [prepare0] Error 2 The declaration conflicts with the definition: --- include/linux/irq.h extern int __irq_to_vector(int irq); #define irq_to_vector(irq) __irq_to_vector(irq) #include <asm/hw_irq.h> --- include/asm/hw_irq.h static inline ia64_vector irq_to_vector (int irq) Reproducible: Always
.config? Also if it's different from upstream provided then this is unsupported configuration (take a look at einfo at the end).
I downloaded [1] from [2], ran make mrproper, installed the config file as .config, ran make oldconfig and the issue still appeared upon make prepare: scripts/kconfig/conf -s arch/ia64/Kconfig CHK include/linux/version.h UPD include/linux/version.h CHK include/linux/utsrelease.h UPD include/linux/utsrelease.h SYMLINK include/asm -> include/asm-ia64 CC arch/ia64/kernel/asm-offsets.s In file included from include/linux/irq.h:185:0, from include/asm/hardirq.h:11, from include/linux/hardirq.h:7, from include/linux/interrupt.h:11, from include/asm-ia64/mca.h:16, from arch/ia64/kernel/asm-offsets.c:15: include/asm/hw_irq.h:142:1: error: conflicting types for '__irq_to_vector' include/linux/irq.h:179:12: note: previous declaration of '__irq_to_vector' was here make[1]: *** [arch/ia64/kernel/asm-offsets.s] Error 1 make: *** [prepare0] Error 2 The reason for that is the declaration of __irq_to_vector conflicting with the definition, as laid out in comment #0. A function cannot be both extern and static at the same time. [1] http://download.openvz.org/kernel/branches/rhel5-2.6.18/028stab099.3/configs/kernel-2.6.18-ia64.config.ovz [2] http://wiki.openvz.org/Download/kernel/rhel5/028stab099.3
The issue appears not too simple to fix to me: # grep -R __irq_to_vector . ./arch/x86_64/kernel/io_apic.c:int __irq_to_vector(int irq) ./arch/x86_64/kernel/io_apic.c:EXPORT_SYMBOL(__irq_to_vector); ./include/linux/irq.h:extern int __irq_to_vector(int irq); ./include/linux/irq.h:#define irq_to_vector(irq) __irq_to_vector(irq) Apparently x86_64 needs this to be an extern function. However, ia64 wants it to be inline - it is defined in ./include/asm-ia64/hw_irq.h as: static inline ia64_vector irq_to_vector (int irq) { return (ia64_vector) irq; } Of course both cannot be done with the same function signature. My idea would be to make irq_to_vector static inline and wrap __irq_to_vector into it on x86_64: --- ./include/linux/irq.h.orig 2012-06-11 12:59:22.000000000 +0200 +++ ./include/linux/irq.h 2012-06-11 13:00:56.000000000 +0200 @@ -176,8 +176,12 @@ #define no_irq_type no_irq_chip typedef struct irq_desc irq_desc_t; +#ifdef CONFIG_X86_64 extern int __irq_to_vector(int irq); -#define irq_to_vector(irq) __irq_to_vector(irq) +static inline int irq_to_vector(int irq) { + return __irq_to_vector(irq); +} +#endif /* * Pick up the arch-dependent methods: --- I have not tested this on x86_64, but it makes ia64 pass the make prepare step. The next pitfall is just waiting one step ahead, though: arch/ia64/mm/init.c: In function 'ia64_init_addr_space': arch/ia64/mm/init.c:171:25: error: 'vm_area_cachep' undeclared (first use in this function) arch/ia64/mm/init.c:171:25: note: each undeclared identifier is reported only once for each function it appears in II suggest to drop ~ia64 from KEYWORDS for the moment, until this is all sorted out.
please test latest 2.18 series kernel
2.6.18.028.101.1 still fails with same error. Maybe we should drop ia64 keywords for these versions for now?
(In reply to comment #5) > 2.6.18.028.101.1 still fails with same error. Maybe we should drop ia64 > keywords for these versions for now? Fine with me, since I will switch to LXC.
due http://bugzilla.openvz.org/show_bug.cgi?id=2484#c2 please drop keyword ia64 and closed as wontfix
+ 11 Jan 2013; Sergey Popov <pinkbyte@gentoo.org> + openvz-sources-2.6.18.028.099.3.ebuild, + openvz-sources-2.6.18.028.101.1.ebuild: + Drop ~ia64 keyword due to build failures. Upstream does not support it + anymore, bug #411161