Cardano-wallet: nix-build -A cardano-wallet fails on macOS Big Sur

Created on 25 Aug 2020  路  8Comments  路  Source: input-output-hk/cardano-wallet

Context

| Information | - |
| --- | --- |
| Version | fece720cb18d9676c4f1f6b0d3a69a37fab93f1c |
| Platform | macOS 11.0-beta (20A5354i) |
| Installation | |

Steps to Reproduce

  1. nix-build -A cardano-wallet

Expected behavior

It succeeds.

Actual behavior

  /nix/store/ljbmfp66zsmlmwqva1zslxnhw3a1jms8-cardano-wallet-2020.8.3.drv
building '/nix/store/950nj0aw03wkhnbwarrfxmn38rvh7c9s-text-class-lib-text-class-2020.8.3.drv'...
unpacking sources
unpacking source archive /nix/store/cgrchflbh6v50dkkx12s2j97h18d3hf5-cardano-wallet-src-lib-text-class/lib/text-class
source root is text-class
patching sources
configuring
Configure flags:
--prefix=/nix/store/lrslv7n0z27vvap9qyd0x1yxkz1vz2n6-text-class-lib-text-class-2020.8.3 lib:text-class --package-db=clear --package-db=/nix/store/r09in9gj8mharb06iv43f7d4g52v018w-text-class-lib-text-class-2020.8.3-config/lib/ghc-8.6.5/package.conf.d --flags=release --exact-configuration --dependency=casing=casing-0.1.4.1-5HtChOKU02m2mvQJ1HzLRt --dependency=extra=extra-1.6.18-C7xAmL5A2AFEnbUx6dobYb --dependency=fmt=fmt-0.6.1.2-1V69yM6Joxv1jEYDHKPMyz --dependency=hspec=hspec-2.7.0-HahAPHKm2h3DJgGUX1AL0S --dependency=QuickCheck=QuickCheck-2.12.6.1-4jxIWgdXoo3DkFj4Yuw1cs --dependency=rts=rts --dependency=ghc-heap=ghc-heap-8.6.5 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=integer-gmp=integer-gmp-1.0.2.0 --dependency=base=base-4.12.0.0 --dependency=deepseq=deepseq-1.4.4.0 --dependency=array=array-0.5.3.0 --dependency=ghc-boot-th=ghc-boot-th-8.6.5 --dependency=pretty=pretty-1.1.3.6 --dependency=template-haskell=template-haskell-2.14.0.0 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc=ghc-8.6.5 --dependency=array=array-0.5.3.0 --dependency=binary=binary-0.8.6.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.6.0.1 --dependency=filepath=filepath-1.4.2.1 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc-compact=ghc-compact-0.1.0.0 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=hpc=hpc-0.6.0.3 --dependency=mtl=mtl-2.2.2 --dependency=parsec=parsec-3.1.13.0 --dependency=text=text-1.2.3.1 --dependency=transformers=transformers-0.5.6.2 --dependency=xhtml=xhtml-3000.2.2.1 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-executable-profiling --enable-static --enable-shared
Configuring library for text-class-2020.8.3..
Warning: The flag --disable-executable-profiling is deprecated. Please use
--disable-profiling instead.
building
Preprocessing library for text-class-2020.8.3..
Building library for text-class-2020.8.3..
[1 of 2] Compiling Data.Text.Class  ( src/Data/Text/Class.hs, dist/build/Data/Text/Class.o )
[2 of 2] Compiling Test.Text.Roundtrip ( src/Test/Text/Roundtrip.hs, dist/build/Test/Text/Roundtrip.o )
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/950nj0aw03wkhnbwarrfxmn38rvh7c9s-text-class-lib-text-class-2020.8.3.drv' failed with exit code 1
cannot build derivation '/nix/store/4ksi8ihf4bcqbq4pph78av9ggma6jicj-cardano-wallet-exe-cardano-wallet-2020.8.3.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ljbmfp66zsmlmwqva1zslxnhw3a1jms8-cardano-wallet-2020.8.3.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ljbmfp66zsmlmwqva1zslxnhw3a1jms8-cardano-wallet-2020.8.3.drv' failed

Extra information

I _am_ however able to run:

  • nix-shell in the cardano-wallet repo
  • nix-build -A cardano-node in the cardano-node repo

Resolution


QA

BUG LOW

All 8 comments

@Anviking Is this still an issue for you?
Could you try removing Nix and reinstalling with the instructions here: https://nixos.org/manual/nix/stable/#sect-macos-installation
Also it's good to install with the --daemon (multi-user nix) option.

Yes, I presume it is the same as https://github.com/NixOS/nixpkgs/issues/91748

Would rather not re-install unless there's something suggesting it would fix things.

There has been progress on this.
Support for the new macOS BigSur library format was merged into nixpkgs master.
Once that has been tested adequately, it will probably be backported to the nixpkgs 20.09 release branch.

@rvl could you point to that commit in master? I'm trying to compile my shell with a bunch of other stuff from the most recent master checkout and it fails on several python packages. As master is not guaranteed to pass all CI checks it makes it hard to trace a properly working checkout. And the more stable nixpkgs-unstalbe seems still to have the same linker issue.

@coderfromhere Unfortunately it's not a simple matter of building the master branch of something. The whole nixpkgs stdenv needs to be rebuilt, because apple have changed the way libraries are linked. The cardano-wallet build for macos needs to be based on this updated stdenv. So we need to wait for the macos bigsur fix to be tested and backported to the nixpkgs release-20.09 branch. Then we need to update cardano-wallet to use this revision of nixpkgs.

My condolences 馃槣

:sob: ...

Was this page helpful?
0 / 5 - 0 ratings