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

Re: /usr/include/linux -> eh?



*- On 19 Mar, Graham Ashton wrote about "/usr/include/linux -> eh?"
> I'm trying to compile vmware (virtual machine under linux), having
> updated my kernel to 2.2.3. 
> 
> vmware needs to compile a module during the installation process, and it
> takes one look at the version.h file that I have in /usr/include/linux
> and barfs (wrong kernel version - version.h still reckons I'm running
> 2.0.36).
> 
> It appears that the info in version.h that comes with the libc6-dev
> package suggests that I'm still running 2.2.3. I just removed and
> re-installed libc6-dev, and version.h is no different.
> 
> I can't believe that such an oversight is "normal", which leads me to
> conclude that I'm not doing things "the debian way" (again).
> 
> Could somebody help me out here? How do I keep version.h up to date?
> 
> Thanks.
> 
> P.S. vmware actually says the following;
> 
>   Whoa, something is wrong with the system include files on your
>   machine!  The file <linux/version.h> is for a 2.0.36 Linux system but
>   you are running a 2.2.3 kernel.
> 
> And fixing the version number in version.h noticably doesn't fix my
> compilation problems.
> 

Debian has a fixed policy about what goes in /usr/include/{linux,asm}. 
It can be found in /usr/doc/libc6-dev/FAQ.Debian.gz.  Basically you
need to modify the vmware Makefile to include -I/usr/src/linux/include
if you want to use the real kernel headers in /usr/src/linux/include.

Unforntunately, for the vmware setup it dynamically extracts the
archive that has the Makefile in it.  So to do it the 'right' way you
would have to extract the archive by hand, modify the Makefile, tar it
back up again, and then run the install.pl script.  

When I did it I just moved the /usr/include/{linux,asm} directories out
of the way and then made symlinks to the appropriate kernel headers and
then moved the old file back in place when I was done.  Worked for my
YMMV.

-- 
Brian 
---------------------------------------------------------------------
"Never criticize anybody until you have walked a mile in their shoes,  
 because by that time you will be a mile away and have their shoes." 
							   - unknown  

Mechanical Engineering                                bservis@usa.net
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: