Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 373979

Summary: app-emulation/virtualbox-modules-4.0.10 does not compile if KBUILD_OUTPUT != KERNEL_DIR
Product: Gentoo Linux Reporter: gfl3162+gbugzilla
Component: New packagesAssignee: Patrick Lauer <patrick>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bkohler, devurandom, kernel-misc, polynomial-c, proxy-maint, swapon
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description gfl3162+gbugzilla 2011-07-04 03:25:49 UTC
The ebuild for virtualbox-modules tries to call "make M=... modules" in KERNEL_DIR (typically /usr/src/linux) instead of KBUILD_OUTPUT. As a result, "no .config" error message pops up and the compile aborts.


Reproducible: Always

Steps to Reproduce:
1. KBUILD_OUTPUT=/path/to/kernel/build/dir
2. emerge virtualbox-modules

Actual Results:  
 * Preparing vboxdrv module
make -j4 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= KERN_DIR=/usr/src/linux KERNOUT=/usr/src/linux-build all 
*** Building 'vboxdrv' module ***
make[1]: Entering directory `/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv'
make KBUILD_VERBOSE= SUBDIRS=/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv SRCROOT=/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv -C /usr/src/linux modules
make[2]: Entering directory `/usr/src/linux-2.6.39-gentoo-r2'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump /usr/src/linux-2.6.39-gentoo-r2/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/SUPDrv.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/SUPDrvSem.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/r0drv/alloc-r0drv.o
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/SUPDrv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/SUPDrvSem.o] Error 1
make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv/r0drv/alloc-r0drv.o] Error 1
make[2]: *** [_module_/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.39-gentoo-r2'
make[1]: *** [vboxdrv] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-emulation/virtualbox-modules-4.0.10/work/vboxdrv'
make: *** [all] Error 2
emake failed


Expected Results:  
normal compile and install

Changing KV_DIR to KV_OUT_DIR in the ebuild will solve the problem.
Comment 1 Dennis Schridde 2012-09-11 09:29:19 UTC
This appears to have been fixed in the meantime. I have app-emulation/virtualbox-modules-4.1.22 emerged, even though my KERNEL_DIR != my KBUILD_OUTPUT.
Comment 2 Ben Kohler gentoo-dev 2013-10-02 02:42:04 UTC

*** This bug has been marked as a duplicate of bug 285866 ***