input-output-hk / cardano-rt-view

RTView: real-time watching for Cardano nodes (ARCHIVED)
Apache License 2.0
59 stars 11 forks source link

Cannot build RTView using nix #69

Closed the-headless-ghost closed 3 years ago

the-headless-ghost commented 4 years ago

I tried to build 0.1.0 and the last commit but both failed:

...

[122 of 270] Compiling Distribution.SPDX.LicenseReference ( libraries/Cabal/Cabal/Distribution/SPDX/LicenseReference.hs, bootstrapping/Distribution/SPDX/LicenseReference.o ) [123 of 270] Compiling Distribution.SPDX.LicenseId ( libraries/Cabal/Cabal/Distribution/SPDX/LicenseId.hs, bootstrapping/Distribution/SPDX/LicenseId.o ) ghc/ghc.mk:107: ghc/stage1/package-data.mk: No such file or directory make[1]: [utils/ghc-cabal/ghc.mk:56: utils/ghc-cabal/dist/build/tmp/ghc-cabal] Killed make: [Makefile:123: all] Error 2 builder for '/nix/store/jp8yc7m6mb273gy6m6sg536kj9fyac4j-ghc-8.6.5.drv' failed with exit code 2 cannot build derivation '/nix/store/y4fr020iv5spkkwfdr8zz7x8kl2yqnwa-ghc-8.10.2-configured-src.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/nqw8bg8n44828rqq3m1han06hb78szyz-ghc-8.10.2.drv': 1 dependencies couldn't be built building '/nix/store/x5x0bzvdxl5ih3avb05a2z3zp4ck441s-tagged-0.8.6-3.cabal.drv'... cannot build derivation '/nix/store/0c2rvc6ik4cf0al6m8fb2vhcrj834jsy-Cabal-lib-Cabal-3.2.0.0-config.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/azclpifm98wgjdc9hbi3p9a9bq21p6x1-Cabal-lib-Cabal-3.2.0.0-config.drv': 1 dependencies couldn't be built cannot build derivation '/nix/store/5bw58sfg09kcgiximbba8a4qklkcr8a0-Cabal-lib-Cabal-3.2.0.0-ghc-8.10.2-env.drv': 1 dependencies couldn't be built

...

error: while evaluating 'recRecurseIntoAttrs' at /nix/store/7lzfs8kl0s78d84f9q2lz1z095dm6w0n-source/overlays/haskell-nix-extra/default.nix:8:29, called from something-something/cardano-rt-view/default.nix:20:21: while evaluating anonymous function at something-something/cardano-rt-view/nix/haskell.nix:4:1, called from something-something/cardano-rt-view/nix/pkgs.nix:3:34: while evaluating 'cabalProject' at /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:551:13, called from something-something/cardano-rt-view/nix/haskell.nix:35:12: while evaluating the attribute 'hsPkgs' at /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:518:15: while evaluating the attribute 'hsPkgs' at /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:500:43: while evaluating 'mkCabalProjectPkgSet' at /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:152:13, called from /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:485:30: while evaluating the attribute 'haskell-nix.compiler."${(((plan-pkgs).pkgs hackage)).compiler.nix-name}".version' at /nix/store/acfzlk0y1lmpw05k67a54nws1x8irkzm-source/lib/attrsets.nix:344:7: while evaluating anonymous function at /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/lib/import-and-filter-project.nix:5:1, called from /nix/store/dyapy325zdmjq3hcbg7pc9i79qqkk1xb-source/overlays/haskell.nix:487:31: build of '/nix/store/l227sg85874l75gbkmxlvn86axp7y4ar-cardano-rt-view-src-plan-to-nix-pkgs.drv' failed

denisshevchenko commented 4 years ago

Which command are you using?

I've tried 5 minutes ago (commit 7840bff95662ebf809b70667885717619c36818d) - it works for me:

$ nix-build 
trace: Not using IOHK default nixpkgs (use 'niv drop nixpkgs' to use default for better sharing)
trace: Using index-state: 2020-07-15T00:00:00Z for cardano-rt-view-src
trace: To make this a fixed-output derivation but not materialized, set `plan-sha256` to the output of /nix/store/3ybccc5vnhhiwb52a2lp56wjf52lljb9-calculateSha
trace: To materialize the output entirely, pass a writable path as the `materialized` argument and pass that path to /nix/store/61q0pzlzsvv4ca54ifb7bnfnv97iq9r6-generateMaterialized
trace: Using index-state: 2020-07-15T00:00:00Z for cardano-rt-view-src
trace: To make this a fixed-output derivation but not materialized, set `plan-sha256` to the output of /nix/store/3ybccc5vnhhiwb52a2lp56wjf52lljb9-calculateSha
trace: To materialize the output entirely, pass a writable path as the `materialized` argument and pass that path to /nix/store/61q0pzlzsvv4ca54ifb7bnfnv97iq9r6-generateMaterialized
/nix/store/nj18vzslbpbhfq8mh6vhb50vm69smy3f-cardano-rt-view-exe-cardano-rt-view-0.1.0
/nix/store/mwg7bbckacc0dsn3k9rj702grp9a3yq3-cardano-rt-view-test-cardano-rt-view-test-0.1.0-check
/nix/store/7n9b6vi5rj2psfa9jwszrc9ilh79p1dl-rt-view-analyzer-exe-rt-view-analyzer-0.1.0
/nix/store/srdz47x0qawxpz44imwz7g6sc0k6nfaa-cardano-rt-view-lib-cardano-rt-view-0.1.0
/nix/store/cr3d8546h5v6ak32k47w8w635a2iv7n5-cardano-rt-view-test-cardano-rt-view-test-0.1.0
/nix/store/xyd72l2r25gjswzd50d3a3g8f47s4hdx-cardano-rt-view-0.1.0-coverage-report
/nix/store/ddzv933idrsh6cv92cp68hfbfdimli2g-default-Setup-setup
/nix/store/hspichkg0ns1ggddhl4vxyfmzcp36xlz-rt-view-analyzer-0.1.0-coverage-report
/nix/store/ddzv933idrsh6cv92cp68hfbfdimli2g-default-Setup-setup
/nix/store/8iw46dd554z50rfmxk3ls5l77h5dif9k-cabal-dev-shell

I also can build Linux package locally:

$ nix-build release.nix -A cardano-rt-view-linux-release
trace: Not using IOHK default nixpkgs (use 'niv drop nixpkgs' to use default for better sharing)
trace: Not using IOHK default nixpkgs (use 'niv drop nixpkgs' to use default for better sharing)
trace: Using index-state: 2020-07-15T00:00:00Z for cardano-rt-view-src
trace: To make this a fixed-output derivation but not materialized, set `plan-sha256` to the output of /nix/store/3ybccc5vnhhiwb52a2lp56wjf52lljb9-calculateSha
trace: To materialize the output entirely, pass a writable path as the `materialized` argument and pass that path to /nix/store/61q0pzlzsvv4ca54ifb7bnfnv97iq9r6-generateMaterialized
...
trace: Using index-state: 2020-07-15T00:00:00Z for cardano-rt-view-src
trace: To make this a fixed-output derivation but not materialized, set `plan-sha256` to the output of /nix/store/rp6yc3q9qkb572pyg0d8mvsh4k9c9vsd-calculateSha
trace: To materialize the output entirely, pass a writable path as the `materialized` argument and pass that path to /nix/store/5b0lafg3x4vg3zxkmh4r35ibgw16jwwy-generateMaterialized
these paths will be fetched (3.54 MiB download, 3.63 MiB unpacked):
  /nix/store/zkqwgzmsq633cqyp790flsyvzfwv52dz-cardano-rt-view-0.1.0-linux-x86_64
copying path '/nix/store/zkqwgzmsq633cqyp790flsyvzfwv52dz-cardano-rt-view-0.1.0-linux-x86_64' from 'https://hydra.iohk.io'...
/nix/store/zkqwgzmsq633cqyp790flsyvzfwv52dz-cardano-rt-view-0.1.0-linux-x86_64

Moreover, the latest builds for all platforms on Hydra CI (from commit 7840bff) are successful too: https://hydra.iohk.io/eval/971915.

My NixOS version is:

$ nixos-version 
20.03.1812.14dd961b8d5 (Markhor)
the-headless-ghost commented 4 years ago

I've tried both commands on Ubuntu 20.04 with the latest Nix installation.

denisshevchenko commented 4 years ago

AFAIU, actual error is this one:

ghc/ghc.mk:107: ghc/stage1/package-data.mk: No such file or directory

I see that some users saw the same error (https://forum.cardano.org/t/anyone-succesfully-running-a-node-on-centos-8-or-freebsd-12-1/37780/4). But I never saw it personally, because I only used nix on NixOS...