NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.19k stars 14.2k forks source link

darwin stdenv can't bootstrap on macOS 11.0 Big Sur #104580

Closed LnL7 closed 3 years ago

LnL7 commented 3 years ago

Initial support for builds on Big Sur was added in https://github.com/NixOS/nixpkgs/pull/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.

checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking whether the C compiler works... no
configure: error: in `/private/tmp/nix-build-ICU-osx-10.10.5.drv-7/ICU-531.48/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
./runConfigureICU: ./configure failed
make: *** [makefile:964: /private/tmp/nix-build-ICU-osx-10.10.5.drv-7/ICU-531.48/build/Makefile] Error 1
configure:2913: checking whether the C compiler works
configure:2935: cc -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR="\"/usr/share/icu/\""   -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden   -O2  -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=1070    conftest.c  >&5
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)

To Reproduce

On macOS 11.0 run

nix-build -A stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.darwin.ICU
nix-build -A stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.darwin.ICU --check
LnL7 commented 3 years ago

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

nixos-discourse commented 3 years ago

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

LnL7 commented 3 years ago

There's another issue in stage2 with Security/boot.nix which gets referenced by configd.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix#L18-L19

thefloweringash commented 3 years ago

There's another issue in stage2 with Security/boot.nix which gets referenced by configd.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix#L18-L19

For what it's worth, those referenced files do exist on Big Sur. Still not good for purity though.

LnL7 commented 3 years ago

As I misread what it was symlinking.

edude03 commented 3 years ago

@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 -I nixpkgs=/path/to/patched/nixpkgs but I'm still running into this issue. Is that expected?

thefloweringash commented 3 years ago

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.

We've added an archive for tagged releases via github actions (https://github.com/NixOS/darwin-stubs/pull/4). We should add any missing libraries and tag a release to make the tarball available.

zkbpkp commented 3 years ago

can anyone please elaborate on how to workaround this? i tried the same thing @edude03 described and it didn't work for me too i also tried switching to staging/unstable channels and that didn't work either is there a workaround except downgrading to catalina for now?

LnL7 commented 3 years ago

@edude03 @KolesnichenkoDS Unless you're building staging or another mass rebuild this issue won't be relevant to your problem.

zupo commented 3 years ago

@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 ``` Building wheel for multidict (setup.py) ... error ERROR: Command errored out with exit status 1: command: /nix/store/jqbzpkrw7iwnr8nh4lzrjfykymhyq9hi-python3-3.8.5/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/nix-build-python3.8-multidict-5.0.0.drv-0/pip-req-build-4w_kocjt/setup.py'"'"'; __file__='"'"'/private/tmp/nix-build-python3.8-multidict-5.0.0.drv-0/pip-req-build-4w_kocjt/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/nix-build-python3.8-multidict-5.0.0.drv-0/pip-wheel-hc1b158q cwd: /private/tmp/nix-build-python3.8-multidict-5.0.0.drv-0/pip-req-build-4w_kocjt/ Complete output (69 lines): ********************** * Accellerated build * ********************** running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.6-x86_64-3.8 creating build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/_multidict_py.py -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/_abc.py -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/__init__.py -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/_multidict_base.py -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/_compat.py -> build/lib.macosx-10.6-x86_64-3.8/multidict running egg_info writing multidict.egg-info/PKG-INFO writing dependency_links to multidict.egg-info/dependency_links.txt writing top-level names to multidict.egg-info/top_level.txt reading manifest file 'multidict.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files found matching 'multidict/_multidict.html' warning: no previously-included files found matching 'multidict/*.so' warning: no previously-included files found matching 'multidict/*.pyd' warning: no previously-included files found matching 'multidict/*.pyd' no previously-included directories found matching 'docs/_build' writing manifest file 'multidict.egg-info/SOURCES.txt' copying multidict/__init__.pyi -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/_multidict.c -> build/lib.macosx-10.6-x86_64-3.8/multidict copying multidict/py.typed -> build/lib.macosx-10.6-x86_64-3.8/multidict creating build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/defs.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/dict.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/istr.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/iter.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/pair_list.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib copying multidict/_multilib/views.h -> build/lib.macosx-10.6-x86_64-3.8/multidict/_multilib running build_ext building 'multidict._multidict' extension creating build/temp.macosx-10.6-x86_64-3.8 creating build/temp.macosx-10.6-x86_64-3.8/multidict clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/jqbzpkrw7iwnr8nh4lzrjfykymhyq9hi-python3-3.8.5/include/python3.8 -c multidict/_multidict.c -o build/temp.macosx-10.6-x86_64-3.8/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] clang -bundle -undefined dynamic_lookup -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib build/temp.macosx-10.6-x86_64-3.8/multidict/_multidict.o -L/nix/store/jqbzpkrw7iwnr8nh4lzrjfykymhyq9hi-python3-3.8.5/lib -o build/lib.macosx-10.6-x86_64-3.8/multidict/_multidict.cpython-38-darwin.so ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1g/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib' 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) error: command 'clang' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for multidict ```
LnL7 commented 3 years ago

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.

remi-gelinas commented 3 years ago

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?

jerbaroo commented 3 years ago

Running into ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64 here, is this the same issue?

LnL7 commented 3 years ago

@jerbaroo No, that's not an stdenv build.

zupo commented 3 years ago

Hey @LnL7, I've prepared a minimal shell.nix with a Poetry-based Python environment that showcases the problem I have: https://github.com/niteoweb/big-sur-poetry-test

Running nix-shell in this test repo:

full dump ``` ➜ big-sur-poetry-test git:(main) ✗ nix-shell these derivations will be built: /nix/store/20hcj04mgb8z8z13w2z810nrxrv6a0sd-coreutils-8.31.drv /nix/store/visd0f4x0dfrzh5pix31j4imzqi4yhv2-openssl-1.1.1i.drv /nix/store/4isfj8x4pjk9dars93y0hqjmwpinvj1p-nghttp2-1.41.0.drv /nix/store/v4qa1dm72qmfk1zz4yfjsakx3z8gg6q2-libssh2-1.9.0.drv /nix/store/56bl8il7kzh8qy5p7a5hn2d82pdaxpf8-curl-7.74.0.drv /nix/store/kdlaj6mzji9cpmqlh8pifk2jji6dh9zf-mirrors-list.drv /nix/store/cfamfb2j5np1dm2ql8rrydj3ifh5l8xp-psutil-5.8.0.tar.gz.drv /nix/store/di45klx5x9gg08qz7wlnrawgmim9r9hb-builder.pl.drv /nix/store/rlpg5rsdvdsmfyg416cc9pacrw0zvshs-python3.8-psutil-5.8.0.drv /nix/store/hxk1287cw4kriz692233mrjdffx62yn9-python3-3.8.5-env.drv these paths will be fetched (57.45 MiB download, 193.07 MiB unpacked): /nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools /nix/store/37izqb2hkl6hkkzmy1wavhksmidp0j68-openssl-1.1.1i /nix/store/4i4mbi6gyilm62vj0kxasy7cmw8c5dzg-bootstrap-stage3-binutils-wrapper- /nix/store/4lzc3ww4ychns7xdpx1almfmlzg5cv2n-expand-response-params /nix/store/5203gm0m1s3jk4nzr78w18i9hily5mvj-libxml2-2.9.10 /nix/store/6p0fj0mf1mmcdl140p326m63drrq6ir5-pip-build-hook.sh /nix/store/79vvclchw1d1i4qa3zg6qyhvd3p8vp7l-libssh2-1.9.0 /nix/store/7nik2w4x628l7m7jh9rzkkf4hhdnf3sm-hook /nix/store/7yjb5kcnlrha9cjp4q77qbzl46qd646c-fixup-hook.sh /nix/store/9h92gyn9a2d61yz1gvw8gx4nfqrjvx4x-swift-corefoundation /nix/store/a6gqbyaxzd91mz9snl5f83f55pij5qgh-stdenv-darwin /nix/store/aahj38cir7776m69k69ki4r6lfiwixb7-curl-7.74.0.tar.bz2 /nix/store/arhdawk39c48pfh663wka9f301by4v0f-hook /nix/store/blv5xmwps8mmbbgd6wrcg8vlrlvp0adp-python-recompile-bytecode-hook /nix/store/bpzbb024gbi1arlxmc80rp7fvjdvkia3-libev-4.33 /nix/store/c289f30an35yp2mj1b4i3ffhldfviy50-python-catch-conflicts-hook /nix/store/f18m26x5d7xywdx12ni631j79d5k1kjw-perl-5.32.0 /nix/store/f3f6fzdi59rqrclnfik3vzq33i1an2x0-python3.8-setuptools_scm-4.1.2 /nix/store/fmvjni9mbba8v2ixaxdz19fij8fbya1d-xz-5.2.5-bin /nix/store/fwq6c962lrnx8al2r9aqdqskprhqqvw5-nghttp2-1.41.0.tar.bz2 /nix/store/gz5mznlkshaifgp4wwyip8dqy2jzdzwi-python-namespaces-hook.sh /nix/store/h3f0zl7zjgf9741alzm1cq75ma970rfm-pkg-config-0.29.2 /nix/store/hik1ncyfcprr8108vba67myw18nhlxrs-openssl-1.1.1i.tar.gz /nix/store/i1hay70lgwydg7wwh6h6la4r3kis4k74-libkrb5-1.18 /nix/store/iddks9pzzsvarxgs0g8s0lx55vxwhrf7-bootstrap-stage3-clang-wrapper- /nix/store/ixa7ljbrdv81qnxgxqwhd26vbfk65d4z-zlib-1.2.11 /nix/store/kbp52dlzaxf3l2drhzk715y3cbh8jg4c-pkg-config-wrapper-0.29.2 /nix/store/l32pamj51f1v6b6vmqd3rgmcpg2bnnbg-coreutils-8.31.tar.xz /nix/store/lcqp8qpz5l69v293yfwa2l910grdz1ij-python-imports-check-hook.sh /nix/store/li772ck934jsvqlnw6j765j57kf46z2m-c-ares-1.15.0 /nix/store/md2gdihqwsyiyfvpvqs9q0xks20vw4di-ICU-osx-10.10.5 /nix/store/mg8rm13dx2bl00nx9i43xzmfr5n81sf2-libssh2-1.9.0.tar.gz /nix/store/p7xympcmjynp7yjv82shbgyb5irg0a8m-nghttp2-1.41.0-lib /nix/store/pq30g5z5w49vjnagwd4xp4fmaw78b1k4-hook /nix/store/pyywr1521pp89a013qqcbi9p58s59v85-pip-install-hook /nix/store/q8rw9q2jsijh5413ja5krycqnfdf6q8f-hook /nix/store/rc8rva2adbgvgcjnzf4fbsjbjl604cwb-bootstrap-stage3-stdenv-darwin /nix/store/slh3ygpd3sm8ym8xxr5czzl69fh91kkj-python-remove-tests-dir-hook /nix/store/sw38s28vb8v7f8anm9hxr24idg9qpbdm-curl-7.74.0 /nix/store/w2c46a7d928dn5av633dmg0k2lkghl3q-remove-path-dependencies.sh /nix/store/xp8vnq4v1dhx3xp2cajdx9kass3ap8lr-python-remove-bin-bytecode-hook /nix/store/xzx4za3j0vr4fs2282747p6ljhiw4wix-yj-4.0.0 /nix/store/yq5lf5q6wd8x9yk4lhnra8ikw48d32dc-xz-5.2.5 copying path '/nix/store/q8rw9q2jsijh5413ja5krycqnfdf6q8f-hook' from 'https://cache.nixos.org'... copying path '/nix/store/f18m26x5d7xywdx12ni631j79d5k1kjw-perl-5.32.0' from 'https://cache.nixos.org'... copying path '/nix/store/a6gqbyaxzd91mz9snl5f83f55pij5qgh-stdenv-darwin' from 'https://cache.nixos.org'... copying path '/nix/store/gz5mznlkshaifgp4wwyip8dqy2jzdzwi-python-namespaces-hook.sh' from 'https://cache.nixos.org'... copying path '/nix/store/7yjb5kcnlrha9cjp4q77qbzl46qd646c-fixup-hook.sh' from 'https://cache.nixos.org'... copying path '/nix/store/xp8vnq4v1dhx3xp2cajdx9kass3ap8lr-python-remove-bin-bytecode-hook' from 'https://cache.nixos.org'... copying path '/nix/store/slh3ygpd3sm8ym8xxr5czzl69fh91kkj-python-remove-tests-dir-hook' from 'https://cache.nixos.org'... copying path '/nix/store/xzx4za3j0vr4fs2282747p6ljhiw4wix-yj-4.0.0' from 'https://cache.nixos.org'... copying path '/nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools' from 'https://cache.nixos.org'... copying path '/nix/store/li772ck934jsvqlnw6j765j57kf46z2m-c-ares-1.15.0' from 'https://cache.nixos.org'... copying path '/nix/store/l32pamj51f1v6b6vmqd3rgmcpg2bnnbg-coreutils-8.31.tar.xz' from 'https://cache.nixos.org'... copying path '/nix/store/aahj38cir7776m69k69ki4r6lfiwixb7-curl-7.74.0.tar.bz2' from 'https://cache.nixos.org'... copying path '/nix/store/4lzc3ww4ychns7xdpx1almfmlzg5cv2n-expand-response-params' from 'https://cache.nixos.org'... copying path '/nix/store/arhdawk39c48pfh663wka9f301by4v0f-hook' from 'https://cache.nixos.org'... copying path '/nix/store/pq30g5z5w49vjnagwd4xp4fmaw78b1k4-hook' from 'https://cache.nixos.org'... copying path '/nix/store/bpzbb024gbi1arlxmc80rp7fvjdvkia3-libev-4.33' from 'https://cache.nixos.org'... copying path '/nix/store/7nik2w4x628l7m7jh9rzkkf4hhdnf3sm-hook' from 'https://cache.nixos.org'... copying path '/nix/store/mg8rm13dx2bl00nx9i43xzmfr5n81sf2-libssh2-1.9.0.tar.gz' from 'https://cache.nixos.org'... copying path '/nix/store/fwq6c962lrnx8al2r9aqdqskprhqqvw5-nghttp2-1.41.0.tar.bz2' from 'https://cache.nixos.org'... copying path '/nix/store/hik1ncyfcprr8108vba67myw18nhlxrs-openssl-1.1.1i.tar.gz' from 'https://cache.nixos.org'... copying path '/nix/store/6p0fj0mf1mmcdl140p326m63drrq6ir5-pip-build-hook.sh' from 'https://cache.nixos.org'... copying path '/nix/store/pyywr1521pp89a013qqcbi9p58s59v85-pip-install-hook' from 'https://cache.nixos.org'... copying path '/nix/store/h3f0zl7zjgf9741alzm1cq75ma970rfm-pkg-config-0.29.2' from 'https://cache.nixos.org'... copying path '/nix/store/c289f30an35yp2mj1b4i3ffhldfviy50-python-catch-conflicts-hook' from 'https://cache.nixos.org'... copying path '/nix/store/kbp52dlzaxf3l2drhzk715y3cbh8jg4c-pkg-config-wrapper-0.29.2' from 'https://cache.nixos.org'... copying path '/nix/store/lcqp8qpz5l69v293yfwa2l910grdz1ij-python-imports-check-hook.sh' from 'https://cache.nixos.org'... copying path '/nix/store/blv5xmwps8mmbbgd6wrcg8vlrlvp0adp-python-recompile-bytecode-hook' from 'https://cache.nixos.org'... copying path '/nix/store/f3f6fzdi59rqrclnfik3vzq33i1an2x0-python3.8-setuptools_scm-4.1.2' from 'https://cache.nixos.org'... copying path '/nix/store/w2c46a7d928dn5av633dmg0k2lkghl3q-remove-path-dependencies.sh' from 'https://cache.nixos.org'... building '/nix/store/di45klx5x9gg08qz7wlnrawgmim9r9hb-builder.pl.drv'... building '/nix/store/kdlaj6mzji9cpmqlh8pifk2jji6dh9zf-mirrors-list.drv'... copying path '/nix/store/md2gdihqwsyiyfvpvqs9q0xks20vw4di-ICU-osx-10.10.5' from 'https://cache.nixos.org'... copying path '/nix/store/4i4mbi6gyilm62vj0kxasy7cmw8c5dzg-bootstrap-stage3-binutils-wrapper-' from 'https://cache.nixos.org'... copying path '/nix/store/i1hay70lgwydg7wwh6h6la4r3kis4k74-libkrb5-1.18' from 'https://cache.nixos.org'... copying path '/nix/store/p7xympcmjynp7yjv82shbgyb5irg0a8m-nghttp2-1.41.0-lib' from 'https://cache.nixos.org'... copying path '/nix/store/37izqb2hkl6hkkzmy1wavhksmidp0j68-openssl-1.1.1i' from 'https://cache.nixos.org'... copying path '/nix/store/yq5lf5q6wd8x9yk4lhnra8ikw48d32dc-xz-5.2.5' from 'https://cache.nixos.org'... copying path '/nix/store/ixa7ljbrdv81qnxgxqwhd26vbfk65d4z-zlib-1.2.11' from 'https://cache.nixos.org'... copying path '/nix/store/fmvjni9mbba8v2ixaxdz19fij8fbya1d-xz-5.2.5-bin' from 'https://cache.nixos.org'... copying path '/nix/store/iddks9pzzsvarxgs0g8s0lx55vxwhrf7-bootstrap-stage3-clang-wrapper-' from 'https://cache.nixos.org'... copying path '/nix/store/5203gm0m1s3jk4nzr78w18i9hily5mvj-libxml2-2.9.10' from 'https://cache.nixos.org'... copying path '/nix/store/79vvclchw1d1i4qa3zg6qyhvd3p8vp7l-libssh2-1.9.0' from 'https://cache.nixos.org'... copying path '/nix/store/sw38s28vb8v7f8anm9hxr24idg9qpbdm-curl-7.74.0' from 'https://cache.nixos.org'... copying path '/nix/store/9h92gyn9a2d61yz1gvw8gx4nfqrjvx4x-swift-corefoundation' from 'https://cache.nixos.org'... copying path '/nix/store/rc8rva2adbgvgcjnzf4fbsjbjl604cwb-bootstrap-stage3-stdenv-darwin' from 'https://cache.nixos.org'... building '/nix/store/20hcj04mgb8z8z13w2z810nrxrv6a0sd-coreutils-8.31.drv'... unpacking sources unpacking source archive /nix/store/l32pamj51f1v6b6vmqd3rgmcpg2bnnbg-coreutils-8.31.tar.xz source root is coreutils-8.31 setting SOURCE_DATE_EPOCH to timestamp 1552262874 of file coreutils-8.31/doc/coreutils.info patching sources applying patch /nix/store/i9vf1pxv8kfihrpp9pcbis14y26wrdca-coreutils-8.31-android-cross.patch patching file lib/strtod.c configuring configure flags: --disable-dependency-tracking --prefix=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31 --bindir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/bin --sbindir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/sbin --includedir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/include --oldincludedir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/include --mandir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/share/man --infodir=/nix/store/6mrsgrhdv7s0f41g0gci69y5vc9k2ng5-coreutils-8.31-info/share/info --docdir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/share/doc/coreutils --libdir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/lib --libexecdir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/libexec --localedir=/nix/store/i5k8wzvhmmsmp5g4mcwyqvn1zszbva2f-coreutils-8.31/share/locale --with-packager=https://NixOS.org --enable-single-binary=symlinks checking for a BSD-compatible install... /nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /nix/store/2ws9cmamvr7xyvdg4d2nnd1bmr1zjrrq-bootstrap-tools/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for style of include used by make... GNU checking for gcc... clang checking whether the C compiler works... no configure: error: in `/private/tmp/nix-build-coreutils-8.31.drv-0/coreutils-8.31': configure: error: C compiler cannot create executables See `config.log' for more details builder for '/nix/store/20hcj04mgb8z8z13w2z810nrxrv6a0sd-coreutils-8.31.drv' failed with exit code 77 cannot build derivation '/nix/store/visd0f4x0dfrzh5pix31j4imzqi4yhv2-openssl-1.1.1i.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/56bl8il7kzh8qy5p7a5hn2d82pdaxpf8-curl-7.74.0.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/cfamfb2j5np1dm2ql8rrydj3ifh5l8xp-psutil-5.8.0.tar.gz.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/rlpg5rsdvdsmfyg416cc9pacrw0zvshs-python3.8-psutil-5.8.0.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/hxk1287cw4kriz692233mrjdffx62yn9-python3-3.8.5-env.drv': 1 dependencies couldn't be built error: build of '/nix/store/hxk1287cw4kriz692233mrjdffx62yn9-python3-3.8.5-env.drv' failed ```

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 Update2: works with nixpkgs set to https://github.com/NixOS/nixpkgs/commit/e9158eca70ae59e73fae23be5d13d3fa0cfc78b4, sorry for the noise! (actually while I have your attention, how can I help getting the fixes backported to 20.09?

infinisil commented 3 years ago

@zupo Opening a PR to the release-20.09 branch with the commit(s) you'd like backported cherry-picked (with -x) is the way to go. See also https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches.

kirelagin commented 3 years ago

Is this now resolved by the merge of #107013?

zupo commented 3 years ago

I tried pinning https://github.com/niteoweb/big-sur-poetry-test to latest nixos-20.09 commit (41dddb1283733c4993cb6be9573d5cef937c1375), but got the same error as always. How can I try staging? I don't see any staging channel on https://status.nixos.org/?

log ``` Building wheels for collected packages: psutil Building wheel for psutil (setup.py) ... error ERROR: Command errored out with exit status 1: command: /nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/setup.py'"'"'; __file__='"'"'/private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-wheel-4wlrwel7 cwd: /private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/ Complete output (144 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.6-x86_64-3.8 creating build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_pswindows.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_common.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/__init__.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_psosx.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_psbsd.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_psaix.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_pslinux.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_compat.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_psposix.py -> build/lib.macosx-10.6-x86_64-3.8/psutil copying psutil/_pssunos.py -> build/lib.macosx-10.6-x86_64-3.8/psutil creating build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_contracts.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_connections.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/runner.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_unicode.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_misc.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_posix.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_linux.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_sunos.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/__init__.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_aix.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_process.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_bsd.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_system.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_osx.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_memleaks.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_windows.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/__main__.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests copying psutil/tests/test_testutils.py -> build/lib.macosx-10.6-x86_64-3.8/psutil/tests running build_ext building 'psutil._psutil_osx' extension creating build/temp.macosx-10.6-x86_64-3.8 creating build/temp.macosx-10.6-x86_64-3.8/psutil creating build/temp.macosx-10.6-x86_64-3.8/psutil/arch creating build/temp.macosx-10.6-x86_64-3.8/psutil/arch/osx clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/include/python3.8 -c psutil/_psutil_common.c -o build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_common.o clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/include/python3.8 -c psutil/_psutil_posix.c -o build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_posix.o clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/include/python3.8 -c psutil/_psutil_osx.c -o build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_osx.o clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_OSX=1 -I/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/include/python3.8 -c psutil/arch/osx/process_info.c -o build/temp.macosx-10.6-x86_64-3.8/psutil/arch/osx/process_info.o clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] clang -bundle -undefined dynamic_lookup -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1i/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1i/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_common.o build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_posix.o build/temp.macosx-10.6-x86_64-3.8/psutil/_psutil_osx.o build/temp.macosx-10.6-x86_64-3.8/psutil/arch/osx/process_info.o -L/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib -o build/lib.macosx-10.6-x86_64-3.8/psutil/_psutil_osx.cpython-38-darwin.so -framework CoreFoundation -framework IOKit ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1i/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.8/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.5/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.3/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.33.0/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.2/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.1.1i/lib' ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-configd-osx-10.8.5/lib' ld: framework not found IOKit clang-7: error: linker command failed with exit code 1 (use -v to see invocation) Traceback (most recent call last): File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/unixccompiler.py", line 200, in link self.spawn(linker + ld_args) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/ccompiler.py", line 910, in spawn spawn(cmd, dry_run=self.dry_run) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix raise DistutilsExecError( distutils.errors.DistutilsExecError: command 'clang' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/nix/store/3l0spwkwjx21b9kw7r2948gffym7ag1f-python3.8-python3.8-wheel-0.34.2/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run self.run_command('build') File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/nix/store/mhi2zi3yk4ai70n3k86vkbqf5z15k5is-python3.8-setuptools-47.3.1/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 87, in run _build_ext.run(self) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "/nix/store/mhi2zi3yk4ai70n3k86vkbqf5z15k5is-python3.8-setuptools-47.3.1/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 208, in build_extension _build_ext.build_extension(self, ext) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/command/build_ext.py", line 550, in build_extension self.compiler.link_shared_object( File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/ccompiler.py", line 713, in link_shared_object self.link(CCompiler.SHARED_OBJECT, objects, File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/unixccompiler.py", line 202, in link raise LinkError(msg) distutils.errors.LinkError: command 'clang' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/setup.py", line 411, in main setup(**kwargs) File "/nix/store/mhi2zi3yk4ai70n3k86vkbqf5z15k5is-python3.8-setuptools-47.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup return distutils.core.setup(**attrs) File "/nix/store/b3mgl5x2233qddyh3rfdss7ngzwa8bgq-python3-3.8.5/lib/python3.8/distutils/core.py", line 163, in setup raise SystemExit("error: " + str(msg)) SystemExit: error: command 'clang' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/setup.py", line 436, in main() File "/private/tmp/nix-build-python3.8-psutil-5.8.0.drv-0/pip-req-build-troh8gvg/setup.py", line 422, in main print(hilite("XCode (https://developer.apple.com/xcode/) " TypeError: 'color' is an invalid keyword argument for print() ---------------------------------------- ERROR: Failed building wheel for psutil Running setup.py clean for psutil Failed to build psutil ERROR: Failed to build one or more wheels ```
edude03 commented 3 years ago

@zupo https://github.com/NixOS/nixpkgs/pull/107013 was merged into staging but I don't think (I'm not sure if) it was merged into 20.09 - so to confirm I'd try using the latest commit from staging.

taku0 commented 3 years ago

Maybe related: https://github.com/NixOS/nixpkgs/pull/104150#pullrequestreview-579892668.

nix-build -I nixpkgs=. -A pkgs.pypy on staging fails with Cannot find C library, ctypes.util.find_library('c') returned None.

It also shows following errors:

[platform:WARNING] ld: warning: directory not found for option '-L/nix/store/0gm1wsc6q4sii8py1kf83isx8aaq03mj-xlibs-wrapper/lib'
[platform:WARNING] ld: warning: directory not found for option '-L/nix/store/pslgzws8yag8fp0srcfk83ky1zxf62mz-apple-framework-Security/lib'
rb2k commented 3 years ago

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. The API calls still work, but things that actually look for the file do not.

This was the patch that fixed it for Python: https://bugs.python.org/issue41100 Any chance that is related?

thefloweringash commented 3 years ago

Is this now resolved by the merge of #107013?

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 master / nixpkgs-unstable feel free to reopen.

For the python ctypes issue, there's a ticket for tracking that at https://github.com/NixOS/nixpkgs/issues/105038

ldeck commented 3 years ago

@thefloweringash @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`
edude03 commented 3 years ago

Niv is likely pinning an older version of nixpkgs without this issue fixed

Get Outlook for iOShttps://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)

@thefloweringashhttps://github.com/thefloweringash @LnL7https://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 phaseLinker'. (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'...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/NixOS/nixpkgs/issues/104580#issuecomment-874933639, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADYXE5VOHZ65DRLYQRYIY3TWMZZ5ANCNFSM4T6L6LRA.