From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Bruin Subject: Re: kvm-userspace compile problem Date: Sat, 14 Feb 2009 22:42:44 +0100 Message-ID: <49973AD4.5040505@xs4all.nl> References: <49949CA6.5020007@xs4all.nl> <5d6222a80902121454j73fb484bnd2b7a94dc6c6e68b@mail.gmail.com> <4995D5C9.3020806@xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from smtp-vbr17.xs4all.nl ([194.109.24.37]:3822 "EHLO smtp-vbr17.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbZBNVmG (ORCPT ); Sat, 14 Feb 2009 16:42:06 -0500 Received: from [10.10.0.3] (ipix.xs4all.nl [82.95.117.198]) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id n1ELg3fQ061986 for ; Sat, 14 Feb 2009 22:42:04 +0100 (CET) (envelope-from bruinjm@xs4all.nl) In-Reply-To: <4995D5C9.3020806@xs4all.nl> Sender: kvm-owner@vger.kernel.org List-ID: Hans de Bruin wrote: > Glauber Costa wrote: >>> e$ ./configure --prefix=/usr --with-patched-kernel >>> Install prefix /usr >>> BIOS directory /usr/share/qemu >>> binary directory /usr/bin >>> Manual directory /usr/share/man >>> ELF interp prefix /usr/gnemul/qemu-%M >>> Source path /home/hns/kvm-userspace/qemu >>> C compiler gcc >>> Host C compiler gcc >>> ARCH_CFLAGS -m64 >>> make make >>> install install >>> host CPU x86_64 >>> host big endian no >>> target list x86_64-softmmu >>> gprof enabled no >>> sparse enabled no >>> profiler no >>> static build no >>> -Werror enabled no >>> SDL support yes >>> SDL static link no >>> curses support yes >>> mingw32 support no >>> Audio drivers oss >>> Extra audio cards ac97 es1370 sb16 >>> Mixer emulation no >>> VNC TLS support yes >>> TLS CFLAGS >>> TLS LIBS -lgnutls >>> kqemu support no >>> kvm support no - (#error Missing KVM capability >>> KVM_CAP_DESTROY_MEMORY_REGION_WORKS) >> >> try passing --kerneldir= > > That did not help, but after I changed this: > > ~/kvm-userspace$ diff configure.old configure > 95,96c95,96 > < #set kenel directory > < libkvm_kerneldir=$(readlink -f kernel) > --- > > #set kernel directory > > libkvm_kerneldir=$(readlink -f $kerneldir) > > the error was gone. configure used kvm.h in /usr/include/linux/ (distro > suplied 2.6.27 headers) instead of the git version. > > My troubles aren't totaly gone however: > > make -C libkvm > make[1]: Entering directory `/home/hns/kvm-userspace/libkvm' > gcc -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall > -fno-stack-protector - > I /usr/src/linux-2.6/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/src/linux-2.6/include/linux/types.h:57: error: previous declaration > of 'loff_t' was here > /usr/include/sys/types.h:62: error: conflicting types for 'dev_t' > /usr/src/linux-2.6/include/linux/types.h:19: error: previous declaration > of 'dev_t' was here > In file included from /usr/include/sys/types.h:133, > from /usr/include/bits/fcntl.h:24, > from /usr/include/fcntl.h:34, > from libkvm.c:30: > /usr/include/time.h:105: error: conflicting types for 'timer_t' > /usr/src/linux-2.6/include/linux/types.h:28: error: previous declaration > of 'timer_t' was here > 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:198: error: conflicting types for 'int64_t' > /usr/src/linux-2.6/include/linux/types.h:125: error: previous > declaration of 'int64_t' was here > /usr/include/sys/types.h:204: error: conflicting types for 'u_int64_t' > /usr/src/linux-2.6/include/linux/types.h:124: error: previous > declaration of 'u_int64_t' was here > In file included from /usr/include/sys/types.h:220, > from /usr/include/bits/fcntl.h:24, > from /usr/include/fcntl.h:34, > from libkvm.c:30: > /usr/include/sys/select.h:78: error: conflicting types for 'fd_set' > /usr/src/linux-2.6/include/linux/types.h:18: error: previous declaration > of 'fd_set' was here > 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:235: error: conflicting types for 'blkcnt_t' > /usr/src/linux-2.6/include/linux/types.h:146: error: previous > declaration of 'blkcnt_t' was here > In file included from /usr/include/inttypes.h:28, > from libkvm.c:37: > /usr/include/stdint.h:56: error: conflicting types for 'uint64_t' > /usr/src/linux-2.6/include/linux/types.h:123: error: previous > declaration of 'uint64_t' was here > make[1]: *** [libkvm.o] Error 1 > make[1]: Leaving directory `/home/hns/kvm-userspace/libkvm' > make: *** [libkvm] Error 2 I copied all the kvm kernel headers from 29-rc4 to /usr/include/linux, git-reset kvm-userspace (undone my .configure changes) and the build completed successfully. -- Hans