4

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.

18
  • Please give the output of dpkg -l | grep linux-header and dpkg -l | grep linux-image. In the question, not in a comment. Also, module-assistant (m-a) is an alternative you could try. It has an interactive curses interface. Dec 24 '14 at 8:01
  • Done, Please, take a look. Dec 24 '14 at 8:32
  • Also add the output of uname -a. Are you running a stock kernel (i.e. one built and shipped by your distribution). I'd suggest giving m-a a try as well. Dec 24 '14 at 8:46
  • Do you mean to try m-a instead of dkms? I guess, it is stock kernel, Ubuntu 14.04, from Amazon Marketplace. I added uname, version is 3.13.0-36 Dec 24 '14 at 9:21
  • Yes, m-a. I don't see anything obviously wrong with what you are doing, but I always use m-a, which is a bit more manual. Give it a try and post the results in your question if it fails too. To start with just type m-a and use the interactive menu. Dec 24 '14 at 9:56
3

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)
0
3

So, Finally, I have managed to install driver ixgbevf v. 2.15.3 for kernel version 3.13.0-43.

But, there are some important points:

  1. First of all, I tried to use make to build it manually and got the same result:

    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.
    
  2. Secondly, I ran apt-get upgrade and apt-get dist-upgrade to update kernel from 3.13.0-36 to 3.13.0-43, and reboot machine after, to update kernel. Details are here. It installed kernel headers for 3.13.0-43 as well.

  3. Thirdly, I had to change dkms.conf configuration file, like here:

    MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
    CLEAN="make -C src/ clean"
    BUILT_MODULE_NAME=ixgbevf
    BUILT_MODULE_LOCATION=src/
    DEST_MODULE_LOCATION="/updates"
    PACKAGE_NAME=ixgbevf-dkms
    PACKAGE_VERSION=2.15.3
    REMAKE_INITRD=no
    

After that, It was able to build driver. If you have the same problem and need help, feel free to contact me. @Faheem Mitha, Thanks a lot for your helping.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.