From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60429 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWPxR-0001hg-2r for qemu-devel@nongnu.org; Wed, 07 Jul 2010 04:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWPxO-0008GH-So for qemu-devel@nongnu.org; Wed, 07 Jul 2010 04:26:16 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:55270) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWPxO-0008Fq-7X for qemu-devel@nongnu.org; Wed, 07 Jul 2010 04:26:14 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp06.in.ibm.com (8.14.4/8.13.1) with ESMTP id o678Q851023074 for ; Wed, 7 Jul 2010 13:56:08 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o678Q8fM3453170 for ; Wed, 7 Jul 2010 13:56:08 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o678Q7p6021960 for ; Wed, 7 Jul 2010 18:26:08 +1000 Message-ID: <4C343A1F.4010703@linux.vnet.ibm.com> Date: Wed, 07 Jul 2010 13:56:07 +0530 From: Prerna Saxena MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Makefile: Fix compilation for non-standard host kernel path References: <4C2DCA61.2080501@linux.vnet.ibm.com> <4C3386A3.6090605@codemonkey.ws> In-Reply-To: <4C3386A3.6090605@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: blauwirbel@gmail.com, Maneesh Soni , Ananth , qemu-devel@nongnu.org On 07/07/2010 01:10 AM, Anthony Liguori wrote: > On 07/02/2010 06:15 AM, Prerna Saxena wrote: >> Set up host kernel include paths specified by --kerneldir >> >> When host kernel headers are placed in non-standard paths, the >> KVM_CFLAGS are presently invoked only for a few .c files >> (kvm*.c,vhost*.c) and not for other files like machine.c, cpus.c >> ..etc which also depend on linux/kvm.h > > I think that's a bug. What's the dependency of machine.c and cpus.c? > Both machine.d and cpus.d depend on qemu/kvm.h, which in turn needs linux/kvm.h I am running a custom-compiled kernel for which the headers are placed separately. I pass the kernel source directory to my configure script as follows : [usr@zephyr ~]$ configure --prefix=/home/bloat/qemu-git/qemu-bin --enable-kvm --target-list=i386-softmmu,x86_64-softmmu --enable-profiler --disable-docs --kerneldir=/home/bloat/kernels/linux-2.6.35-rc3 [usr@zephyr ~]$ make -j2 This is one of the errors I get : (similar ones are flagged for machine.o and cpus.o) CC i386-softmmu/arch_init.o In file included from /home/bloat/qemu-git/qemu/arch_init.c:38: /home/bloat/qemu-git/qemu/kvm.h:22:23: error: linux/kvm.h: No such file or directory make[1]: *** [arch_init.o] Error 1 This is because the location of kernel headers is not passed as a '-I' switch to gcc. IMO adding the KVM_CFLAGS to QEMU_CFLAGS would be required for such cases. Regards, -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India