Can't compile cardano-node from source

So I am really confused on how to run a stake pool. The documentation just is not making sense to me.

I am following instructions to compile cardano-node from source using both nix and cabal (Why two different ways to build?). More specifically I am following, step by step:

cabal
https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html

nix
https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/building-the-node-using-nix.html

The first method (cabal) fails with:
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: cardano-api (user goal)
[__2] rejecting: cardano-api-1.27.0 (conflict:
base==4.12.0.0/installed-4.12.0.0, cardano-api => base>=4.14 && <4.15)
[__2] fail (backjumping, conflict set: base, cardano-api)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, Win32-network, cardano-api

When building with nix process ends normally, but I don’t understand whan coomes out of it. I expect to find executables like cardano-cli but the only thing I see is a sybolic link called “mainnet-node-local”. The tutorial explicitly says to call ./mainnet-node-local but of course that makes no sense, mainnet-node-local is a folder that contains bin/cardano-node-mainnet. Is this the same as cardano-cli?

I am sorry if these are basic questions, but I am extremely frustrated. Why are the commands in the documentation not working? What exactly am I expecting as output, one executable, 2 3?

I am trying to install on ubuntu 20.04, 16GB Ram, 8 cpu’s, all dependencies installed as per documentation.

1 Like

Ok, why don’t u try my topic?

You will thank you later :slight_smile:

But if u decided to follow the guide, perform a new fresh installation of server

Hi Alex, I was checking your gists earlier. To be honest, all of this is coming like a steamroller. I might be biting too much of a bullet here.

Even though I am a new to crypto, I consider myself quite knowledgeable in *nix stuff.

I am trying to approach this step by step and naturally my first thought was: “Let’s build this thing first”. Boy oh boy was I wrong. I’ll go through your topic, thanks for the help.

1 Like

When u will build the node just replace 1.25.1 version with 1.27.0

Quick question, I have enables ssh login only via public key authentication. This has the effect that the 2fa authentication step is skipped. Is this expected or did I configure something wrongly?

It is ok, u did it well

might you try to use ghc version 8.6.5

or just skip the compilation and download the binaries from github:

Same ol mistake man, everything was going great.

Warning: Requested index-state 2021-03-15T00:00:00Z is newer than
hackage.haskell.org’! Falling back to older state (2021-03-14T23:47:09Z).
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: cardano-api (user goal)
[__2] rejecting: cardano-api-1.27.0 (conflict:
base==4.12.0.0/installed-4.12.0.0, cardano-api => base>=4.14 && <4.15)
[__2] fail (backjumping, conflict set: base, cardano-api)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, Win32-network, cardano-api

Yeah, I was using a newer version and switched to 8.6.5 but I am still getting complains about “base, Win32-network, cardano-api” 7 straight hours trying to make it work at no avail :frowning:

I might have to do that, but I would really like to be able to complete the build process. Don’t wanna trust no binary.

I have an Ubuntu 20.04 - will try to go through on this install again…

you mean nobody? those binaries are official build from IOHK.

Yeah, precompiled seems to be my only option. Can’t shake the feeling of defeat though. Weird that it’s so hard to simply build a program from source.

Thousands have built it, it’s not so hard - but you’d want to ensure ghc --version says (8.10.2 - 8.10.4) and cabal --version is 3.4.0, and you’re on latest node release tag

Support for 8.6.5 is completely dropped as of 1.27

1 Like

Thousands have built it, it’s not so hard - but you’d want to ensure ghc --version says (8.10.2 - 8.10.4) and cabal --version is 3.4.0, and you’re on latest node release tag

That’s what is frustrating me the most, I know it shouldn’t be that complicated.

Really confused about dependencies, tried and failed with ghc-10.2 and got the aforementioned errors. In the forum I saw using 8.6.5 should do the trick, but it didn’t.

I am just really confused because I have been following the documentation step by step.

I’ll keep grinding.

You need to be precise, the session that you’re running in should list accurate ghc as well as cabal version at command line (to avoid any errors like multiple versions being available, and one in your session’s $PATH being incorrect) as per my previous message, and then run the buuld commands from the same session

Yeah sorry about that. Post can not be edited anymore.

Running
ghc 8.10.4
cabal 3.4.0

Got it to build!! Thanks for the help.

I am now running into the same error as: CNTools and gLiveView error failed to load common env file

It’s a bit different though
Guild LiveView version check…
Failed to query protocol-parameters from node, not yet fully started?
ERROR: CNTools failed to load common env file
Please verify set values in ‘User Variables’ section in env file or log an issue on GitHub

Doing some reading to see how to solve it.
sudo systemctl status cnode, shows the node is running at high CPU load

Having just started node, you might want to wait for the node to sync through to shelley fork (on mainnet that’s epoch 208) , as until then some of the CLI queries will not resolve - also, it wouldn’t create the socket file for communication right after launching the node :slight_smile:

PS: Since you’re using CNTools, as documented on guild doco home page, it is strongly recommended that you’d go through the setup on testnet first.

Gotcha,

guild doco home page

Is that, this: https://cardano-community.github.io/guild-operators

Thanks for the replies, I am still quite overwhelmed by all the resources. For example I haven’t found exactly the differences between testnet and mainnet, excluding the obvious fact that one is for testing.