Building cardano-node on debian 10

Hi,

I’ve been trying several time to build the cardano-node on a debian10 installation and recently found this post Building the Haskell cardano-node on Linux. I have not yet tried its solution but I wanted to signal that although I installed pre-requisites as stated here
with

mkdir "$HOME/tmp";cd "$HOME/tmp"
wget https://raw.githubusercontent.com/cardano-community/guild-operators/master/files/ptn0/scripts/prereqs.sh
chmod 755 prereqs.sh
./prereqs.sh
. "${HOME}/.bashrc"

I run in an error running building $CNODE_HOME/scripts/cabal-build-all.sh

...
[ 6 of 30] Compiling Cardano.CLI.Byron.Key ( src/Cardano/CLI/Byron/Key.hs, /home/userfoo/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.12.0/build/Cardano/CLI/Byron/Key.o )

src/Cardano/Tracing/Tracers.hs:49:1: error: [-Wunused-imports, -Werror=unused-imports]
    The import of ‘Ouroboros.Consensus.Ledger.SupportsProtocol’ is redundant
      except perhaps to import instances from ‘Ouroboros.Consensus.Ledger.SupportsProtocol’
    To import instances alone, use: import Ouroboros.Consensus.Ledger.SupportsProtocol()
   |
49 | import           Ouroboros.Consensus.Ledger.SupportsProtocol (LedgerSupportsProtocol)
...

full error log paste

Environment

A distant Virtual Private Server (VPS) with Debian 10 (buster)

Preparation (updating stuff)

   sudo apt-get update -y
sudo apt-get -y install build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 -y

Install Haskell stuff

Cabal

This was kind of new to me. I never touched Haskell stuff before. It did
not always go smoothly and I had to go back and forth a few times to the
Haskell Cabal overview . But
the the following worked

apt-get install cabal-install
cabal update
cabal install Cabal cabal-install 

Latest ghc version

I’m not sure why I ended up installing this Glorious Glasgow Haskell
Compiler
. It’s probably because in
latter steps required it, but I can’t say which. Any how, I adapted the
code from the last snippet of this troubleshooting
page
I used the latest ghc for
Debian 10
and the

wget https://downloads.haskell.org/~ghc/latest/ghc-<latest-os-version>-linux.tar.xz
tar -xf ghc-<latest-os-version>-linux.tar.xz
rm ghc-<latest-os-version>-linux.tar.xz 
cd ghc-<latest-os-version>
./configure

Cardano-node stuff

At that point I have 2 cabal executables on the VPS.

  • /usr/bin/cabal --version --> 2.2.0.0
  • home/foouser.cabal/bin/cabal --version --> 3.2.0.0

Install

I make sure to use the second, and the I check for the latest tag of the
cardano-node git
projet

git clone https://github.com/input-output-hk/cardano-node.git 
cd cardano-node
git fetch --all --tags
git checkout tags/<latest-tag>
cabal install cardano-node cardano-cli  --installdir=$HOME/.local/bin

Run

Before tired I another launch I quickly checked the cardano-node/scripts
folder and README.md file. Very instructive.

cardano-node run --cabal

Cabalinnistic ! it’s a live !