1

Hello I am trying to install the offchain-metadata-tools library from IOHK and when using nix-build -A project I am getting this error below saying failed in linker phase when trying to connect to the Network.URI . I have been trying to troubleshoot it for the last day but I have had no luck. I am using an intel macbook pro with 16gb of RAM.

jmarzak-us-la:offchain-metadata-tools jmarzak$ GC_DONT_GC=1 nix-build -A project
trace: Using IOHK default nixpkgs
trace: WARNING: 8.10.2 is out of date, consider using 8.10.4.
trace: To make project.plan-nix for offchain-metadata-tools-src a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.plan-nix for offchain-metadata-tools-src entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: WARNING: 8.10.2 is out of date, consider using 8.10.4.
building '/nix/store/4hmcsf7dj3pb3v3w37wbm4pln42y0xpw-network-uri-lib-network-uri-2.6.4.1.drv'...
unpacking sources
unpacking source archive /nix/store/r4azmxsi3p5bjs81gvm2wvwxflap3x4s-network-uri-2.6.4.1.tar.gz
source root is network-uri-2.6.4.1
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file network-uri-2.6.4.1/tests/uri001.hs
patching sources
configuring
Configure flags:
--prefix=/nix/store/h2rcbnxmw08s6waqcclri9pnmrn5cg42-network-uri-lib-network-uri-2.6.4.1 lib:network-uri --package-db=clear --package-db=/nix/store/qxwbr7zgaar2ww1j21zlbsdq5chnnzvy-network-uri-lib-network-uri-2.6.4.1-config/lib/ghc-8.10.2/package.conf.d --exact-configuration --dependency=parsec=parsec-3.1.14.0-6iSWBB8iDTOE545kctTcd8 --dependency=th-compat=th-compat-0.1.1-LjxiD0nW4NUFjgNxm1UCB9 --dependency=rts=rts --dependency=ghc-heap=ghc-heap-8.10.2 --dependency=ghc-prim=ghc-prim-0.6.1 --dependency=integer-gmp=integer-gmp-1.0.3.0 --dependency=base=base-4.14.1.0 --dependency=deepseq=deepseq-1.4.4.0 --dependency=array=array-0.5.4.0 --dependency=ghc-boot-th=ghc-boot-th-8.10.2 --dependency=pretty=pretty-1.1.3.6 --dependency=template-haskell=template-haskell-2.16.0.0 --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 --disable-coverage --enable-library-for-ghci 
Configuring library for network-uri-2.6.4.1..
Warning: The flag --disable-executable-profiling is deprecated. Please use
--disable-profiling instead.
building
Preprocessing library for network-uri-2.6.4.1..
Building library for network-uri-2.6.4.1..
[1 of 3] Compiling Network.URI      ( Network/URI.hs, dist/build/Network/URI.o, dist/build/Network/URI.dyn_o )

Network/URI.hs:10:14: warning: [-Wtrustworthy-safe]
    ‘Network.URI’ is marked as Trustworthy but has been inferred as safe!
   |
10 | {-# LANGUAGE Trustworthy #-}
   |              ^^^^^^^^^^^
[2 of 3] Compiling Network.URI.Lens ( Network/URI/Lens.hs, dist/build/Network/URI/Lens.o, dist/build/Network/URI/Lens.dyn_o )
[3 of 3] Compiling Network.URI.Static ( Network/URI/Static.hs, dist/build/Network/URI/Static.o, dist/build/Network/URI/Static.dyn_o )
ld: warning: /nix/store/v0n14y5q17p050a81ih6w5d0szsncjmv-libiconv-osx-10.12.6/lib/libiconv.dylib, ignoring unexpected dylib file
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)
error: builder for '/nix/store/4hmcsf7dj3pb3v3w37wbm4pln42y0xpw-network-uri-lib-network-uri-2.6.4.1.drv' failed with exit code 1;
       last 10 log lines:
       >     ‘Network.URI’ is marked as Trustworthy but has been inferred as safe!
       >    |
       > 10 | {-# LANGUAGE Trustworthy #-}
       >    |              ^^^^^^^^^^^
       > [2 of 3] Compiling Network.URI.Lens ( Network/URI/Lens.hs, dist/build/Network/URI/Lens.o, dist/build/Network/URI/Lens.dyn_o )
       > [3 of 3] Compiling Network.URI.Static ( Network/URI/Static.hs, dist/build/Network/URI/Static.o, dist/build/Network/URI/Static.dyn_o )
       > ld: warning: /nix/store/v0n14y5q17p050a81ih6w5d0szsncjmv-libiconv-osx-10.12.6/lib/libiconv.dylib, ignoring unexpected dylib file
       > 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)
       For full logs, run 'nix log /nix/store/4hmcsf7dj3pb3v3w37wbm4pln42y0xpw-network-uri-lib-network-uri-2.6.4.1.drv'.
error: 1 dependencies of derivation '/nix/store/q72i8ylgcspg7sj6gw54bkxxc7g5a089-cabal-install-exe-cabal-3.4.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c5fwigx4wvpjkbcm8i6ki34zcaw4w8mq-offchain-metadata-tools-src-plan-to-nix-pkgs.drv' failed to build
(use '--show-trace' to show detailed location information)
jmarzak-us-la:offchain-metadata-tools jmarzak$ 
2
  • Welcome to Cardano SE! As a new user be sure to take the Tour.
    – gRebel
    Commented Jan 22, 2022 at 12:06
  • You are on BigSur or Monterey?
    – angerman
    Commented Jan 24, 2022 at 4:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.