Building kernel module using dkms, missing headers

amazon ec2dkmsheader-file

I would appreciate, if anybody can help me.

1) I am trying to build kernel module for Ubuntu sever using dkms.
Detailed manual is here.

2) When It is building module using this syntax:

sudo dkms build -m ixgbevf -v 2.15.3

it says, that some kernel headers are missing:

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....(bad exit status: 2)
cd src/; make BUILD_KERNEL=....(bad exit status: 2)
ERROR (dkms apport): binary package for ixgbevf: 2.15.3 not found
Error! Bad return status for module build on kernel: 3.13.0-36-generic (x86_64)
Consult /var/lib/dkms/ixgbevf/2.15.3/build/make.log for more information.

3) Log file: /var/lib/dkms/ixgbevf/2.15.3/build/make.log:

DKMS make.log for ixgbevf-2.15.3 for kernel 3.13.0-36-generic (x86_64)
Tue Dec 23 09:27:47 UTC 2014
Makefile:64: *** Kernel header files not in any of the expected locations.
Makefile:65: *** Install the appropriate kernel development package, e.g.
Makefile:66: *** kernel-devel, for building kernel modules and try again.  Stop.

4) I have headers here:

/usr/src/linux-headers-3.13.0-36
/usr/src/linux-headers-3.13.0-36-generic
/usr/include

And cpp -v shows:

#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include

If you need more information, I will provide you immediately.
Thanks.

— Added info —

1) dpkg -l | grep linux-headers shows:

ii  linux-headers-3.13.0-36          3.13.0-36.63                         all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-36-generic  3.13.0-36.63                         amd64        Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii  linux-headers-generic            3.13.0.36.43                         amd64        Generic Linux kernel headers
ii  linux-headers-virtual            3.13.0.36.43                         amd64        Transitional package.

2) Output info of dpkg -l | grep linux-image

ii  linux-image-3.13.0-36-generic    3.13.0-36.63                         amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-virtual              3.13.0.36.43                         amd64        This package will always depend on the latest minimal generic kernel image.

3) Output of uname -a

Linux ip-10-0-3-11 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

4) The link to sources of ixgbevf module is here.

Best Answer

There is a patch released for Ubuntu14.04 https://gist.github.com/cdgraff/1c31727901e5c76d5ea8

I can confirm it's working:

root@ip-172-31-119-53:~# modinfo ixgbevf
filename:       /lib/modules/3.13.0-45-generic/updates/dkms/ixgbevf.ko
version:        2.16.1
license:        GPL
description:    Intel(R) 10 Gigabit Virtual Function Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
srcversion:     3F8AACF779F38FD444B1CD3
alias:          pci:v00008086d00001515sv*sd*bc*sc*i*
alias:          pci:v00008086d000010EDsv*sd*bc*sc*i*
depends:        
vermagic:       3.13.0-45-generic SMP mod_unload modversions 
parm:           InterruptThrottleRate:Maximum interrupts per second, per    vector, (956-488281, 0=off, 1=dynamic), default 1 (array of int)
Related Question