Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv: use gcc11 for riscv #170991

Merged
merged 1 commit into from
May 2, 2022
Merged

stdenv: use gcc11 for riscv #170991

merged 1 commit into from
May 2, 2022

Conversation

NickCao
Copy link
Member

@NickCao NickCao commented Apr 30, 2022

Description of changes

An increasing number of riscv packages are requiring gcc11 to build likely due to the binutils update to 2.38. And I'm seeing little regression with this change on my hydra apart from gccForLibs which looks like a upstream issue.
ref: #168826

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.05 Release Notes (or backporting 21.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@NickCao
Copy link
Member Author

NickCao commented Apr 30, 2022

For the gcc issue: see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
Edit: should be fixed by #170121

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Apr 30, 2022
@Madouura Madouura mentioned this pull request Apr 30, 2022
14 tasks
Copy link
Contributor

@Madouura Madouura left a comment

Choose a reason for hiding this comment

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

Considering it's the same change I am using in my PR, and I have a working riscv64 system on hardware with this change, I'd have to say LGTM.

@r-burns
Copy link
Contributor

r-burns commented May 1, 2022

To be honest I think the original gcc 10 -> 11 bump should have just changed it to else 11 instead of adding yet another special case.

@NickCao
Copy link
Member Author

NickCao commented May 1, 2022

To be honest I think the original gcc 10 -> 11 bump should have just changed it to else 11 instead of adding yet another special case.

What's the situation now for gcc11 on aarch64?

@r-burns
Copy link
Contributor

r-burns commented May 1, 2022

Not sure, don't have aarch64 hardware but I'll request access to the community builder. Would be great to get all our tier 1-3 platforms on the same gcc version.

@fabianhjr
Copy link
Member

What's the situation now for gcc11 on aarch64?

aarch64-linux is borked on gcc10 and gcc11 afaik and it was recently tested. (Silghtly after the proposed 10 → 11 for x86_64-linux)

Though, no aarch64 hardware on my end.

@fabianhjr
Copy link
Member

fabianhjr commented May 1, 2022

Not sure, don't have aarch64 hardware but I'll request access to the community builder. Would be great to get all our tier 1-3 platforms on the same gcc version.

To be honest I think the original gcc 10 -> 11 bump should have just changed it to else 11 instead of adding yet another special case.

I was hoping other contributors in other platforms would help with those bumps since there was risk of breakage on platforms I didn't have access to nor would have been able to help with. (mainly tier2, x86_64-darwin and aarch64-{darwin,linux}).

Here is the current RFC0046 tiers 1-3:

Tier 1

  • x86_64-linux, gcc+glibc

Tier 2

  • aarch64-linux, gcc+glibc
  • x86_64-darwin, clang+Darwin/macOS

Tier 3

  • i686-linux, gcc+glibc — ofBorg builds via pkgsi686Linux, binary cache contains wine dependencies
  • armv{6,7,8}*-linux, gcc+glibc
  • armv{6,7,8}*-linux, gcc+glibc, cross-compilation
  • aarch64-linux, gcc+glibc, cross-compilation
  • mipsel-linux, gcc+glibc
  • x86_64-linux, gcc+musl

Need testing/bump to gcc11:

  • aarch64-linux, gcc+glibc
  • aarch64-linux, gcc+glibc, cross-compilation
  • i686-linux, gcc+glibc
  • armv{6,7,8}*-linux, gcc+glibc
  • armv{6,7,8}*-linux, gcc+glibc, cross-compilation
  • mipsel-linux, gcc+glibc

@tpwrules
Copy link
Contributor

tpwrules commented May 1, 2022

This is the PR about gcc11 on aarch64: #167726

This is the latest effort and problem I know about, but I'm not knowledgeable enough to try and fix it. I have fairly powerful aarch64 hardware, so if someone wants me to test a fix I would be happy to. I am very in favor of everything being on gcc11.

@vcunat
Copy link
Member

vcunat commented May 1, 2022

Also, (a dependency of) wine won't build if the default is switched.

@Madouura
Copy link
Contributor

Madouura commented May 1, 2022

Also, (a dependency of) wine won't build if the default is switched.

I think we may want to treat that as a special case and use GCC 10 in the all-packages.nix entry, or devise a patch per-case for cases like that.

@vcunat
Copy link
Member

vcunat commented May 1, 2022

Perhaps. The difference is in platforms that noone's tried yet (and specified explicitly there). No idea if the change will help them or harm them. I'd probably leave the default be for 22.05 for those reasons.

@Madouura
Copy link
Contributor

Madouura commented May 1, 2022

I agree, 22.05 is meant to be stable, and is already too late-stage for a change in default stdenv for tier-1 platforms, no reason to fix what's not broken for a release.
For future releases though, I do think it would be appropriate to default to GCC 11, or perhaps 12 if it's out by then.

@trofi
Copy link
Contributor

trofi commented May 1, 2022

If wine build breakage is related to mingw32-gcc patchset then proposed #171147 should fix it.

@vcunat vcunat merged commit 8451a80 into NixOS:master May 2, 2022
@NickCao NickCao deleted the stdenv-riscv branch May 3, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants