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

Re: What happened to version.h?



On Tue, 2004-02-17 at 21:01 -0500, James Olin Oden wrote:
> On Mon, 16 Feb 2004, Jeremy Katz wrote:
> 
> > On Sat, 2004-02-14 at 14:12 -0500, Janina Sajka wrote:
> > > I've just installed FC2 without a any particular problem--all looks OK.
> > > But, I tried to compile a newer ALSA and it failed for lack of
> > > /usr/src/linux/include/linux/version.h. Indeed, when I look in the
> > > source tree--which is certainly there--version.h is not there. Is there
> > > some new procedure re the 2.6 kernels that I'm unaware of?
> > 
> > ALSA should be look in /lib/modules/$(uname -r)/build not /usr/src/
> > linux.   This is the Linux Approved Way.  And with the 2.6 kernels, the
> > headers are being included in the individual packages instead of all in
> > the kernel-source package which a) makes things a lot simpler and b)
> > makes it so that you don't have to install krenel-source just to build a
> > kernel module.
> >
> Ack!  It also makes it so your driver only builds against the currently 
> running kernel.  Not a good thing if that is not your intent (and in my
> universe, this is more likely the case than not).  I personally think 
> its better to build against the sources of the kernel you wish your module
> to run with.  Where I work, this is all automated, and I believe there
> has been talk on the fedora-devel list concerning this (i.e. open source
> versions of such tools).  Anyway, just my 2cents...james

So do /lib/modules/myrandomversion instead of /lib/modules/$(uname -r).
Sane makefiles will even let you redirect it to /some/random/path.  But
in the general case, keeping the actual headers (and the corresponding
module version fun) with the kernel instead of having the mess of
conditionals and nastiness (cf /boot/kernel.h and the hacks involved
therein) is _far_ nicer.

Jeremy




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