Trying to build 8.7.2

Hi,

Working my way thru this: Installing cardano-node and cardano-cli from source | Cardano Developer Portal

And I am getting strange results trying to build the “latest” cadano-node.

cardano-node$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
cardano-node$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library

My issues started at:

cardano-node$ git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)
error: pathspec 'null' did not match any file(s) known to git.

As it returns null. but what i could see the curl call should return the value at tag_name and in this case tag_name: "8.7.2". I typed "git checkout 8.7.2" and it gets set as point. 

cardano-node$ git checkout 8.7.2
HEAD is now at 30b6e447c Merge pull request #5567 from input-output-hk/sl/release-8.7.2

then when I continue I get this build result:

Failed to build Diff-0.5.
Build log (
/home/.cabal/logs/ghc-8.10.7/Diff-0.5-824320d4150900a749e46acef6c09bac2b1a7cd68fd35cd8276a9028fb247189.log
):
Configuring library for Diff-0.5..
Preprocessing library for Diff-0.5..
Building library for Diff-0.5..
[1 of 3] Compiling Data.Algorithm.Diff ( src/Data/Algorithm/Diff.hs, dist/build/Data/Algorithm/Diff.o, dist/build/Data/Algorithm/Diff.dyn_o )
[2 of 3] Compiling Data.Algorithm.DiffContext ( src/Data/Algorithm/DiffContext.hs, dist/build/Data/Algorithm/DiffContext.o, dist/build/Data/Algorithm/DiffContext.dyn_o )

src/Data/Algorithm/DiffContext.hs:22:1: error: [-Wunused-imports, -Werror=unused-imports]
    The import of ‘Data.Monoid’ is redundant
      except perhaps to import instances from ‘Data.Monoid’
    To import instances alone, use: import Data.Monoid()
   |
22 | import Data.Monoid (mappend)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Algorithm/DiffContext.hs:32:11: error: [-Wname-shadowing, -Werror=name-shadowing]
    This binding for ‘x’ shadows the existing binding
      bound at src/Data/Algorithm/DiffContext.hs:30:14
   |
32 |       go (x : xs) (y : zs) | eq x y = go (y : x : xs) zs
   |           ^

src/Data/Algorithm/DiffContext.hs:32:15: error: [-Wname-shadowing, -Werror=name-shadowing]
    This binding for ‘xs’ shadows the existing binding
      bound at src/Data/Algorithm/DiffContext.hs:30:18
   |
32 |       go (x : xs) (y : zs) | eq x y = go (y : x : xs) zs
   |               ^^
...

So I feel a bit stuck atm, any ideas as how to proceed from here?

Best regards

You are probably missing BLST

Yes I did install BLST yesterday and that did get me further into the build but I did it again within cardano-node directory now and still same error. I run cabal update every time I try just to make sure.

This is a snippet from the output when i run cabal build all:

  • cardano-tracer-0.2.1 (lib:demo-forwarder-lib) (first run)
  • cardano-tracer-0.2.1 (lib:demo-acceptor-lib) (first run)
  • cardano-tracer-0.2.1 (exe:cardano-tracer) (first run)
  • tx-generator-2.10 (exe:tx-generator) (first run)
  • cardano-testnet-8.7.0 (exe:cardano-testnet) (first run)
  • cardano-submit-api-3.2.1 (exe:cardano-submit-api) (first run)
  • cardano-tracer-0.2.1 (exe:demo-forwarder) (first run)
  • cardano-tracer-0.2.1 (exe:demo-acceptor) (first run)
    Starting ansi-wl-pprint-0.6.9 (lib)
    Starting appar-0.1.8 (all, legacy fallback)
    Starting base58-bytestring-0.1.0 (lib)
    Starting fingertree-0.1.5.0 (lib)
    Starting file-embed-0.0.15.0 (lib)
    Starting data-accessor-transformers-0.2.1.8 (lib)
    Starting Diff-0.5 (lib)
    Starting foundation-0.0.30 (lib)
    Building appar-0.1.8 (all, legacy fallback)
    Building fingertree-0.1.5.0 (lib)
    Building base58-bytestring-0.1.0 (lib)
    Building ansi-wl-pprint-0.6.9 (lib)
    Building file-embed-0.0.15.0 (lib)
    Building data-accessor-transformers-0.2.1.8 (lib)
    Building Diff-0.5 (lib)
    Starting generic-monoid-0.1.0.1 (lib)
    Building foundation-0.0.30 (lib)
    Building generic-monoid-0.1.0.1 (lib)
    Installing generic-monoid-0.1.0.1 (lib)
    Completed generic-monoid-0.1.0.1 (lib)
    Installing fingertree-0.1.5.0 (lib)
    Completed fingertree-0.1.5.0 (lib)

Failed to build Diff-0.5.
Build log (
/home/sysop/.cabal/logs/ghc-8.10.7/Diff-0.5-824320d4150900a749e46acef6c09bac2b1a7cd68fd35cd8276a9028fb247189.log
):
Configuring library for Diff-0.5…
Preprocessing library for Diff-0.5…
Building library for Diff-0.5…
[1 of 3] Compiling Data.Algorithm.Diff ( src/Data/Algorithm/Diff.hs, dist/build/Data/Algorithm/Diff.o, dist/build/Data/Algorithm/Diff.dyn_o )
[2 of 3] Compiling Data.Algorithm.DiffContext ( src/Data/Algorithm/DiffContext.hs, dist/build/Data/Algorithm/DiffContext.o, dist/build/Data/Algorithm/DiffContext.dyn_o )

src/Data/Algorithm/DiffContext.hs:22:1: error: [-Wunused-imports, -Werror=unused-imports]
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
|
22 | import Data.Monoid (mappend)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/Algorithm/DiffContext.hs:32:11: error: [-Wname-shadowing, -Werror=name-shadowing]
This binding for ‘x’ shadows the existing binding
bound at src/Data/Algorithm/DiffContext.hs:30:14
|
32 | go (x : xs) (y : zs) | eq x y = go (y : x : xs) zs
| ^

src/Data/Algorithm/DiffContext.hs:32:15: error: [-Wname-shadowing, -Werror=name-shadowing]
This binding for ‘xs’ shadows the existing binding
bound at src/Data/Algorithm/DiffContext.hs:30:18

I am curious as to why it shows bindings are shadowed as that is actual haskell compiler warnings, I am building with the recommended versions.

Best regards

I used the scripts to create a node found on cardano wiki, seems to have fixed whatever the issue was. Looks like building with a newer version might have fixed the issue compiling atleast.

Well, got the cardano node & cli working so will continue testing.

//Cheers

1 Like

Hello, i am facing exactly same error

cabal: Failed to build Diff-0.5 (which is required by lib:cardano-cli-test-lib
from cardano-cli-8.17.0.0). See the build log above for details.
Failed to build appar-0.1.8 (which is required by exe:cardano-node from
cardano-node-8.7.3, lib:cardano-cli-test-lib from cardano-cli-8.17.0.0 and
others). See the build log above for details.
Failed to build base58-bytestring-0.1.0 (which is required by exe:cardano-node
from cardano-node-8.7.3, lib:cardano-cli-test-lib from cardano-cli-8.17.0.0
and others). See the build log above for details.

i have 18 gb ram

got the same issue here, weird thing is that my other node updated no problem

The two machines probably have slight different sets of packages installed. Assuming they are both Ubutnu, do dpkg -l on both, pipe both outputs to a file, sort then and then use diff to show the differences.