* [gentoo-user] How does Gentoo deal with GCC's header fixes?
@ 2010-09-08 22:10 Nikos Chantziaras
2010-09-09 15:00 ` [gentoo-user] " walt
2010-09-10 14:39 ` [gentoo-user] " Paul Hartman
0 siblings, 2 replies; 11+ messages in thread
From: Nikos Chantziaras @ 2010-09-08 22:10 UTC (permalink / raw
To: gentoo-user
When building GCC, it will scan all headers in /usr/include and apply
fixes to them, and then copy them and use the modified versions. Now a
binary distro (AFAIK) will ship the GCC modified headers, so there's no
problem.
Gentoo on the other hand will work as intended by GCC only if the user
re-emerges GCC after every time a package is emerged that installs
headers. Obviously, no user does that.
So the question is simple; does Gentoo deal with this problem in any way?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-08 22:10 [gentoo-user] How does Gentoo deal with GCC's header fixes? Nikos Chantziaras
@ 2010-09-09 15:00 ` walt
2010-09-09 15:18 ` Nikos Chantziaras
2010-09-09 16:26 ` Volker Armin Hemmann
2010-09-10 14:39 ` [gentoo-user] " Paul Hartman
1 sibling, 2 replies; 11+ messages in thread
From: walt @ 2010-09-09 15:00 UTC (permalink / raw
To: gentoo-user
On 09/08/2010 03:10 PM, Nikos Chantziaras wrote:
> When building GCC, it will scan all headers in /usr/include and apply fixes to them, and then copy them and use the modified versions. Now a binary distro (AFAIK) will ship the GCC modified headers, so there's no problem.
>
> Gentoo on the other hand will work as intended by GCC only if the user re-emerges GCC after every time a package is emerged that installs headers. Obviously, no user does that.
>
> So the question is simple; does Gentoo deal with this problem in any way?
Maybe I misunderstand your question, but AFAIK the only reason to re-compile any
package is if the libraries it links to have changed, no?
AFAICS gcc links only to libraries installed by glibc. therefore in the case of
recompiling gcc itself, it should need/use only the headers installed by glibc.
(And the only reason to re-compile an existing glibc is if the linux kernel headers
change. I always re-compile glibc when the linux kernel headers change, but I
never thought about re-compiling gcc as well. Maybe I should.)
Corrections are requested if I'm wrong about all of this.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 15:00 ` [gentoo-user] " walt
@ 2010-09-09 15:18 ` Nikos Chantziaras
2010-09-09 16:26 ` Volker Armin Hemmann
1 sibling, 0 replies; 11+ messages in thread
From: Nikos Chantziaras @ 2010-09-09 15:18 UTC (permalink / raw
To: gentoo-user
On 09/09/2010 06:00 PM, walt wrote:
> On 09/08/2010 03:10 PM, Nikos Chantziaras wrote:
>> When building GCC, it will scan all headers in /usr/include and apply
>> fixes to them, and then copy them and use the modified versions. Now a
>> binary distro (AFAIK) will ship the GCC modified headers, so there's
>> no problem.
>>
>> Gentoo on the other hand will work as intended by GCC only if the user
>> re-emerges GCC after every time a package is emerged that installs
>> headers. Obviously, no user does that.
>>
>> So the question is simple; does Gentoo deal with this problem in any way?
>
> Maybe I misunderstand your question, but AFAIK the only reason to
> re-compile any
> package is if the libraries it links to have changed, no?
No, mostly the main reason is when updates are available. And in Gentoo
this always means building from source.
> AFAICS gcc links only to libraries installed by glibc. therefore in the
> case of
> recompiling gcc itself, it should need/use only the headers installed by
> glibc.
Yeah, you misunderstood the question ;-) GCC applies changes to header
files in /usr/include. Lets say to ncurses.h. When you then update
ncurses, a new header is installed in /usr/include, but GCC only has the
modified version of it from the previous version:
http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Fixed-Headers.html
Of course it could be me who doesn't really understand what's going on
here though.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 15:00 ` [gentoo-user] " walt
2010-09-09 15:18 ` Nikos Chantziaras
@ 2010-09-09 16:26 ` Volker Armin Hemmann
2010-09-09 19:17 ` Alan McKinnon
2010-09-09 20:05 ` walt
1 sibling, 2 replies; 11+ messages in thread
From: Volker Armin Hemmann @ 2010-09-09 16:26 UTC (permalink / raw
To: gentoo-user
On Thursday 09 September 2010, walt wrote:
> On 09/08/2010 03:10 PM, Nikos Chantziaras wrote:
> > When building GCC, it will scan all headers in /usr/include and apply
> > fixes to them, and then copy them and use the modified versions. Now a
> > binary distro (AFAIK) will ship the GCC modified headers, so there's no
> > problem.
> >
> > Gentoo on the other hand will work as intended by GCC only if the user
> > re-emerges GCC after every time a package is emerged that installs
> > headers. Obviously, no user does that.
> >
> > So the question is simple; does Gentoo deal with this problem in any way?
>
> Maybe I misunderstand your question, but AFAIK the only reason to
> re-compile any package is if the libraries it links to have changed, no?
>
> AFAICS gcc links only to libraries installed by glibc. therefore in the
> case of recompiling gcc itself, it should need/use only the headers
> installed by glibc.
>
> (And the only reason to re-compile an existing glibc is if the linux kernel
> headers change. I always re-compile glibc when the linux kernel headers
> change, but I never thought about re-compiling gcc as well. Maybe I
> should.)
>
> Corrections are requested if I'm wrong about all of this.
hm, I never recompile glibc after a header update.... or anything else....
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 16:26 ` Volker Armin Hemmann
@ 2010-09-09 19:17 ` Alan McKinnon
2010-09-09 21:29 ` Neil Bothwick
2010-09-09 23:48 ` Nikos Chantziaras
2010-09-09 20:05 ` walt
1 sibling, 2 replies; 11+ messages in thread
From: Alan McKinnon @ 2010-09-09 19:17 UTC (permalink / raw
To: gentoo-user
Apparently, though unproven, at 18:26 on Thursday 09 September 2010, Volker
Armin Hemmann did opine thusly:
> On Thursday 09 September 2010, walt wrote:
> > On 09/08/2010 03:10 PM, Nikos Chantziaras wrote:
> > > When building GCC, it will scan all headers in /usr/include and apply
> > > fixes to them, and then copy them and use the modified versions. Now a
> > > binary distro (AFAIK) will ship the GCC modified headers, so there's no
> > > problem.
> > >
> > > Gentoo on the other hand will work as intended by GCC only if the user
> > > re-emerges GCC after every time a package is emerged that installs
> > > headers. Obviously, no user does that.
> > >
> > > So the question is simple; does Gentoo deal with this problem in any
> > > way?
> >
> > Maybe I misunderstand your question, but AFAIK the only reason to
> > re-compile any package is if the libraries it links to have changed, no?
> >
> > AFAICS gcc links only to libraries installed by glibc. therefore in the
> > case of recompiling gcc itself, it should need/use only the headers
> > installed by glibc.
> >
> > (And the only reason to re-compile an existing glibc is if the linux
> > kernel headers change. I always re-compile glibc when the linux kernel
> > headers change, but I never thought about re-compiling gcc as well.
> > Maybe I should.)
> >
> > Corrections are requested if I'm wrong about all of this.
>
> hm, I never recompile glibc after a header update.... or anything else....
Me neither :-)
I know I should, and why. But don't.
I think the glibc and toolchain devs think the same way and go to
extraordinary lengths to make sure stuff still works no matter hwo you go
about it.
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 16:26 ` Volker Armin Hemmann
2010-09-09 19:17 ` Alan McKinnon
@ 2010-09-09 20:05 ` walt
2010-09-10 4:47 ` Volker Armin Hemmann
1 sibling, 1 reply; 11+ messages in thread
From: walt @ 2010-09-09 20:05 UTC (permalink / raw
To: gentoo-user
On 09/09/2010 09:26 AM, Volker Armin Hemmann wrote:
> On Thursday 09 September 2010, walt wrote:
>> And the only reason to re-compile an existing glibc is if the linux kernel
>> headers change. I always re-compile glibc when the linux kernel headers
>> change...
>
> hm, I never recompile glibc after a header update.... or anything else....
I never did either until recently, when I started playing with vbox from
its svn repository in addition to tracking the latest from Linus.git.
Until then I had no idea how often the kernel devs break things by changing
kernel data structures and system calls without notice.
That's significant for projects like vbox because they (apparently) use
kernel services directly without going through libc like everybody else.
I'm assuming that's true because the vbox code insists on using the kernel
headers from the kernel that is actually running at the time. (Hence, the
vbox code breaks every time Linus changes something important.)
User space programs aren't supposed to poke at the kernel directly (unlike
the vbox kernel module) but go through libc to use kernel services.
So, how to avoid breaking glibc with every new kernel update?
The solution, for better or worse, has been to maintain an independent set
of kernel headers that change only when new kernel user-space features are
added or obsolete ones deleted -- not very often -- and those are provided
to user-space programs through libc.
So, I'm *assuming* that gentoo devs release an update for the kernel-headers
package when some user-space kernel service has been added or deleted.
(Device drivers and other kernel modules get broken much more often than
that.)
If my assumption is correct, then programs linked against libc (lots) won't
actually see the changes until libc is re-compiled against the new headers.
And, most of the time it doesn't matter because existing programs aren't
using any brand-new kernel services (yet).
Corrections are welcome, as always.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 19:17 ` Alan McKinnon
@ 2010-09-09 21:29 ` Neil Bothwick
2010-09-09 23:48 ` Nikos Chantziaras
1 sibling, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2010-09-09 21:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]
On Thu, 9 Sep 2010 21:17:52 +0200, Alan McKinnon wrote:
> > hm, I never recompile glibc after a header update.... or anything
> > else....
>
>
> Me neither :-)
>
> I know I should, and why. But don't.
>
> I think the glibc and toolchain devs think the same way and go to
> extraordinary lengths to make sure stuff still works no matter hwo you
> go about it.
The elog message says nothing about anything stopping working.
Kernel headers are usually only used when recompiling your system libc, as
such, following the installation of newer headers, it is advised that you
re-merge your system libc.
Failure to do so will cause your system libc to not make use of newer
features present in the updated kernel headers.
So your system may not be quite as good as it could be if you don't
recompile glibc. My view is that it does no harm to recompile it and, all
else being equal, I prefer to follow the advice from the devs.
--
Neil Bothwick
Sleep is an excellent way of listening to an opera. - James Stephens
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 19:17 ` Alan McKinnon
2010-09-09 21:29 ` Neil Bothwick
@ 2010-09-09 23:48 ` Nikos Chantziaras
2010-09-10 0:56 ` walt
1 sibling, 1 reply; 11+ messages in thread
From: Nikos Chantziaras @ 2010-09-09 23:48 UTC (permalink / raw
To: gentoo-user
On 09/09/2010 10:17 PM, Alan McKinnon wrote:
> Apparently, though unproven, at 18:26 on Thursday 09 September 2010, Volker
> Armin Hemmann did opine thusly:
>
>> On Thursday 09 September 2010, walt wrote:
>>> On 09/08/2010 03:10 PM, Nikos Chantziaras wrote:
>>>> When building GCC, it will scan all headers in /usr/include and apply
>>>> fixes to them, and then copy them and use the modified versions. Now a
>>>> binary distro (AFAIK) will ship the GCC modified headers, so there's no
>>>> problem.
>>>>
>>>> Gentoo on the other hand will work as intended by GCC only if the user
>>>> re-emerges GCC after every time a package is emerged that installs
>>>> headers. Obviously, no user does that.
>>>>
>>>> So the question is simple; does Gentoo deal with this problem in any
>>>> way?
>>>
>>> Maybe I misunderstand your question, but AFAIK the only reason to
>>> re-compile any package is if the libraries it links to have changed, no?
>>>
>>> AFAICS gcc links only to libraries installed by glibc. therefore in the
>>> case of recompiling gcc itself, it should need/use only the headers
>>> installed by glibc.
>>>
>>> (And the only reason to re-compile an existing glibc is if the linux
>>> kernel headers change. I always re-compile glibc when the linux kernel
>>> headers change, but I never thought about re-compiling gcc as well.
>>> Maybe I should.)
>>>
>>> Corrections are requested if I'm wrong about all of this.
>>
>> hm, I never recompile glibc after a header update.... or anything else....
>
>
> Me neither :-)
>
> I know I should, and why. But don't.
Just want to point out that this was about GCC's fixed headers, not
glibc, which makes it off-topic and completely unrelated to the original
topic :)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 23:48 ` Nikos Chantziaras
@ 2010-09-10 0:56 ` walt
0 siblings, 0 replies; 11+ messages in thread
From: walt @ 2010-09-10 0:56 UTC (permalink / raw
To: gentoo-user
On 09/09/2010 04:48 PM, Nikos Chantziaras wrote:
> Just want to point out that this was about GCC's fixed headers, not glibc, which makes it off-topic and completely unrelated to the original topic :)
Huh? Who are you? Oh, wait, this was your thread. Sorry, I forgot about you :p
The first sentence from the link you posted:
GCC needs to install corrected versions of some system header files.
I'm supposing (being the exspurt I am) that 'system header files' refers to
the linux-kernel-header files. I say that because the long-standing *ix
tradition is to equate the word 'system' (or 'sys') with the kernel or its
source code.
Come to think of it, I'm really speaking of the BSD world, where /usr/src/sys
is where the kernel code lives, unlike /usr/src/linux.
In other words, I'm just guessing.
Next expert..?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Re: How does Gentoo deal with GCC's header fixes?
2010-09-09 20:05 ` walt
@ 2010-09-10 4:47 ` Volker Armin Hemmann
0 siblings, 0 replies; 11+ messages in thread
From: Volker Armin Hemmann @ 2010-09-10 4:47 UTC (permalink / raw
To: gentoo-user
On Thursday 09 September 2010, walt wrote:
> On 09/09/2010 09:26 AM, Volker Armin Hemmann wrote:
> > On Thursday 09 September 2010, walt wrote:
> >> And the only reason to re-compile an existing glibc is if the linux
> >> kernel headers change. I always re-compile glibc when the linux kernel
> >> headers change...
> >
> > hm, I never recompile glibc after a header update.... or anything
> > else....
>
> I never did either until recently, when I started playing with vbox from
> its svn repository in addition to tracking the latest from Linus.git.
>
> Until then I had no idea how often the kernel devs break things by changing
> kernel data structures and system calls without notice.
system calls are never changed.
And kernel structures are irrelevant for userspace.
So if you don't use any modules, you don't have to recompile anything.
In fact, glibc's own header set are derived from some very acient kernel
headers.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] How does Gentoo deal with GCC's header fixes?
2010-09-08 22:10 [gentoo-user] How does Gentoo deal with GCC's header fixes? Nikos Chantziaras
2010-09-09 15:00 ` [gentoo-user] " walt
@ 2010-09-10 14:39 ` Paul Hartman
1 sibling, 0 replies; 11+ messages in thread
From: Paul Hartman @ 2010-09-10 14:39 UTC (permalink / raw
To: gentoo-user
On Wed, Sep 8, 2010 at 5:10 PM, Nikos Chantziaras <realnc@arcor.de> wrote:
> When building GCC, it will scan all headers in /usr/include and apply fixes
> to them, and then copy them and use the modified versions. Now a binary
> distro (AFAIK) will ship the GCC modified headers, so there's no problem.
>
> Gentoo on the other hand will work as intended by GCC only if the user
> re-emerges GCC after every time a package is emerged that installs headers.
> Obviously, no user does that.
>
> So the question is simple; does Gentoo deal with this problem in any way?
As far as I understand it, the header fixes are only there to fix
things that cause the compilation of GCC itself to fail, so I don't
think they are important other than when you are compiling GCC.
I have nothing insightful to add other than links to some
documentation that may be helpful, which you've probably already read.
:)
gcc-4.4.4.tar.bz2:/gcc-4.4.4/fixincludes/README
http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/Fixed-Headers.html
http://autogen.SourceForge.net/fixinc.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-09-10 15:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 22:10 [gentoo-user] How does Gentoo deal with GCC's header fixes? Nikos Chantziaras
2010-09-09 15:00 ` [gentoo-user] " walt
2010-09-09 15:18 ` Nikos Chantziaras
2010-09-09 16:26 ` Volker Armin Hemmann
2010-09-09 19:17 ` Alan McKinnon
2010-09-09 21:29 ` Neil Bothwick
2010-09-09 23:48 ` Nikos Chantziaras
2010-09-10 0:56 ` walt
2010-09-09 20:05 ` walt
2010-09-10 4:47 ` Volker Armin Hemmann
2010-09-10 14:39 ` [gentoo-user] " Paul Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox