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

[staging-next] stdenvBootstrapTools: fix cycle on aarch64-darwin #196909

Merged
merged 1 commit into from
Nov 5, 2022

Conversation

stephank
Copy link
Contributor

@stephank stephank commented Oct 20, 2022

Description of changes

This fixes the issue highlighted in: #186575 (comment)

There were actually two culprits:

  • compiler-rt: build builtins on darwin #186575 uses helpers from trivial-builders.nix to write shell scripts for xcbuild.xcrun, but those rely on runtimeShell which is apparently not possible at this stage. (I guess they create a dependency on the final stdenv, instead of whatever stdenv stage is part of bootstrap-tools?)
  • Migrate from glibc's libcrypt to libxcrypt #181764 adds a dependency on libxcrypt to LLVM compiler-rt, but I believe this should be glibc specific. I changed the conditions to reflect this.

I only tested evaluation of {aarch64,x86_64}-darwin.

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.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Oct 20, 2022
@ofborg ofborg bot added the 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild label Oct 20, 2022
@ofborg ofborg bot requested review from 7c6f434c, dtzWill, lovek323 and primeos October 20, 2022 11:17
@vcunat vcunat changed the base branch from staging-next to staging October 20, 2022 13:07
@vcunat
Copy link
Member

vcunat commented Oct 20, 2022

Retargeted due to too many rebuilds on darwin.

@stephank
Copy link
Contributor Author

stephank commented Nov 3, 2022

Ping! I was told this issue would block a 22.11 release channel for Darwin. In that case, we may have only a couple staging-next cycles left to merge this?

@mweinelt
Copy link
Member

mweinelt commented Nov 3, 2022

I approve of the compiler-rt changes, no clue about everything else.

@vcunat vcunat merged commit b33eacb into NixOS:staging Nov 5, 2022
@stephank stephank deleted the fix/darwin-eval branch November 5, 2022 15:38
@rrbutani rrbutani mentioned this pull request Nov 7, 2022
92 tasks
@vcunat
Copy link
Member

vcunat commented Nov 10, 2022

The error message changed, but it's still failing on Hydra:
https://hydra.nixos.org/build/197835103

@stephank
Copy link
Contributor Author

I'm away for a few more days, but I appear to have broken it in #185766 by introducing otool.

rrbutani added a commit to rrbutani/nixpkgs that referenced this pull request Dec 14, 2022
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
rrbutani added a commit to rrbutani/nixpkgs that referenced this pull request Jan 8, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
ElvishJerricco pushed a commit to ElvishJerricco/nixpkgs that referenced this pull request Jan 8, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
rrbutani added a commit to rrbutani/nixpkgs that referenced this pull request Jan 10, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
rrbutani added a commit to rrbutani/nixpkgs that referenced this pull request Jan 27, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
rrbutani added a commit to rrbutani/nixpkgs that referenced this pull request Jan 27, 2023
…= "glibc"`

This restores this check to what it originally was in NixOS#196909 (see:
NixOS#196909 (comment)) and
lets `compiler-rt` eval successfully when trying to compile the
`llvmPackages_15` set for mingw targets (i.e. a platform that *is* GNU
but does *not* use glibc).

---

It's not clear to me what the `haveLibc` check is doing here (platforms
that seem to use glibc like `x86_64-linux` and have
`plat.libc == "glibc"` have `haveLibc = false` because `stdenv.cc.libc`
is `null`).
github-actions bot pushed a commit that referenced this pull request Jan 28, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change

(cherry picked from commit 3b6d98d)
github-actions bot pushed a commit that referenced this pull request Jan 28, 2023
…= "glibc"`

This restores this check to what it originally was in #196909 (see:
#196909 (comment)) and
lets `compiler-rt` eval successfully when trying to compile the
`llvmPackages_15` set for mingw targets (i.e. a platform that *is* GNU
but does *not* use glibc).

---

It's not clear to me what the `haveLibc` check is doing here (platforms
that seem to use glibc like `x86_64-linux` and have
`plat.libc == "glibc"` have `haveLibc = false` because `stdenv.cc.libc`
is `null`).

(cherry picked from commit d729907)
K900 pushed a commit that referenced this pull request Jan 28, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
K900 pushed a commit that referenced this pull request Jan 28, 2023
…= "glibc"`

This restores this check to what it originally was in #196909 (see:
#196909 (comment)) and
lets `compiler-rt` eval successfully when trying to compile the
`llvmPackages_15` set for mingw targets (i.e. a platform that *is* GNU
but does *not* use glibc).

---

It's not clear to me what the `haveLibc` check is doing here (platforms
that seem to use glibc like `x86_64-linux` and have
`plat.libc == "glibc"` have `haveLibc = false` because `stdenv.cc.libc`
is `null`).
xanderio pushed a commit to xanderio/nixpkgs that referenced this pull request Feb 13, 2023
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
xanderio pushed a commit to xanderio/nixpkgs that referenced this pull request Feb 13, 2023
…= "glibc"`

This restores this check to what it originally was in NixOS#196909 (see:
NixOS#196909 (comment)) and
lets `compiler-rt` eval successfully when trying to compile the
`llvmPackages_15` set for mingw targets (i.e. a platform that *is* GNU
but does *not* use glibc).

---

It's not clear to me what the `haveLibc` check is doing here (platforms
that seem to use glibc like `x86_64-linux` and have
`plat.libc == "glibc"` have `haveLibc = false` because `stdenv.cc.libc`
is `null`).
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.

4 participants