[OpenAFS] redhat 7.1 kernel modules

Derek Atkins warlord@MIT.EDU
22 Jun 2001 10:23:54 -0400


The actual kernel headers in RH7.1 come NOT from the kernel-headers
RPM as you would expect, but from the kernel-source RPM.  The
kernel-headers RPM installs the necessary headers for normal
user-space compilations to work (into /usr/include/linux et. al.).  It
does not provide the necessary kernel headers to compile a kernel
module; those come from the kernel-source RPM.

My current theory is that Red Hat ships a number of different kernels
and that EACH KERNEL has a DIFFERENT set of symbol versions.  However,
as the symbol version files are only in the kernel-source RPM, one can
only successfully compile for ONE particular Red Hat kernel.

Personally, I think I would rather Red Hat actually shipped the
appropriate headers in /lib/modules/<vers><-rel>/build instead of
trying to be smart and symlink into /usr/src/linux-<vers>.  That way
one would get the actual symbol versions for that particular build of
the Red Hat kernel!

One can only hope that 7.2 fixes this problem.

-derek

PS: One thing to check is if the symbol version files in the
kernel-source RPM actually match the kernel symbol versions in
/proc/ksyms, and do this across all RH kernels.

Troy Dawson <dawson@fnal.gov> writes:

> Perhaps it is because you didn't have the kernel header installed.  It's very
> possible to install the kernel-source rpm, but not the kernel-headers, I've
> had many of our users do that.
> 
> # rpm -qa |grep kernel
> kernel-source-2.4.2-2
> kernel-headers-2.4.2-2
> kernel-2.4.2-2
> kernel-smp-2.4.2-2
> #
> 
> > 
> > Actually, it's more due to OpenAFS making bad assumptions about where
> > people's kernel source will live.
> > 
> > According to Linus, the current canonical location to look for kernel
> > source is /lib/modules/$(uname -r)/build/.  Unfortunately, most 2.2
> > kernels don't follow this convention (not due to any fault of their own,
> > they came out before Linus came to this decision.  My packages
> > (ftp://kickstart.linux.ncsu.edu/pub/realmkit/7.1/SRPMS/RealmKit/openafs*)
> > do the correct thing at the cost of not working with distributions or
> > kernels that aren't as up to date.
> > 
> > Cheers,
> > 
> > Jeremy
> > 
> An interesting thought, and for a bit there I was thinking that redhat
> actually was fully doing what Linus said, but I was wrong.  RedHat just made
> sure that the modules are in both places at once.  I'm not saying that's a bad
> thing though, rather smart actually.
> 
> # ls -l /lib/modules/2.4.2-2smp/ | grep build
> lrwxrwxrwx    1 root     root           28 Jun 18 09:55 build ->
> ../../../usr/src/linux-2.4.2
> #
> 
> But I am going to try your rpm though and see if it works.  I'll let you know
> the results.
> 
> Troy Dawson
> -- 
> __________________________________________________
> Troy Dawson  dawson@fnal.gov  (630)840-6468
> Fermilab  ComputingDivision/OSS  SCS Group
> __________________________________________________
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available