Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is it new normal to update gcc once a month ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu May 11, 2023 10:10 pm    Post subject: Is it new normal to update gcc once a month ? Reply with quote

GCC used to be a stable package, that stayed for year or so at a time. Starting with gcc-12 it seems getting updated and change a version in stable like once a month. The date stamp in the version number seems to indicate that we should think about gcc version as a rolling one. Of course it is a lot of compilation (not carbon friendly :) )
Is it how we are supposed to live now ?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9867
Location: almost Mile High in the USA

PostPosted: Thu May 11, 2023 10:30 pm    Post subject: Reply with quote

gotta roll with the punches... :(
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20580

PostPosted: Fri May 12, 2023 12:41 am    Post subject: Reply with quote

I had dejavu reading this post. I'm certain someone posted something similar not long ago.

Anyway, I think it's a matter of what you want and when you want it. I only recently upgraded to a version of 12. I skipped 11 entirely and had been using 10 for quite a while.

I upgraded to gcc-12.2.1_p20230304 on Mon Apr 24th, but didn't switch to it. Shortly after that, gcc-12.2.1_p20230428-r1 was released. Since I hadn't switched to 12 yet, I upgrade to that one on Apr 29th.

Unless there is a compelling reason to do so, I will remain on that version for quite a while.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23017

PostPosted: Fri May 12, 2023 12:42 am    Post subject: Reply with quote

As with all packages, you have the option of not taking every update. Unlike some of the younger languages (such as Rust), gcc has excellent cross-version compatibility. You should be able to skip the minor updates within a gcc line until you have evidence that you need the absolute latest version.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9867
Location: almost Mile High in the USA

PostPosted: Fri May 12, 2023 1:33 am    Post subject: Reply with quote

gcc-9 as of late was a problematic gcc, but how would one know...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri May 12, 2023 5:21 am    Post subject: Reply with quote

The point I am trying to make is that on source compiled distribution having "stable" change on monthly basis in a rolling fashion is conceptually broken. Especially when we talk about core packages and packages that take hours to compile (and gcc-12 now takes around 2 hours on my laptop). If all packages do that, we will be recompiling world weekly, and it is unwieldy to devote 10 hours a week for compilation (I'll say nothing about carbon footprint).

In a way, it is a job of distribution to bundle changes to pace the 'stable'.
We can do it manually, but it is extremely adhoc, since one needs to evaluate whether this potential change is important (maybe security ?) and should not be skipped, and breaks semi-automated workflows.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20580

PostPosted: Fri May 12, 2023 5:52 am    Post subject: Reply with quote

Oh! On that, I mostly agree.

Someone who knows would have to clarify, but I believe it is mostly related to following upstream stable due to the nature of Gentoo being a rolling release.

And because I think of it when I have similar reactions wishing for a more "slow / stable" arrangement, there was once a proposal.

GLEP 19: Gentoo Stable Portage Tree.

I think it lacked the human resources it would require to maintain, but I may be mistaken on that.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 759
Location: /home

PostPosted: Fri May 12, 2023 6:47 am    Post subject: Reply with quote

dmpogo wrote:

(I'll say nothing about carbon footprint).


Please do say, I'm genuinely curious about factual numbers here since this seems so concerning to you.

Note that your computer most likely isn't using as much as you think it is _just_ to compile gcc (it won't even max out cores half of the time).
Note that energy can be generated in an ecological way.
Note that spending hours watching twitch / playing games is far worse, especially since you are tolling not just your PC but numerous servers too.


dmpogo wrote:

The point I am trying to make is that on source compiled distribution having "stable"


"Rolling release" and "stable" is a bit hard combination to do right :) I truly haven't noticed gcc updates once a month, but in my opinion it's nice to get _important_ fixes to stable too without having to wait half a year for it. I'd suggest using the experimental binhost here but looks like its gcc version is far behind the current stable.

But as others have said, you don't _have_ to update if you don't feel like it. Find a right time to leave your pc idle and compiling for 2 hours.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri May 12, 2023 9:57 am    Post subject: Reply with quote

Juippisi wrote:
dmpogo wrote:

(I'll say nothing about carbon footprint).


Please do say, I'm genuinely curious about factual numbers here since this seems so concerning to you.

Note that your computer most likely isn't using as much as you think it is _just_ to compile gcc (it won't even max out cores half of the time).
Note that energy can be generated in an ecological way.
Note that spending hours watching twitch / playing games is far worse, especially since you are tolling not just your PC but numerous servers too.


dmpogo wrote:

The point I am trying to make is that on source compiled distribution having "stable"


"Rolling release" and "stable" is a bit hard combination to do right :) I truly haven't noticed gcc updates once a month, but in my opinion it's nice to get _important_ fixes to stable too without having to wait half a year for it. I'd suggest using the experimental binhost here but looks like its gcc version is far behind the current stable.

But as others have said, you don't _have_ to update if you don't feel like it. Find a right time to leave your pc idle and compiling for 2 hours.


There are many things that I can do, which does not mean that the situation is healthy. Important fixes are the ones that deserve minor number change, unless it is an absolute security bug, which I saw very infrequently if at all with gcc in my 25 years of using it.

gcc-12 had 3 stable releases since January, two separated by a month from end of March to end of April.

Re carbon:
I personally not that much concerned about carbon footprint, but I am currently in a lab (astrophysics) in Paris, which went through carbon emission evaluation and I have a pie chart in front of my eyes
on the wall across my office (and the lead, actually very good mathematician, is a friend of mine). Astrophysics lab generates 6 tons of CO2 per person per year. Among them 15% (1 ton) comes from "remote computing', mostly using HPC centers elsewhere, it is equal to the sum of heating and electricity of the building combined (which has a rather powerful HPC cluster as well, and if I understood correctly, its cntribution goes to 'electricity' rather than remote computing', but I am not sure )

They are under some projected EU obligations to reduce this number 3 times, to 2 tonns per person-year by some year I don't remember when.
You'll be surprised, but one of the recommendations is to use computing less - they urge to think before you launch your code, and don't launch just some crap so that CPU cycles are not wasted.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2090

PostPosted: Fri May 12, 2023 3:10 pm    Post subject: Reply with quote

First, in general, while you're free to question why we do things a certain way, a degree of trust is required. We spend a lot of time reading GCC bugs and following upstream development. Upstream GCC will only ever cut one point release a year after the first 2 releases for a series, regardless of the severity of bugs. Upstream recommends tracking the stable branches like we're doing.

If something is miscompiled, giving the wrong result or segfaulting, but it only happens for a specific program (say, postgresql, which was one thing affected), I don't think it's ethical for me to sit on a fix for that. Or what if there's an ICE (crash) when building something popular like Chromium?

I try to be mindful of not inflicting too-often rebuilds on stable users and I also try to give commentary in commit messages and stabilisation bugs when it's "out of cycle" (seeming too soon or similar). I am also very mindful that users dislike building GCC and I have this in mind whenever I'm handling it. So, when you are rebuilding it, please consider that I'm aware of these grumblings, and we've decided in that case it's worth it despite that because there's a good reason.

Keep in mind as well there's a particular duty/importance for us to not have a miscompiling compiler, given that we can't just force a rebuild of all binary packages and ship those in an update. If there's a bad compiler on a user's system, the binaries may linger on for years on their machine until the package has a reason to be rebuilt.

It's not really a case of being "fundamentally broken", rather events aren't always in our control.

For some dates:
sys-devel/gcc-12.2.1_p20230121-r1 was stabled on 2023-01-23 for amd64 (this was the first stabilisation for GCC 12; this is very late for a GCC version to be first stabled, but there was/is a PPC miscompilation we're working on)
sys-devel/gcc-12.2.1_p20230304 was stabled on 2023-04-23 for amd64
sys-devel/gcc-12.2.1_p20230428-r1 was stabled on 2023-04-29 for amd64 (this was, in particular, to get out a very annoying false positive warning fix as well as fix a well-publicised miscompilation)

I think essentially it was a bit unlucky. It took a while for us to stable 12 and then when we did, we found some issues and wanted to get those out to users.

And, to be clear, no, I don't want to - nor intend - to have stable users rebuilding GCC every month or every other month. The expectations of users, as ever, weigh heavy on my mind for critical components, and a certain trade off was made recently for these specific bugs. Different bugs are different. I appreciate and understand the concerns here but I think some of it was misinformed.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Mon May 15, 2023 2:25 pm    Post subject: Reply with quote

Hi sam, thank for run down of the timetable, we really appreaciate the effort, though complain :) Perhaps because it is a national sport in France, where I happen to be right now for a bit
Back to top
View user's profile Send private message
pandoraxero
n00b
n00b


Joined: 15 Nov 2009
Posts: 56
Location: USA. Southeast

PostPosted: Mon May 15, 2023 8:21 pm    Post subject: Reply with quote

You know, this got me to research if GCC supports march=znver4 yet... looks like it does - on gcc13.
it also looks like gcc13 is apparently ~arch right now.
Is there a general time frame for when new major versions of gcc get put in the stable branch for Gentoo, or should I just pop a ~arch entry into /e/p/p.a_k/?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2890

PostPosted: Mon May 15, 2023 8:52 pm    Post subject: Reply with quote

pandoraxero wrote:
You know, this got me to research if GCC supports march=znver4 yet... looks like it does - on gcc13.
it also looks like gcc13 is apparently ~arch right now.
Is there a general time frame for when new major versions of gcc get put in the stable branch for Gentoo, or should I just pop a ~arch entry into /e/p/p.a_k/?
gcc:13 did make issues surface in a fair amount of packages, see: https://bugs.gentoo.org/865117 (not as bad as previous major gcc, but well) -- Most of the bigger issues are fixed in ~arch, but some of these fixes may not be in stable yet causing you to hit them if use gcc:13 there (not that it means you /can't/ use it but should be aware may need to follow bugs and possibly use some other ~arch packages to get fixed versions). Likely still issues that remain to be discovered too (especially in stable given we're mostly testing ~arch for this right now).

No idea for a real time frame (depends on how things go), but I don't see stabilization happening soon. As noted in an earlier post, stable was still on gcc:11 until January 2023 (having 12 is pretty recent), and 13 still has lot of testing to go (and likely new releases/snapshots) before can consider it. But well, it at least shouldn't take as long as gcc:12 did.
Back to top
View user's profile Send private message
pandoraxero
n00b
n00b


Joined: 15 Nov 2009
Posts: 56
Location: USA. Southeast

PostPosted: Mon May 15, 2023 10:22 pm    Post subject: Reply with quote

Ionen wrote:
gcc:13 did make issues surface in a fair amount of packages, see: https://bugs.gentoo.org/865117 (not as bad as previous major gcc, but well) -- Most of the bigger issues are fixed in ~arch, but some of these fixes may not be in stable yet causing you to hit them if use gcc:13 there (not that it means you /can't/ use it but should be aware may need to follow bugs and possibly use some other ~arch packages to get fixed versions). Likely still issues that remain to be discovered too (especially in stable given we're mostly testing ~arch for this right now).

No idea for a real time frame (depends on how things go), but I don't see stabilization happening soon. As noted in an earlier post, stable was still on gcc:11 until January 2023 (having 12 is pretty recent), and 13 still has lot of testing to go (and likely new releases/snapshots) before can consider it. But well, it at least shouldn't take as long as gcc:12 did.
Well, I'm not exactly in an environment which requires everything to be stable. I mean, my main Gentoo rig is primarily used for emulation, and playing various audio and video formats through my TV/Sound System... It's more or less a couch gaming rig. I mean, what's the WORST that could happen if I switched to gcc:13 at this point? Stuff not compiling? All the same, there are those who depend on these things to be more reliable, so I can understand holding it in ~arch.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2090

PostPosted: Sat May 20, 2023 6:15 am    Post subject: Reply with quote

dmpogo wrote:
Hi sam, thank for run down of the timetable, we really appreaciate the effort, though complain :) Perhaps because it is a national sport in France, where I happen to be right now for a bit


:heart:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum