Because of my bug hunting approach of using latest kernel I experienced problem with compiling VirtualBox modules with 3.17.0-rc5 version on my Debian Jessie. Issue is well known and described for examples here. Problem manifest itself with:

during virtualbox-dkms package installation or reconfiguration. In make.log you will find compilation error:

For sure we have to wait for some time before new version of kernel and VirtualBox will catch up each other in Debian.

Fix source code of Debian package

Let’s get get virtualbox package source, fix issues rebuild package and install in the system. Patch to apply can be found here.

Now we can patch the sources with:

Assuming you save above code in my_patch file and you are in virtualbox dpkg source directory:

Install packages required to build:

And build with:

In result we should get all virtualbox packages. We need only dkms:

And we can happily use VirtualBox with 3.17.0-rc5 kernel.