[KLUG Members] VMware with RedHat 7.1 w/ XFS

Bryan-TheBS-Smith members@kalamazoolinux.org
Mon, 15 Oct 2001 17:35:53 -0400


[ Reposted select portions of the thread for completeness ]

Alan DeJong wrote:
> VMWare ... XFS 2.4.3 kernel ...
> /usr/include/linux/modversions.h:1:2: error Modules should never
> use kernel-headers system headers,
> /usr/include/linux/modversions.h:2:2: #error but headers from an
> appropriate kernel-source

Bryan-TheBS-Smith wrote:
> Ah yes!  I just ran into this myself!
> Check out this discussion ...
> http://lists.leap-cf.org/pipermail/leaplist/2001-October/015131.html
> I believe I nail the issue on the head and offer a suggestion that,
> while not might be ideal, it at least works.

Alan DeJong wrote:
> Right!  One question, how did u reinstall the kernel-headers? Was there
> a rpm somewhere? Or did i miss a step?

Again, the modversions.h in /usr/include/linux (kernel-headers
"system headers") _differs_ from the one in
/usr/src/linux/include/linux (kernel-source "kernel headers").  This
is a long issue which I don't know much about, but Linus and distros
have tried to address (differently?  the same???  are they supposed
to be the same/unified?  Or distro-specific and kernel-specific???).

Anyhoo, I re-installed the kernel-source (again that's *SOURCE*, not
*HEADERS*) RPM (rpm -Uhv --force kernel-source*.i386.rpm), which,
again, had its own modversions.h file that my nVidia driver (as well
as your VMWare driver) expects.  Be sure to backup your ".config"
file before you re-install it though, or you'll probably lose it
when you re-install the kernel-source.

*IMPORTANT*NOTE*:

Your kernel and modules _must_ be compiled to the same modversions.h
file.  If you did a "make mrproper" and wiped out the one under
/usr/src/linux/include/linux, the kernel build will use the
/usr/include/linux version.  Again, that latter version is the one
your VMWare (as well as my nVidia) module didn't like.

But you cannot simply re-install the source, get the "good"
modversions.h file and expect it to work.  Again, your kernel used
the one under /usr/include/linux, instead of the
/usr/src/linux/include/linux you are now building your VMWare module
against, and you'll get symbol errors when you try to load it (even
though it builds correctly).

So you'll probably have to rebuild your kernel to use the
modversion.h  under /usr/src/linux/include/linux.  Yeah, I know this
sucks.  SGI is using that version in its pre-built binary kernel
RPMs, yet its "mrproper" target in the Makefile wipes it out (I have
no idea why, same as RedHat's Makefile???).  My solution was to
comment out the "rm modversions.h" file in the Makefile under the
mrproper target.

-- TheBS

CC:  LEAPLIST

-- 
Bryan "TheBS" Smith    mailto:b.j.smith@ieee.org   chat:thebs413
Engineer  AbsoluteValue Systems, Inc.  http://www.linux-wlan.org
President     SmithConcepts, Inc.   http://www.SmithConcepts.com
----------------------------------------------------------------
The US recording and software industries have choosen to "honor"
the victims of 9/11 by pushing their political agendas even fur-
ther through so-called "anti-terrorism" legislation in Congress.