1

I`m trying to compile a program, which was actually designed for Linux OS based on kernel 2.4.
When I run the make command, I get the following error

/lib/modules/3.8.0-29-generic/build/include/linux/modversions.h: No such file or directory

So I tried to locate the file modversions.h manually by running the command

sudo find / modversions.h

but I could not find any.

I tried the following

cd /usr/src/linux-headers-3.8.0-29/include/linux
make update-modverfile

but got the following error

make: *** No rule to make target `update-modverfile'.  Stop.

I also googled about this missing file and it looks to me like this is a common issue with many applications designed for older kernels, so what possibly I could do to fix this issue.

Please to provide your suggestions.

Other Informations

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

Ashiq Irphan
  • 153
  • 3
  • 3
  • 7
  • "sudo find / modversions.h" this is wrong me thinks. You need to tell find to also echo the result so it needs to be `sudo find / -name modversions.h -print` – Rinzwind Dec 11 '13 at 14:07

1 Answers1

1

According to Ubuntu's package search, the file you are looking for is part of the package linux-headers-3.8.0-29-generic. Its full path, according to that package's file list, is

/usr/src/linux-headers-3.8.0-29-generic/include/config/modversions.h
drc
  • 2,880
  • 13
  • 16
  • 1
    I wonder if the Makefile is looking in /lib/modules/3.8.0-29-generic/build/include/linux when it is actually, as drc points out, in /usr/src/linux-headers-3.8.0-29-generic/include/config. I suggest you check the Makefile for the program you are trying to compile. Perhaps there is a variable you can declare to specify where to look; i.e. in config and not linux. Or perhaps you can simply edit the Makefile. – chili555 Dec 11 '13 at 14:17
  • drc thanks for the reply, I`m relatively new to programming in Linux, Package Search is really helpful – Ashiq Irphan Dec 11 '13 at 16:58
  • I didn't have one until I installed the linux-headers package (using Raspbian). Now I see /usr/src/linux-headers-4.9.0-6-rpi2/include/config/modversions.h. But the error message says it's looking for a modversions.h in a linux dir, which I still don't have (by locate). I wonder if this is old, I'm trying to compile something from 2006, maybe it's all different now. – Alan Corey Oct 10 '20 at 17:46