Installing Cardano-node from source - build error!

I’ve been following this tutorial and I’m stuck on step 2 (build the node form source code).

Running “$ cabal build all” I’m getting an error:

 Warning: Requested index-state2020-01-31T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2020-01-30T23:28:20Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] next goal: base (dependency of Win32-network)
[__1] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict: Win32-network =>
base>=4.5 && <4.13)
[__1] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: Win32-network, base)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, Win32-network

“$ cabal --version”:

cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library 

Any tips or advice? Thanks!

Update:
I’m not sure what I did but now running “$ cabal build all” I’m getting error:

No cabal.project file or cabal file matching the default glob ‘./*.cabal’ was found.
Please create a package description file .cabal or a cabal.project file referencing the packages you want to build.

I’ve tried reinstalling via the commands:

cd
wget https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
tar -xf cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz
rm cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz cabal.sig
mkdir -p $HOME/.local/bin
mv cabal $HOME/.local/bin/

but no such luck.

That index-state is over a year old. That suggests you are build an old tag. You should be building the latest tag which is 1.25.1 for which the index state is 2021-01-10T00:00:00Z.

So you need to do the following:

  • git checkout 1.25.1 -b tag-1.25.1
  • cabal update
  • cabal build all

which then should just work.

I’ve checked out the latest version from git, but when running the command:
“$ cabal configure --with-compiler=ghc-8.10.2” I’m getting the error:

Warning: both implicit and explicit configuration is present.When using configuration(s) from /home/ian/cabal.project.local, the following errors occurred:
The package location glob ‘./*.cabal’ does not match any files or directories.

I’ve tried installing cabal with the instructions I’ve pasted above but it still can’ find a ./*cabal file… maybe I can create this manually. But what should the contents of that file be and in which directory should it be located in?

Never mind, fortunately I’m still at the beginning stages of setting things up so I just deleted my entire /home/ian/ user and started from scratch. Not encountering those issues anymore after carefully checking out git branch 1.25.1 the second time around. Thanks!

1 Like