Avi Kivity wrote:
Ben Bucksch wrote:
configure accepts the kernel source dir as input param, or
automatically finds /lib/modules/2.6.27-rc5/build/ or similar. But the
build only uses the dir to copy the latest kvm*.h into the local dir.
The directory is not passed to gcc via -I . This results in a
"linux/ioctl.h not found" and resulting errors, if /usr/include/linux/
does not exist. If I pass the kernel source explicitly, then please
use it.

   1. Please pass gcc -I<kernel source dir in configure>/include/

What are you doing exactly?  I've never had such issues.

Well, I'd assume so, otherwise they'd be fixed I hope :).

What I did:

  1. Extract Linus kernel source in /usr/src/, resulting in
     /usr/src/linux-2.6.26/
  2. Build kernel (in source dir)
  3. Install kernel to /boot/ and /lib/modules/ via make install; make
     modules_install etc.
  4. Extract kvm git
  5. KVM source dir: ./configure --with-patched-kernel --disable-sdl
     --disable-gfx-check ; make
  6. Get lots of errors due to Version mismatch of kvm.h in kernel and
     libkvm.c in KVM, which actually turned out to be bogus (other bug,
     see other mail)
  7. rm -rf /usr/include/linux/
  8. KVM source dir: ./configure --with-patched-kernel --disable-sdl
     --disable-gfx-check --kerneldir=/usr/src/linux-2.6.26/ ; make
  9. Above error

Reason is, as said, that the build assumes that /usr/include/linux/ioctl.h exists, i.e. it just #include <linux/ioctl.h> , but does not pass the kernel dir *that I explicitly passed to configure* to gcc. If I explicitly pass the kernel dir to configure, I expect that to be used, and only that.

So, just pass gcc -I<kernel source dir passed to configure>/include/


iggy on IRC noted that kernel source and build dir may be separate. That's true - you probably need two configure flags --kernel-source-dir and --kernel-build-dir. The existing --kerneldir could stay and set both to the same value.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to