I have been trying to compile a very old program actual meant for Kernel

I previously had an issue Missing Modversions.h which is solved now, but there is another issue.

In file included from /lib/modules/3.8.0-29-generic/build/include/linux/types.h:5:0,
             from /lib/modules/3.8.0-29-generic/build/include/linux/list.h:4,
             from /lib/modules/3.8.0-29-generic/build/include/linux/module.h:9,
             from kaodv-mod.c:30:
/lib/modules/3.8.0-29-generic/build/include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
compilation terminated.
make[1]: *** [kaodv-mod.o] Error 1
make[1]: Leaving directory `/home/vm1/aodv-12-12-13/lnx'
make: *** [kaodv] Error 2 

The file /lib/modules/3.8.0-29-generic/build/include/uapi/linux/types.h is a linux header file, I don`t understand how such an error could occur.

Other Informations

OS: Ubuntu 12.04
Kernel Version: 3.8.0-29
Program I`m trying to compile:[AODV-UU][2]

Please help me fix it.

2 Answers 2


This file has been moved. In your Kernel it will be at include/uapi/asm-generic/types.h


  • Update the reference in types.h but I'm not sure if it is possible.


  • Compile this program against it's supported Kernel version, if you have that info.
  • 1
    I did find asm-generic/types.h but is it okay to edit the kernel header file /lib/modules/3.8.0-29-generic/build/include/uapi/linux/types.h ? Dec 13, 2013 at 17:23
  • How can I update it? I am not sur to understan
    – Emixam23
    Nov 17, 2017 at 22:16
  • Add path to gcc include with key -I. Foe example -I/usr/src/linux-headers-4.18.0-17-generic/include/uapi
    – Ru5
    Apr 7, 2019 at 19:19

Set your ARCH environment variable in terminal to x86: export ARCH=x86


add the line export ARCH=x86 to the Makefile

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