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

Linux bump default LLVM to 11 #142593

Merged
merged 8 commits into from
Feb 1, 2022
Merged

Linux bump default LLVM to 11 #142593

merged 8 commits into from
Feb 1, 2022

Conversation

toonn
Copy link
Contributor

@toonn toonn commented Oct 22, 2021

Motivation for this change

#126411 bumps the default version of LLVM for x86_64 Darwin, which is tied to the stdenv. This brings it in line with aarch64-darwin but takes it out of sync with the default LLVM for Linux. This is not ideal because fixes for one LLVM version could introduce failures for another version, which would require introducing branching on the LLVM version to resolve.

This PR builds on #126411 and is currently mostly to get a Hydra evaluation for Linux to see how much work bumping would take.

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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.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.

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 22, 2021
@alyssais
Copy link
Member

As we're working on this, I'd like to suggest that we send fixes straight to master/staging as their own PRs where doing so wouldn't break builds on LLVM 7. That should keep PRs small, and make things much easier to review.

@vcunat
Copy link
Member

vcunat commented Oct 22, 2021

https://hydra.nixos.org/eval/1715423

@toonn
Copy link
Contributor Author

toonn commented Oct 23, 2021

Looks like there's about 6-7k newly failing builds, this is the comparison I'm using. Looks like the cups patch I already got rid of is the main issue. I will rebase this on the Darwin bump as soon as 2 builds I'm running to check the changes finish.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-macos-monthly/12330/12

@toonn
Copy link
Contributor Author

toonn commented Dec 21, 2021

Just rebased on staging-next since all the release-related stuff has cooled down and the bump on Darwin seems to have gone into staging-next OK. Here's a new comparison.

@veprbl veprbl changed the base branch from staging-next to staging December 25, 2021 21:53
@sternenseemann sternenseemann marked this pull request as ready for review December 26, 2021 10:11
@sternenseemann
Copy link
Member

Seems like 400 potential new regressions compared to current master? https://hydra.nixos.org/eval/1732639?compare=trunk#tabs-now-fail

@toonn
Copy link
Contributor Author

toonn commented Dec 27, 2021

@sternenseemann, yep, what number of failures would be considered good enough? Should I rebase this on master or staging-next again to get a more recent comparison? The staging-next evaluation this one is based on has even more failures when compared to trunk.

@toonn
Copy link
Contributor Author

toonn commented Jan 11, 2022

So, in this staging-next comparison, from ~ two weeks ago, the main cause of failures seemed to be ispc. This has since been worked around in 981170a so I rebased the branch again.

How do we move this forward? Last comparison we had 23 newly introduced failures as compared to staging-next. Is the goal/requirement to introduce 0 new failures?

@vcunat
Copy link
Member

vcunat commented Jan 11, 2022

No, even staging-next -> master merges don't target zero regressions, though it's nice when they get very low. If it's like 23 and nothing important stands out, I think it's OK to merge to staging and a further round of reduction can be done during staging-next builds.

toonn added 3 commits January 17, 2022 13:29
Update the default LLVM version on Linux to stay synchronized with
Darwin, where LLVM is tied to the stdenv.
@toonn
Copy link
Contributor Author

toonn commented Jan 17, 2022

Ok, so this is the comparison for the previous evaluation.
The only thing that stands out to me is Blender. Which is still failing because of ispc, so I looked for the most recent evaluation where ispc succeeds and started a new evaluation to make sure.

This confirmed that I did indeed break ispc. Turns out when removing the LLVM 11 specific arguments I removed stdenv = llvmPackages_11.stdenv from the arguments for ispc. I was probably thinking about the darwin stdenv too much, which does use LLVM. The next evaluation should have even fewer failures 🤞.

@toonn
Copy link
Contributor Author

toonn commented Jan 24, 2022

The ispc failure (and Blender) is fixed now. Zcash was also using an LLVM stdenv but seems to work fine with a GNU stdenv so I'm not sure that's still necessary? @vcunat was so kind as to check that webkitgtk_4_1 does indeed build, I'm not sure why it failed on Hydra (OOM?).

I believe this means there's no more serious failures so this is ready for review/testing.

@toonn
Copy link
Contributor Author

toonn commented Jan 25, 2022

@alyssais, @sternenseemann, @vcunat, I believe this is ready for review.

Copy link
Member

@sternenseemann sternenseemann left a comment

Choose a reason for hiding this comment

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

Haven't checked if relying on the default version in all cases is wise (depends on the package), but probably doesn't matter in the grand scheme of things (every default LLVM update will need careful checking for regressions).

@toonn
Copy link
Contributor Author

toonn commented Jan 29, 2022

My motivation for using the default is an assumption that most things that explicitly specify LLVM 11 probably do so because the default isn't recent enough.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

According to the hydra eval, most failures are related to the recent python310 bump

# nix-review-tool output
x86_64-linux python3.10-unittest2-1.1.0 | 91
x86_64-linux python3.10-debugpy-1.5.1 | 58
x86_64-linux python3.10-imagecodecs-lite-2019.12.3 | 29
x86_64-linux python3.10-eventlet-0.33.0 | 27
x86_64-linux sybil-2.0.1 | 19
x86_64-linux python3.10-pytest-4.6.11 | 18
x86_64-linux python3.10-semver-2.13.0 | 17
x86_64-linux python3.9-pygame-2.1.0 | 14
x86_64-linux python3.10-tensorflow-tensorboard-2.6.0 | 12
x86_64-linux webkitgtk-2.34.3 | 11
x86_64-linux python3.10-mpi4py-3.0.3 | 9
x86_64-linux python3.10-commoncode-30.0.0 | 9
x86_64-linux python3.10-sanic-21.9.3 | 9
x86_64-linux python3.10-cssutils-2.3.0 | 8
x86_64-linux python3.10-unicodedata2-13.0.0-2 | 7
x86_64-linux python3.10-mocket-3.10.3 | 7

Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

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

Current comparison against trunk looks very good indeed.

@mweinelt mweinelt merged commit 184d6ba into NixOS:staging Feb 1, 2022
@toonn
Copy link
Contributor Author

toonn commented Feb 2, 2022

Thanks, @jonringer and @mweinelt!

@Atemu Atemu mentioned this pull request Mar 30, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants