Skip to content

gcc: gcc13 -> gcc14 (again)#356812

Merged
emilazy merged 2 commits intoNixOS:stagingfrom
emilazy:push-vyzxtxmumwyl
Nov 20, 2024
Merged

gcc: gcc13 -> gcc14 (again)#356812
emilazy merged 2 commits intoNixOS:stagingfrom
emilazy:push-vyzxtxmumwyl

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Nov 17, 2024

Here we go again…

The stable release has too many AArch64 issues, but they seem to have been fixed upstream; Arch is shipping a Git snapshot. The next stable release should be out by the time 25.05 is finishing up, so this should be okay as a temporary solution.

This is the GCC 14-20241116 snapshot. We use that identifier as our package version, diverging from our usual unstable version convention, because it identifies itself as “gcc (GCC) 14.2.1 20241116” and comes in gcc-14-20241116.tar.xz; 20241116 is therefore a useful version identifier to use verbatim, and 14.2.0-unstable-2024-11-16 would potentially be confusing for a version that calls itself 14.2.1. The next stable release from the GCC 14 branch will be 14.3.0, so there should be no ambiguity here.

Getting this version is a little complicated; we need the precompiled flex(1) output that these Git snapshots don’t include. Thankfully, the source file hasn’t changed since 14.2.0, so we can simply download 14.2.0 too and extract the precompiled file. A little merging finesse is required for the aarch64-darwin patch, which we also upgrade.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@emilazy emilazy requested a review from a team November 17, 2024 21:29
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Nov 17, 2024
@emilazy
Copy link
Member Author

emilazy commented Nov 17, 2024

#356545 turned out to be too hard, so I think this is the best way forward.

@ofborg ofborg bot added 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 18, 2024
The stable release has too many AArch64 issues, but they seem to
have been fixed upstream; Arch is shipping a Git snapshot. The next
stable release should be out by the time 25.05 is finishing up,
so this should be okay as a temporary solution.

This is the GCC 14-20241116 snapshot. We use that identifier as our
package version, diverging from our usual unstable version convention,
because it identifies itself as “gcc (GCC) 14.2.1 20241116” and
comes in `gcc-14-20241116.tar.xz`; 20241116 is therefore a useful
version identifier to use verbatim, and 14.2.0-unstable-2024-11-16
would potentially be confusing for a version that calls itself
14.2.1. The next stable release from the GCC 14 branch will be 14.3.0,
so there should be no ambiguity here.

Getting this version is a little complicated; we need the precompiled
`flex(1)` output that these Git snapshots don’t include. Thankfully,
the source file hasn’t changed since 14.2.0, so we can simply
download 14.2.0 too and extract the precompiled file. A little
merging finesse is required for the `aarch64-darwin` patch, which we
also upgrade.
Here we go again…
@emilazy emilazy merged commit abae804 into NixOS:staging Nov 20, 2024
@emilazy emilazy deleted the push-vyzxtxmumwyl branch November 20, 2024 02:02
@FliegendeWurst
Copy link
Member

I am getting a build failure on libsForQt5.kcoreaddons, but it looks like the error is actually in the c++ implementation provided by gcc:

In file included from /nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/string_view:904,
                 from /nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/bits/basic_string.h:47,
                 from /nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/string:54,
                 from /nix/store/xs5bzsmd96jkjqb4h6fjrvbzwaagx1ik-qtbase-5.15.15-dev/include/QtCore/qbytearray.h:52,
                 from /nix/store/xs5bzsmd96jkjqb4h6fjrvbzwaagx1ik-qtbase-5.15.15-dev/include/QtCore/qstring.h:50,
                 from /nix/store/xs5bzsmd96jkjqb4h6fjrvbzwaagx1ik-qtbase-5.15.15-dev/include/QtCore/qobject.h:47,
                 from /nix/store/xs5bzsmd96jkjqb4h6fjrvbzwaagx1ik-qtbase-5.15.15-dev/include/QtCore/QObject:1,
                 from /build/kcoreaddons-5.116.0/src/lib/jobs/kjob.h:14,
                 from /build/kcoreaddons-5.116.0/src/lib/jobs/kcompositejob.h:13,
                 from /build/kcoreaddons-5.116.0/src/lib/jobs/kcompositejob.cpp:9:
/nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/bits/string_view.tcc: In member function 'constexpr std::basic_string_view<_CharT, _Traits>::size_type std::basic_string_view<_CharT, _Traits>::rfind(_CharT, size>
/nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/bits/string_view.tcc:119:7: error: '__glibcxx_enable_shared_from_this' was not declared in this scope
  119 |       size_type __size = this->_M_len;
      |       ^~~~~~~~~
/nix/store/m6dp9bprckv06z6lha0q8glzi8gbfrzz-gcc-14-20241116/include/c++/14-20241116/bits/string_view.tcc:120:11: error: '__size' was not declared in this scope; did you mean 'size'?
  120 |       if (__size > 0)
      |           ^~~~~~
      |           size

Do you agree?

@emilazy
Copy link
Member Author

emilazy commented Nov 21, 2024

I am not sure, but I suspect the error is likely an unhelpful one pointing to a problem in the KDE code; that file hasn’t changed substantially in years. It could be this commit but that seems to only relate to warnings, not errors.

@FliegendeWurst
Copy link
Member

FliegendeWurst commented Nov 22, 2024

I've found another regression. The default boost version (1.81) does not compile with GCC 14 when using cstdfloat_limits.hpp.

See boostorg/math#992, it is fixed in 1.85 (boostorg/math@b3a21bc).

By the way, the kcoreaddons failure did not appear when building again..

@emilazy
Copy link
Member Author

emilazy commented Nov 22, 2024

Perhaps it is time to bump our default Boost version, then? Though we should also probably backport the patch.

@emilazy
Copy link
Member Author

emilazy commented Nov 22, 2024

#356102

@thunze thunze mentioned this pull request Jun 14, 2025
13 tasks
@thunze thunze mentioned this pull request Jun 15, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants