# [Solved][huh?]not compiled with -mcmodel=kernel

## Rexilion

Recently I 'updated' both of my Gentoo boxes. Just when I thought that everything went smooth, this pops up:

FATAL: Error inserting vboxdrv (/lib/modules/2.6.39-hardened-r8/misc/vboxdrv.ko): Invalid module format

Checking dmesg for a more descriptive error:

[   17.121778] overflow in relocation type 11 val ffffc9001203710c

[   17.121784] `vboxdrv' likely not compiled with -mcmodel=kernel

For some reason the kernel won't eat the modules I compiled for it.

I tried several of the below combinations:

- Simple recompilation

- virtualbox-modules (version):

-   4.0.12

-   4.1.4

-   4.1.6

- Gcc:

-   x86_64-pc-linux-gnu-4.4.5(-vanilla)

-   x86_64-pc-linux-gnu-4.5.3(-vanilla)

The combination:

- virtualbox-modules-4.0.12

- gcc-4.4.5

- hardened-sources-2.6.39-r8

Used to work. Something broke it, and I just can't find it/evade it. Please help.

This is really urgent for me, my father has some old crippled piece of accounting software (!) that modifies critical Windows XP system files   :Twisted Evil:   for no apparent reason. Virtualbox was my way out, worked wonders. He could access it remotely through my IPSEC wherever he was. It just worked.Last edited by Rexilion on Sat Apr 07, 2012 9:49 pm; edited 1 time in total

----------

## bjlockie

Try app-emulation/virtualbox-bin

or get the source from virtualbox.org

----------

## Rexilion

Looking at the ebuild, I only see patches for the configuration stage. But I will give it a try when I have time, thanks.

----------

## Rexilion

Finally found the culprit, I needed:

CONFIG_MODULE_UNLOAD=y

in order to make the module load. huh?

----------

