Conflict: Installing cardano-node and cardano-cli from source

I followed the URL here → Installing cardano-node and cardano-cli from source | Cardano Developer Portal
after the command cabal configure --with-compiler=ghc-8.10.7, I got:

Warning: index-state ignored for old-format (remote repository
hackage.haskell.org’)
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.14.3.0/installed-4.14.3.0 (dependency of Win32-network)
[__2] trying: byron-spec-chain-0.1.0.0 (user goal)
[__3] trying: hedgehog-1.0.5 (dependency of byron-spec-chain)
[__4] next goal: primitive (dependency of hedgehog)
[__4] rejecting: primitive-0.6.4.0 (conflict:
base==4.14.3.0/installed-4.14.3.0, primitive => base>=4.5 && <4.13)
[__4] skipping: primitive-0.6.1.1, primitive-0.6.1.0, primitive-0.5.4.0,
primitive-0.5.3.0, primitive-0.5.2.1, primitive-0.5.1.0, primitive-0.5.0.1,
primitive-0.5, primitive-0.4.1, primitive-0.4.0.1, primitive-0.4,
primitive-0.3.1, primitive-0.3, primitive-0.2.1, primitive-0.2, primitive-0.1,
primitive-0.6.3.0, primitive-0.6.2.0, primitive-0.6.1.2, primitive-0.6 (has
the same characteristics that caused the previous version to fail: excludes
‘base’ version 4.14.3.0)
[__4] fail (backjumping, conflict set: base, hedgehog, primitive)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, primitive, hedgehog,
Win32-network, byron-spec-chain
Try running with --minimize-conflict-set to improve the error message.

So module primitive requires base>=4.5 && <4.13. Then I installed ghc v8.6.5 whose base is 4.12.0.0 by ghcup, and tried again, I got:

Warning: index-state ignored for old-format (remote repository
hackage.haskell.org’)
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.12.0.0/installed-4.12.0.0 (dependency of Win32-network)
[__2] next goal: base-deriving-via (user goal)
[__2] rejecting: base-deriving-via-0.1.0.0 (conflict:
base==4.12.0.0/installed-4.12.0.0, base-deriving-via => base>=4.14)
[__2] fail (backjumping, conflict set: base, base-deriving-via)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, base-deriving-via, Win32-network

Again, but this time it is module base-deriving-via to complain with the requirement base>=4.14.
Compared with previous one, the requirement of module primitive and that of module base-deriving-via conflict! Module primitive requires base>=4.5 && <4.13. While module base-deriving-via requires base >=4.14. How can fulfill them both?
Have no idea how to solve, anyone has a chance to encounter this problem?

My Working Environment:
Desktop Ubuntu 20.04 running on a virtual machine.

1 Like

You will need ghc-8.10.7 (it should also work with 8.10.4, if I remember correctly) and cabal 3.6.2.0 or 3.4.0.0.
Did you run “cabal update” before “cabal build all”? If not, can you try?

Tried again, and same result.
I tried with

  • ghc-8.10.7 & cabal 3.6.2.0
  • ghc-8.10.4 & cabal 3.4.0.0
  • ghc-8.10.7 & cabal 3.4.0.0
  • ghc-8.10.4 & cabal 3.6.2.0

and everytime run “cabal update” before “cabal configure --with-compiler=ghc-8.10.7(4)”
Error remains. :frowning_face:

Win32-network :thinking: so you are on Windows. I am fairly certain you are trail blazing then … “Try running with --minimize-conflict-set to improve the error message.” also seems like a good hint.

Either use native *nix or a virtual machine with a *nix OS image. You could try WSL or maybe even cygwin if you want to kick it old-school. However I would recommend the virtual machine as it’s pretty much guaranteed to be easier than the other options as long as you have some extra CPU/RAM/HD available.

Hi DinoDude,

I captured all the result in a virtual machine with Desktop Ubuntu 20.04 running. I have not idea why cabal will need Win32-network package to proceed, but it just happend.
Maybe the tutorial here http://developers.cardano.org/docs/get-started/installing-cardano-node#linux is outdated. Could I know which instruction you followed to build Cardano Node?

Thanks.

Why don’t you use the build instructions from the cardano-node github repository? They should be the most current ones: cardano-node/install.md at master · input-output-hk/cardano-node · GitHub

If you have problems building cardano-node and cardano-cli, you can always use the binaries provided by IOG, you find the link to download them on every release.

Looked into that tutorial from github repository, almost the same with the one I followed.
BTW, Good news is I made it worked by my own.
How:
I dropped the ghcup tooling, install cabal-install 3.4.0.0 and ghc 8.10.4 through PPA directly:

sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
sudo apt-get install -y cabal-install-3.4 ghc-8.10.4

And after I run

cabal configure --with-compiler=ghc-8.10.4

Or

cabal build all

I saw the below warnings

Warning: Requested index-state 2021-12-07T00:00:00Z is newer than
hackage.haskell.org’! Falling back to older state (2021-12-06T23:34:30Z).
Resolving dependencies…

Instead of (compared with previous failing one)

Warning: index-state ignored for old-format (remote repository
hackage.haskell.org’)
Resolving dependencies…

I guess this is what caused my case to fail. However I can’t explain what is happened underneath. Just provide a case a solution to someone who may encountered in the future and navigated here.

2 Likes