[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: installed kernel source but still no modversions.h!

On  0, Alex Hunsley <lard@tardis.ed.ac.uk> wrote:
> Alex Hunsley wrote:
> > 
> > I'm trying to compile the 3c90x netcard driver from 3com.
> > First time I try, I get this:
> > 
> > 3c90x.h:22: linux/modversions.h: No such file or directory
> > In file included from /usr/include/linux/sched.h:13,
> >                  from 3c90x.h:36,
> >                  from 3c90x.c:1:
> > 
> > so I remembered I need to install the kernel source.
> > I've installed it (and made sure it's at /usr/src/linux) and followed the
> > instructions at
> > 
> > http://www.tldp.org/HOWTO/mini/PCTel-MicroModem-Config/trouble.html#AEN468 -
> > 
> > in other words, I did "make config" followed by "make dep".
> > For "make config" I just answered 'default' to all the qeustions (by holding
> > down return!) After 'make dep', the file include/modversions.h still wasn't
> > there.
> > What am I doing wrong?
> I did a find on modversions.h and it's sitting in /usr/src/linux/include/linux,
> which is the wrong place?


> I assumed that the kernel source tar should be untarred and have it's contents
> put into /usr/src/linux, am I wrong about this?


You need to do one of three things:

 * Tell gcc that it should look in /usr/src/linux/include/ when
   looking for include files.  This means hacking the makefile up a
 * cp /usr/src/linux/include/linux/modversions.h /usr/include/linux/
 * figure out why modversions.h is not in
   /lib/modules/2.x.x/build/include/linux - because it should be

I recommend the third, followed by the first.  The third may depend on
your kernel version, I'm not sure though.

If you make compile_UP look like this:

gcc -c 3c90x.c -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer \
-I/usr/src/linux/include \
-I/lib/modules/$(uname -r)/build/include \
-fno-strength-reduce -pipe -m486 -malign-loops=2 \
-malign-jumps=2 -malign-functions=2 -DCPU=486 \

then that should work.

Tom Cook
Information Technology Services, The University of Adelaide

Classifications of inanimate objects:  Those that don't work, those that break down, and those that get lost.

Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au

Attachment: pgpOzyTsJ3dnQ.pgp
Description: PGP signature

Reply to: