mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: DervishD <raul@pleyades.net>
Cc: Lev Lvovsky <lists1@sonous.com>, linux-kernel@vger.kernel.org
Subject: Re: older kernels + new glibc?
Date: Tue, 30 Mar 2004 07:16:52 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.53.0403300706500.5144@chaos> (raw)
In-Reply-To: <20040329222710.GA8204@DervishD>

On Tue, 30 Mar 2004, DervishD wrote:

>     Hi Richard :)
>
>  * Richard B. Johnson <root@chaos.analogic.com> dixit:
> > For glibc compatibility you need to get rid of the sym-link(s)
> > /usr/include/asm and /usr/include/linux in older distributions.
> > You need to replace those with headers copied from the kernel
> > in use when the C runtime library was compiled. If you can't find
> > those, you can either upgrade your C runtime library, or copy
> > headers from some older kernel that was known to work.
> > In any event, you need to remove the sym-link that ends up
> > pointing to your 'latest and greatest' kernel.
>
>     Mmm, I'm confused. As far as I knew, you *should* use symlinks to
> your current (running) kernel includes for /usr/include/asm and
> /usr/include/linux. I've been doing this for years (in fact I
> compiled my libc back in the 2.2 days IIRC), without problems. Why it
> should be avoided and what kind of problems may arise if someone
> (like me) has those symlinks?
>

The libc headers end up including kernel headers via the sym-links.
They must *only* use the headers with which libc was built. Therefore,
any sym-links should be removed and replaced with a copy of the
appropriate headers.


>     User space programs should not use kernel headers, so this
> shouldn't be a problem, and kernel related tools should use the
> headers from the current (running) kernel or a similar version (here
> 'similar' as a broad meaning, I think, let's say that it means 'same
> series as the running kernel, but newer), but I'm afraid I'm missing
> something...
>
>     Thanks in advance :)

Again, the C-library was built to work with certain structures
(for instance) that existed at the time it was built. Let's say
I use /usr/include/sys/stat.h to get the structure members of
'struct stat'. If I use the headers that existed at the time the
C library was built, all is fine. If I use the kernel headers
that exist now, the offsets may be incorrect because there have
may have been members added to that structure.

This comes about because the C library used kernel headers,
which it shouldn't have done in the first place.

FYI, you __never__ include C library headers when building
any kernel modules.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.



  parent reply	other threads:[~2004-03-30 12:15 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 20:40 Lev Lvovsky
2004-03-29 21:00 ` Arjan van de Ven
2004-03-29 21:09   ` Lev Lvovsky
2004-03-29 21:22     ` Arjan van de Ven
2004-03-29 21:26       ` Lev Lvovsky
2004-03-29 21:28         ` Arjan van de Ven
2004-03-29 21:34           ` Lev Lvovsky
2004-03-29 21:36             ` Arjan van de Ven
2004-03-29 21:45             ` Chris Meadors
2004-03-29 23:03             ` David T Hollis
2004-03-30 15:07       ` Adrian Bunk
2004-03-31  0:54         ` GOTO Masanori
2004-03-29 21:17 ` Richard B. Johnson
2004-03-29 21:36   ` Lev Lvovsky
2004-03-29 21:50     ` Richard B. Johnson
2004-03-29 21:55       ` Lev Lvovsky
2004-03-29 22:10         ` Richard B. Johnson
2004-03-29 22:55           ` Lev Lvovsky
2004-03-30 12:19             ` Richard B. Johnson
2004-03-29 22:27   ` DervishD
2004-03-29 23:55     ` Matthew Reppert
2004-03-30  0:09       ` Lev Lvovsky
2004-03-30 14:50       ` DervishD
2004-03-30 15:15         ` Richard B. Johnson
2004-03-30 17:10           ` DervishD
2004-03-30 12:16     ` Richard B. Johnson [this message]
2004-03-30 15:20       ` DervishD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0403300706500.5144@chaos \
    --to=root@chaos.analogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists1@sonous.com \
    --cc=raul@pleyades.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®