Skip to content

gcc13: apply default errors from gcc14#344239

Closed
alyssais wants to merge 1 commit intoNixOS:stagingfrom
alyssais:gcc-errors
Closed

gcc13: apply default errors from gcc14#344239
alyssais wants to merge 1 commit intoNixOS:stagingfrom
alyssais:gcc-errors

Conversation

@alyssais
Copy link
Member

Description of changes

This is for after branch-off.

We wanted to update GCC to 14. We were okay with fixing all the new errors, but ultimately it had to be rolled back due to stability issues.

We don't know at what point in the 25.05 release cycle the next release will come out, so let's get ready by taking care of the new errors in advance. Once GCC 14 is the default, this should be reverted.

Source: https://gcc.gnu.org/gcc-14/porting_to.html

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@alyssais alyssais requested review from K900 and emilazy September 24, 2024 16:04
Copy link
Contributor

@K900 K900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually LGTM, implementation wise you know better than me.

@emilazy emilazy added the 2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off label Sep 24, 2024
Copy link
Member

@fabianhjr fabianhjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid forgetting to revert this, could you add a comment to the gcc default version in pkgs/top-level/all-packages.nix?

@fabianhjr
Copy link
Member

@emilazy, do we have to wait for branch-off? Probably would help nudge a lot of upgrades/patches/fixes of potential issues of packages during the ZHF for the current release.

I would push to merge this before the freeze.

@emilazy
Copy link
Member

emilazy commented Sep 24, 2024

It was Alyssa’s idea to wait. It means that we will never ship a GCC 13 with warning flags inconsistent with upstream in a stable release, which seems good to me.

@alyssais alyssais added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 25, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 25, 2024
@emilazy
Copy link
Member

emilazy commented Nov 10, 2024

I’m ready to merge this when you are.

We wanted to update GCC to 14.  We were okay with fixing all the new
errors, but ultimately it had to be rolled back due to stability
issues.

We don't know at what point in the 25.05 release cycle the next
release will come out, so let's get ready by taking care of the new
errors in advance.  Once GCC 14 is the default, this should be
reverted.

Source: https://gcc.gnu.org/gcc-14/porting_to.html
@alyssais alyssais marked this pull request as ready for review November 10, 2024 10:18
@alyssais alyssais marked this pull request as draft November 10, 2024 12:39
@emilazy
Copy link
Member

emilazy commented Nov 10, 2024

(This doesn’t work, so we shouldn’t merge it yet. It adds the flags to gcc13 but not gcc.)

emilazy added a commit to emilazy/nixpkgs that referenced this pull request Nov 16, 2024
Let’s make sure both OSes get an adequate amount of compiler fun this
cycle! This is a version of alyssais’s
<NixOS#344239> that applies to the Linux
standard environment’s compiler wrapping rather than the versioned GCC
packages themselves.

This is purely a transition mechanism to help us prepare for the GCC
14 update while GCC 14 itself is not yet ready for wide deployment;
it will be reverted before 25.05, whether because it becomes obsolete
thanks to an upgrade to GCC 14 or because we give up on GCC 14 and
deicde to stick with GCC 13 with the vanilla flags.

This approach means that the standard `gcc` will be wrapped correctly,
unlike with the previous PR, achieving the primary goal of the change,
but `gcc13` will remain as it was before. Currently, I believe
the difference between the two is just bootstrapping stage stuff;
it’s a bit weird to me to diverge, especially since there is a
definition of `gcc` in `all-packages.nix` that looks like it ought
to make them equivalent, but it may have the nice property that we
can pin especially stubborn packages to GCC 13 without them getting
the errors (though I am not sure if this is actually true or not,
since I’m not sure how `gcc13Stdenv` actually works).

One downside is that this only applies to Linux, but since this is
essentially meant to be a forcing function to get us to deal with
the errors early, that seems fine.

Source: https://gcc.gnu.org/gcc-14/porting_to.html
Co-authored-by: Alyssa Ross <[email protected]>
@emilazy
Copy link
Member

emilazy commented Nov 17, 2024

I tried to fix this in #356545, and have now given up and opened #356812.

@emilazy
Copy link
Member

emilazy commented Nov 21, 2024

Closing in favour of #356812.

@emilazy emilazy closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants