Skip to contentSkip to conversation

kvm-userspace build break (linux/types.h)

DISCUSSION Hollis Blanchard 5 participants 7 messages Feb 19, 2009 – Feb 23, 2009 KVM

lore
Share & tools
lore
#0 lore raw

A recent kernel merge breaks kvm-userspace build:
make[1]: Entering directory `/root/hollisb/kvm-userspace.git/libkvm'
gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall -fno-stack-protector -I /root/hollisb/kvm-userspace.git/kernel/include -c -o libkvm.o libkvm.c
In file included from /usr/include/bits/fcntl.h:24,
from /usr/include/fcntl.h:34,
from libkvm.c:30:
/usr/include/sys/types.h:46: error: conflicting types for ‘loff_t’ /usr/include/linux/types.h:30: error: previous declaration of ‘loff_t’ was here /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’ /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here [...]

I built like so:
./configure
make -C kernel LINUX=/path/to/kvm.git sync make

The problem appears to be 00bfddaf7f68a6551319b536f052040c370756b0 and cef3767852a9b1a7ff4a8dfe0969e2d32eb728df, both from Jaswinder Singh Rajput <[email protected]>:

        -#include <asm/types.h>
        +#include <linux/types.h>

With these changes, libkvm.c ends up including /usr/include/linux/types.h, instead of the intended ../kernel/include/linux/types.h.

Avi, suggestions? More "make sync" hacks?

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#1 lore raw
Quoted 20 lines · Hollis Blanchard

A recent kernel merge breaks kvm-userspace build:
make[1]: Entering directory `/root/hollisb/kvm-userspace.git/libkvm'
gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall -fno-stack-protector -I /root/hollisb/kvm-userspace.git/kernel/include -c -o libkvm.o libkvm.c
In file included from /usr/include/bits/fcntl.h:24,
from /usr/include/fcntl.h:34,
from libkvm.c:30:
/usr/include/sys/types.h:46: error: conflicting types for ‘loff_t’ /usr/include/linux/types.h:30: error: previous declaration of ‘loff_t’ was here /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’ /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here [...]

I built like so:
./configure
make -C kernel LINUX=/path/to/kvm.git sync make

The problem appears to be 00bfddaf7f68a6551319b536f052040c370756b0 and cef3767852a9b1a7ff4a8dfe0969e2d32eb728df, both from Jaswinder Singh Rajput <[email protected]>:

Quoted 6 lines
        -#include <asm/types.h>
        +#include <linux/types.h>

With these changes, libkvm.c ends up including /usr/include/linux/types.h, instead of the intended ../kernel/include/linux/types.h.

I had the same problem some weeks ago. IIRC I fixed it with some include reordering in libkvm.h.

Joerg

#2 lore raw

For x86 and ia64, linux/types.h will be hacked to asm/types.h when syncing the source. You may consult kernel/x86/hack-module.awk to get the answer.
Xiantao

Quoted 37 lines · Joerg Roedel
Quoted 25 lines · Hollis Blanchard

A recent kernel merge breaks kvm-userspace build:
make[1]: Entering directory `/root/hollisb/kvm-userspace.git/libkvm' gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer
-Wall -fno-stack-protector -I

/root/hollisb/kvm-userspace.git/kernel/include -c -o
libkvm.o libkvm.c In file included from /usr/include/bits/fcntl.h:24, from /usr/include/fcntl.h:34, from libkvm.c:30: /usr/include/sys/types.h:46: error:
conflicting types for 'loff_t' /usr/include/linux/types.h:30: error:
previous declaration of 'loff_t' was here /usr/include/sys/types.h:62: error: conflicting types for 'dev_t' /usr/include/linux/types.h:13: error: previous declaration of
'dev_t' was here [...]

I built like so:
./configure
make -C kernel LINUX=/path/to/kvm.git sync make

The problem appears to be 00bfddaf7f68a6551319b536f052040c370756b0 and
cef3767852a9b1a7ff4a8dfe0969e2d32eb728df, both from Jaswinder Singh Rajput <[email protected]>:

Quoted 6 lines
        -#include <asm/types.h>
        +#include <linux/types.h>

With these changes, libkvm.c ends up including /usr/include/linux/types.h, instead of the intended ../kernel/include/linux/types.h.

I had the same problem some weeks ago. IIRC I fixed it with some include reordering in libkvm.h.

Joerg

#3 lore raw
In reply to Hollis Blanchard
Quoted 20 lines · Hollis Blanchard

A recent kernel merge breaks kvm-userspace build:
make[1]: Entering directory `/root/hollisb/kvm-userspace.git/libkvm'
gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall -fno-stack-protector -I /root/hollisb/kvm-userspace.git/kernel/include -c -o libkvm.o libkvm.c
In file included from /usr/include/bits/fcntl.h:24,
from /usr/include/fcntl.h:34,
from libkvm.c:30:
/usr/include/sys/types.h:46: error: conflicting types for ‘loff_t’ /usr/include/linux/types.h:30: error: previous declaration of ‘loff_t’ was here /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’ /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here [...]

I built like so:
./configure
make -C kernel LINUX=/path/to/kvm.git sync make

The problem appears to be 00bfddaf7f68a6551319b536f052040c370756b0 and cef3767852a9b1a7ff4a8dfe0969e2d32eb728df, both from Jaswinder Singh Rajput <[email protected]>:

Quoted 9 lines
        -#include <asm/types.h>
        +#include <linux/types.h>

With these changes, libkvm.c ends up including /usr/include/linux/types.h, instead of the intended ../kernel/include/linux/types.h.

Avi, suggestions? More "make sync" hacks?

Avi, Is this already fixed, Or it is in your Magic Box (patch queue ;-)

Hollis: Do you mind testing -tip tree, may be we already fixed your problem, Ingo is having big Magic Box :)
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=summary

Thanks,
--
JSR

#4 lore raw
Quoted 24 lines · Jaswinder Singh Rajput
Quoted 23 lines · Hollis Blanchard

A recent kernel merge breaks kvm-userspace build:
make[1]: Entering directory `/root/hollisb/kvm-userspace.git/libkvm'
gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall -fno-stack-protector -I /root/hollisb/kvm-userspace.git/kernel/include -c -o libkvm.o libkvm.c
In file included from /usr/include/bits/fcntl.h:24,
from /usr/include/fcntl.h:34,
from libkvm.c:30:
/usr/include/sys/types.h:46: error: conflicting types for ‘loff_t’ /usr/include/linux/types.h:30: error: previous declaration of ‘loff_t’ was here /usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’ /usr/include/linux/types.h:13: error: previous declaration of ‘dev_t’ was here [...]

I built like so:
./configure
make -C kernel LINUX=/path/to/kvm.git sync make

The problem appears to be 00bfddaf7f68a6551319b536f052040c370756b0 and cef3767852a9b1a7ff4a8dfe0969e2d32eb728df, both from Jaswinder Singh Rajput <[email protected]>:

        -#include <asm/types.h>
        +#include <linux/types.h>
Quoted 8 lines
Quoted 6 lines

With these changes, libkvm.c ends up including /usr/include/linux/types.h, instead of the intended ../kernel/include/linux/types.h.

Avi, suggestions? More "make sync" hacks?

Avi, Is this already fixed, Or it is in your Magic Box (patch queue ;-)

Sorry, my fault... it is already fixed in the master branch of Avi's tree.

Quoted 3 lines

Hollis: Do you mind testing -tip tree, may be we already fixed your problem, Ingo is having big Magic Box :)
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=summary

Avi, would you pull kvm-userspace 05acb1ae99a8b55c9745f2e566010213cf52a819 into maint/2.6.29 branch please?

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#5 lore raw
Quoted 4 lines · Hollis Blanchard

Avi, would you pull kvm-userspace 05acb1ae99a8b55c9745f2e566010213cf52a819 into maint/2.6.29 branch please?

Also needed in maint/2.6.29:

commit 3f7cba35281a5b2dba008179a4979d737105574d

Author: Avi Kivity <[email protected]>
Date:   Thu Jan 22 15:16:18 2009 +0200

kvm: external module: compatibility for hrtimer_expires_remaining()

commit 034e9938f4336f69d643a23ae4b18fa0e6524c9b

Author: Avi Kivity <[email protected]>
Date:   Wed Feb 4 19:21:07 2009 +0200

kvm: external module: hrtimer_expires_remaining was introduced in 2.6.28

Noted by Alexander Graf.

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center
#6 lore raw
Quoted 18 lines · Hollis Blanchard
Quoted 4 lines · Hollis Blanchard

Avi, would you pull kvm-userspace 05acb1ae99a8b55c9745f2e566010213cf52a819 into maint/2.6.29 branch please?

Also needed in maint/2.6.29:

commit 3f7cba35281a5b2dba008179a4979d737105574d

Author: Avi Kivity <[email protected]>
Date:   Thu Jan 22 15:16:18 2009 +0200

kvm: external module: compatibility for hrtimer_expires_remaining()

commit 034e9938f4336f69d643a23ae4b18fa0e6524c9b

Quoted 10 lines
Author: Avi Kivity <[email protected]>
Date:   Wed Feb 4 19:21:07 2009 +0200

kvm: external module: hrtimer_expires_remaining was introduced in 2.6.28

Noted by Alexander Graf.

Picked all three, thanks.

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