On Tue, 18 Apr 2000 [EMAIL PROTECTED] wrote:

> On 17-Apr-2000 Bart Oldeman wrote:
> > On Mon, 17 Apr 2000 [EMAIL PROTECTED] wrote:

> > Is your /usr/include/linux a symlink into the kernel tree?
> Yes it is (with /usr/include/asm -> /usr/src/linux/include/asm as well).
> 
> > This is not
> > recommended anymore, AFAIK.
> Huh? I didn't know about that! How long has this been the case?
> On the other hand I know that including kernel headers in an
> application is no longer considered a good practice since libc6
> is supposed to expose all the necessary API's (how true THAT is,
> I don't know).
 
OK, I guess I was spoiled by Debian policy and bypassed other
distributions. I think you should still be able to compile dosemu with
kernel headers from 2.2 and run it under 2.3.99.

Bart

(see Debian documentation below)

------> /usr/doc/libc6/README.Debian.gz <------
Q1: Why does the Debian libc6-dev package create /usr/include/linux and
/usr/include/asm directories containing header files from a specific
kernel, instead of using the "established" convention of making those
directories into symlinks pointing to the currently installed kernel?

A1: Occasionally, changes in the kernel headers cause problems with
the compilation of libc and of programs that use libc.  To ensure that
users are not affected by these problems, we configure libc to use the
headers from a kernel that is known to work with libc and the programs
that depend on stable kernel headers.

Q2: What if I want to compile a program that needs a feature from a
later kernel than is used by libc?

A2: In practice, most programs will not have this problem.  However,
depending on the scope of the problem you have several options available:

If the situation is one like "kernel driver development", where all use
of the machine for development is expected to be against a different set
of kernel headers than are supplied with the "stock" libc6-dev, rebuilding
the glibc packages against that particular kernel will create a full set
of
libc6 packages that are "compliant" with the new kernel. All development
done on machines with these packages installed will be done against the
new kernel. To build libc6-dev against your particular kernel, export the
environment variable ksource, set to the path to that particular kernel
and
build the package.

If you want this new glibc package to stick against further upgrades,
simply
use dselect and place the packages on HOLD. This will keep them from being
upgraded against your wishes.

If there is just one particular program/package that needs different
headers,
and your kernel of choice is installed in the usual place, you can use the
-I/usr/src/linux/include option on the gcc command line, when compiling
that
specific program.


Reply via email to