public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [OT] Re: Linus's include file strategy redux
@ 2000-12-15 16:56 Petr Vandrovec
  2000-12-15 16:00 ` Dana Lacoste
  2000-12-15 17:31 ` ferret
  0 siblings, 2 replies; 15+ messages in thread
From: Petr Vandrovec @ 2000-12-15 16:56 UTC (permalink / raw)
  To: Dana Lacoste; +Cc: linux-kernel

On 15 Dec 00 at 10:23, Dana Lacoste wrote:
> > On Fri, Dec 15, 2000 at 12:14:04AM +0000, Miquel van Smoorenburg wrote:
> 
> > It's the version that's in cvs, I just did an cvs update.  It's
> > been in it for ages.  If it's wrong, someone *please* correct it.
> 
> I think this is the important part.
> This subject has come up quite a few times in the past
> couple of weeks on the scyld (eepro/tulip) mailing lists.
> 
> Essentially, whatever solution is implemented MUST ensure :
> 
> 1 - glibc will work properly (the headers in /usr/include/* don't
>     change in an incompatible manner)
> 
> 2 - programs that need to compile against the current kernel MUST
>     be able to do so in a quasi-predictable manner.

Maybe you did not notice, but for months we have
/lib/modules/`uname -r`/build/include, which points to kernel headers,
and which should be used for compiling out-of-tree kernel modules
(i.e. latest vmware uses this).

If you want to use some linux-specific feature in your program, you have
two choices: (1) use standard <linux/xxx.h> from version which came with
glibc, or (2) create your personal copy of known-to-work xxx.h.
Using anything else (such as latest version of xxx.h) is known to not
work, and brokes very often. Compare existing headers between 1.2.0 and
2.4.0. They are - hmm - a bit different. Also, what if user currently
has installed 2.2.x kernel, but in future it will want to use 2.4.x, with
its new features. You have to recompile all programs because of they were 
compiled with old kernel headers? No. 

[And for example, with ncpfs you just cannot create version which works
with 2.0/2.2/2.4 using kernel headers, as API changed during time
completely. With private headers it is easy. You can also add support
into userspace without modifying Linus kernel. And after some time
you can swap API in kernel and no-one notices (modulo whether Linus will 
agree with change, but you can always ask in advance).]
                                                Best regards,
                                                    Petr Vandrovec
                                                    vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re:       [OT] Re: Linus's include file strategy redux
@ 2000-12-15 17:09 Petr Vandrovec
  0 siblings, 0 replies; 15+ messages in thread
From: Petr Vandrovec @ 2000-12-15 17:09 UTC (permalink / raw)
  To: Dana Lacoste; +Cc: linux-kernel

On 15 Dec 00 at 11:00, Dana Lacoste wrote:
> > Maybe you did not notice, but for months we have
> > /lib/modules/`uname -r`/build/include, which points to kernel headers,
> > and which should be used for compiling out-of-tree kernel modules
> > (i.e. latest vmware uses this).
> 
> What about the case where I'm compiling for a kernel that I'm
> not running (yet)?
> 
> lm_sensors, for example, told me yesterday when I compiled it
> that I was running 2.2.17, but it was compiling for 2.2.18
> (because I moved the symlink in /usr/src/linux to point to
> /usr/src/linux-2.2.18)
> 
> I personally wouldn't like some programs to do a `uname -r`
> check because it won't do what I want it to :)

You can list /lib/modules/*/build/include and present user with list
of possible kernels. You should check whether version.h contents
matches directory name, but it is just an additional check against 
users which compile all kernels in /usr/src/linux.

For lmsensors, you just have to compile kernel first, and lm_sensors
after that. But intervening reboot is not required as long as
configure does not use 'uname -r' (ok, I'm filling vmware bugreport
just now).
                            Best regards,
                                    Petr Vandrovec
                                    vandrove@vc.cvut.cz
                                    
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2000-12-18 19:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-15 16:56 [OT] Re: Linus's include file strategy redux Petr Vandrovec
2000-12-15 16:00 ` Dana Lacoste
2000-12-15 16:16   ` Eli Carter
2000-12-15 17:31 ` ferret
2000-12-15 18:56   ` Ingo Oeser
2000-12-16  3:37     ` ferret
2000-12-16  6:57       ` Keith Owens
2000-12-16 16:40         ` ferret
2000-12-16 23:43       ` Peter Samuelson
2000-12-17  3:05         ` ferret
2000-12-17  8:08           ` Peter Samuelson
2000-12-17 20:08             ` ferret
2000-12-18  3:58               ` Peter Samuelson
2000-12-18 19:21                 ` ferret
  -- strict thread matches above, loose matches on Subject: below --
2000-12-15 17:09 Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox