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
darwin stdenv can't bootstrap on macOS 11.0 Big Sur #104580
Comments
These changes are enough to work around this and link against a tbd libSystem in the first bootstrap stages, however using fetchurl for github archives is not stable so we'll need a separate release archive for this. https://gist.github.com/LnL7/a17a042dd21258b957279637bb6be627 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/is-there-a-plan-that-nix-can-bootstrap-itself-on-macos-big-sur/10043/2 |
There's another issue in stage2 with |
For what it's worth, those referenced files do exist on Big Sur. Still not good for purity though. |
As I misread what it was symlinking. |
@LnL7 on a clean install of Big Sur 11.0.1 on x86_64 I installed nix, cloned nixpkgs master, applied your patch and used it to try and build ICU using |
We've added an archive for tagged releases via github actions (NixOS/darwin-stubs#4). We should add any missing libraries and tag a release to make the tarball available. |
can anyone please elaborate on how to workaround this? |
@edude03 @KolesnichenkoDS Unless you're building staging or another mass rebuild this issue won't be relevant to your problem. |
@LnL7: I am using nix-shell for my Python projects, pinned to latest nixos-20.09 and master of https://github.com/nix-community/poetry2nix. I am definitely affected by this because some Python packages come with C extensions that need to be compiled. Most of the time nix-shell building fails on my Big Sur and I have to wait for our CI (still on Catalina) to build and upload derivations to cache. Example dump
|
That error has nothing to do with the issue described here, firstly none of the initial compatibility changes have been backported to 20.09. Secondly if it doesn't work on master either there's a good chance this is something something specific to upstream python or the python infrastructure. In that case please report it in a separate issue. |
Is there a workaround for those looking to build staging on Big Sur specifically for flake support? Or is it more worth it to just downgrade or copy the cache over for now? |
Running into |
@jerbaroo No, that's not an stdenv build. |
Hey @LnL7, I've prepared a minimal Running
full dump
Should I move this to a new issue? If yes, to which repo, https://github.com/nixOS/nixpkgs, https://github.com/LnL7/nix-darwin or https://github.com/nix-community/poetry2nix? Finally, thank you for all your hard work keeping Nix running on Macs! Update: actually, let me test against master first |
@zupo Opening a PR to the |
Is this now resolved by the merge of #107013? |
I tried pinning https://github.com/niteoweb/big-sur-poetry-test to latest nixos-20.09 commit ( log
|
Maybe related: #104150 (review).
It also shows following errors:
|
I just ran into something similar so I thought I'd comment: Apple removed the /usr/lib/libc.dylib from disk on macOS Big Sur and only has it available in the linker cache now. This was the patch that fixed it for Python: https://bugs.python.org/issue41100 |
I believe it is. I'll tentatively close this issue since the exact bug that it represents has been fixed. I don't mean to cut off the conversation, and if there are still bootstrapping problems on Big Sur with For the python ctypes issue, there's a ticket for tracking that at #105038 |
@thefloweringash @LnL7 I see this was closed as fixed, but I'm still seeing issues (on a fresh Big Sur 11.4 install) with Am I missing some work-around?
|
Niv is likely pinning an older version of nixpkgs without this issue fixed
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: ldeck ***@***.***>
Sent: Tuesday, July 6, 2021 1:06:38 PM
To: NixOS/nixpkgs ***@***.***>
Cc: Michael Francis ***@***.***>; Mention ***@***.***>
Subject: Re: [NixOS/nixpkgs] darwin stdenv can't bootstrap on macOS 11.0 Big Sur (#104580)
@thefloweringash<https://github.com/thefloweringash> @LnL7<https://github.com/LnL7> I see this was closed as fixed, but I'm still seeing issues (on a fresh Big Sur 11.4 install) with ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
Am I missing some work-around?
% nix-shell --run "niv update"
...
building '/nix/store/nh146kfyhf0lra9nry12z2n44m59zszg-niv-0.2.18.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/s6mfg7bn91sh22pkqsqj2246wrl52v4b-ghc-8.8.4.
unpacking sources
unpacking source archive /nix/store/gayb02fj8nss712krr1j798ynxxxldvc-niv-0.2.18.tar.gz
source root is niv-0.2.18
setting SOURCE_DATE_EPOCH to timestamp 1600342311 of file niv-0.2.18/src/Niv/Update/Test.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-niv-0.2.18.drv-0/setup-package.conf.d -j16 -threaded -rtsopts
[1 of 1] Compiling Main ( Setup.hs, /private/tmp/nix-build-niv-0.2.18.drv-0/Main.o )
Linking Setup ...
ld: warning: passed two min versions (10.12.0, 10.12) for platform macOS. Using 10.12.
ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)
builder for '/nix/store/nh146kfyhf0lra9nry12z2n44m59zszg-niv-0.2.18.drv' failed with exit code 1
error: build of '/nix/store/nh146kfyhf0lra9nry12z2n44m59zszg-niv-0.2.18.drv' failed
nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
/nix/store/xycwyp06s3hjafaiplh1f87jsn36mwps-nix-info
/nix/store/yca7h9lyacs16sk44jsw987jhrdqsdmr-DarwinTools-1
copying path '/nix/store/yca7h9lyacs16sk44jsw987jhrdqsdmr-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/xycwyp06s3hjafaiplh1f87jsn36mwps-nix-info' from 'https://cache.nixos.org'...
- system: `"x86_64-darwin"`
- host os: `Darwin 20.5.0, macOS 10.16`
- multi-user?: `no`
- sandbox: `no`
- version: `nix-env (Nix) 2.3.12`
- channels(ldeck): `"nixpkgs-21.11pre300283.f930ea227ce"`
- nixpkgs: `/Users/ldeck/.nix-defexpr/channels/nixpkgs`
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#104580 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AADYXE5VOHZ65DRLYQRYIY3TWMZZ5ANCNFSM4T6L6LRA>.
|
Initial support for builds on Big Sur was added in #98541 but the initial bootstrapping stages in the stdenv still link against the libSystem library that's part of bootstrap tools. This means builds depend on having a cached stdenv built by 11.15 or earlier available.
To Reproduce
On macOS 11.0 run
The text was updated successfully, but these errors were encountered: