Re: [OT] What is he talking about ? - debian and kernel headers
In article <[🔎] 20010225093850.A17081@home.com>,
ktb <firstname.lastname@example.org> wrote:
>I just read an article at -
>about apt-get. The article was all right for the most part but at the end
>of the article is a link -
>Discuss this article in the LinuxWorld.com forums
>Within the forum is a posting entitled -
>Debian ---- not a good choice!!!
Linus Torvalds himself has said that "the Debian way" of shipping
kernel headers is the only correct way. Several times, in fact.
But for some reason a lot of people seem to ignore him on this
You have to compile user-land programs that use the systems C
library against the same header files the C library was compiled
against, otherwise you can get serious versioning problems.
So pointing /usr/include/linux to just any kernels includes is
something you shouldn't ever do. It has to point to the includes
that were used to compile the C library. That's why Debian
ships a copy of those files with libc6-dev.
>For example if you are running Debian (potato) your /usr/include/linux
>and /usr/include/asm contain the files for Linux 2.2.16 and let's say you
>are running Linux 2.4.2 on this, if you try and compile any thing
>kernel dependant, you're going to get a bunch of undefines -
>try compiling any device driver on Debian!.
Nonsense, just use -I/usr/src/linux/include and you're set. You'll
have to do that anyway if for example you want to include say
<net/llc.h> - it doesn't exist under /usr/include/net and never will
because even on systems that link /usr/include/linux ->
/usr/src/linux/include/linux the systems /usr/include/net is
something completely different from the kernels /usr/src/linux/include/net.
It's a shame that so many people are misinformed and spread that
misinformation like gospel.
I live the way I type; fast, with a lot of mistakes.