# [solved] virtualbox 4.2.18 fails to build modules

## Schnulli

#

* ERROR: app-emulation/virtualbox-modules-4.2.18::gentoo failed (compile phase):

 *   emake failed

#

used to be lazy building a genkernel... the reason? as i saw lots are missing in genkernel for iptables (again)

anyone?

cheers

Solution:

solved !

USE="-pax_kernel" emerge virtualbox

and it work pretty fineLast edited by Schnulli on Fri Sep 20, 2013 1:36 pm; edited 1 time in total

----------

## fturco

You should post more lines for the error message as it is impossible to understand why emerge failed from the generic error message you reported. About 50 lines would be good, I think.

----------

## Schnulli

sorry.......

```
[32;01m * [39;49;00mPackage:    app-emulation/virtualbox-modules-4.2.18

[32;01m * [39;49;00mRepository: gentoo

[32;01m * [39;49;00mMaintainer: polynomial-c@gentoo.org patrick@gentoo.org

[32;01m * [39;49;00mUSE:        amd64 elibc_glibc kernel_linux pax_kernel userland_GNU

[32;01m * [39;49;00mFEATURES:   preserve-libs sandbox userpriv usersandbox

 [32;01m*[0m Determining the location of the kernel source code

 [32;01m*[0m Found kernel source directory:

 [32;01m*[0m     /usr/src/linux

 [32;01m*[0m Found kernel object directory:

 [32;01m*[0m     /lib/modules/3.10.7-gentoo/build

 [32;01m*[0m Found sources for kernel version:

 [32;01m*[0m     3.10.7-gentoo

>>> Unpacking source...

>>> Unpacking vbox-kernel-module-src-4.2.18.tar.xz to /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work

>>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work

>>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work ...

 [32;01m*[0m Applying virtualbox-modules-4.1.4-pax-const.patch ...

[A[203C [34;01m[ [32;01mok[34;01m ][0m

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work ...

ln: failed to create symbolic link 'Module.symvers': File exists

 [32;01m*[0m Preparing vboxdrv module

make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KERN_DIR=/usr/src/linux KERNOUT=/lib/modules/3.10.7-gentoo/build all 

*** Building 'vboxdrv' module ***

make[1]: Entering directory `/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv'

make KBUILD_VERBOSE= SUBDIRS=/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv SRCROOT=/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv CONFIG_MODULE_SIG= -C /usr/src/linux modules

make[2]: Entering directory `/usr/src/linux-3.10.7-gentoo'

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/linux/SUPDrv-linux.o

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.o

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvTracer.o

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/r0drv/alloc-r0drv.o

  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvSem.o

In file included from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvInternal.h:148:0,

                 from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.c:32:

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvIDC.h:163:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'Out'In file included from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvInternal.h:148:0,

                 from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvSem.c:32:

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvIDC.h:163:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'Out'

In file included from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvInternal.h:148:0,

                 from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvTracer.c:33:

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvIDC.h:163:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'Out'

make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvSem.o] Error 1

make[3]: *** Waiting for unfinished jobs....

make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrvTracer.o] Error 1

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.c: In function 'supdrvIDC_LdrGetSymbol':

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.c:4486:24: error: 'union <anonymous>' has no member named 'Out'

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.c:4517:28: error: 'union <anonymous>' has no member named 'Out'

make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/SUPDrv.o] Error 1

In file included from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/linux/../SUPDrvInternal.h:148:0,

                 from /var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/linux/SUPDrv-linux.c:31:

/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/linux/../SUPDrvIDC.h:163:22: error: expected ':', ',', ';', '}' or '__attribute__' before 'Out'

make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv/linux/SUPDrv-linux.o] Error 1

make[2]: *** [_module_/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv] Error 2

make[2]: Leaving directory `/usr/src/linux-3.10.7-gentoo'

make[1]: *** [vboxdrv] Error 2

make[1]: Leaving directory `/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work/vboxdrv'

make: *** [all] Error 2

 [31;01m*[0m ERROR: app-emulation/virtualbox-modules-4.2.18::gentoo failed (compile phase):

 [31;01m*[0m   emake failed

 [31;01m*[0m 

 [31;01m*[0m If you need support, post the output of `emerge --info '=app-emulation/virtualbox-modules-4.2.18::gentoo'`,

 [31;01m*[0m the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-modules-4.2.18::gentoo'`.

 [31;01m*[0m The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/temp/build.log'.

 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/temp/environment'.

 [31;01m*[0m Working directory: '/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work'

 [31;01m*[0m S: '/var/tmp/portage/app-emulation/virtualbox-modules-4.2.18/work'
```

----------

## fturco

It seems similar to https://forums.gentoo.org/viewtopic-t-962968-start-0.html.

EDIT: fixed linkLast edited by fturco on Fri Sep 20, 2013 2:47 pm; edited 1 time in total

----------

## Schnulli

hi, link dosnt work, sorry, yet solved?

----------

## Schnulli

solved !

USE="-pax_kernel" emerge virtualbox

and it work pretty fine

regards

----------

## BitJam

 *Schnulli wrote:*   

> solved !
> 
> USE="-pax_kernel" emerge virtualbox
> 
> and it work pretty fine

 

You should update /etc/portage/package.use or your next "emerge -uDN world' will revert the change.

----------

## Schnulli

Hi BitJam,

thx.... but as you know using Gentoo means be creative in mind, thats why i love Gentoo soooo much, never be booring   :Laughing:   :Laughing:   :Laughing: 

But its strange to un-use a pax kernel during build to get it working, by the way, i tested using this use flag as well: USE="-pae_kernel" emerge virtualbox and oh-ah... works as well .....

regards  :Wink: 

----------

