Help building node on Raspberry Pi4b

Trying to follow the building guide on https://testnets.cardano.org/en/shelley/get-started/installing-and-running-the-cardano-node/building-the-node-from-source/

Haskell 8.6.5. appears to have installed but Im hitting a wall with making cabal-install 3.2.0.0. OS is Ubuntu 20.04 and as there is no available cabal-install 3.2.0.0. for aarch64, I am trying to compile cabal-install locally. The README.md says to use ./bootstrap.sh, but this fails to detect llvm 6, however I have both llvm-6.0 and llvm-6.0-dev insalled from apt.

The preferred nix installation also fails, the nix installer appears to complete but on trying to open a nix shell there are files that have not generated.

I appreciate this is not Cardano specific, but getting the Haskell environment completed is a requirement for node building, so hope someone can help.

1 Like

Hey, I also want to build a node on a Raspberry Pi 4. But today I came across some posts telling that there is a problem with GHC 8.6.5, which is not supported on ARM architectures. Some said cross-compiling could work. I found these links:


I will try it out as soon as my Raspberry arrives. Should be in a couple days.

1 Like

Hi,

to compile the right version of Cabal and GHC on Raspberry Pi 4b, you can refer yourself to the dockerfiles i’ve put together on Github, it might help you to get started.

https://github.com/pasklab/cardano-docker

Even if you do not make use of Docker, you can easily follow the steps described in it and try the same work around on your system if your running Ubuntu on your RaspberryPi.

If your system package manager differ from apt / apt-get, you’ll need to adapt all command to fit your system.

1 Like

Thank you! I will give it a try as soon as I have my Raspi.
I see you are using cabal 3.0 instead of 3.2. Does this work as well?

I used cabal 3.0 just because it was stated this way in the repository README. It worked so I didn’t bother trying the 3.2 version.

I will give a try with 3.2 soon, I’ll update my Dockerfile if everythings fine!

Cross-compiling would not work at all (due to the TemplateHaskell requirements that I have already complained a lot), but I think you can do some cross-building what @Pascal_Lapointe did with docker.

Hi All,

I have a Raspberry Pi4 4GB which i intend to use for node. I`ve read a lot about NixOS but unfortunately it is a pain if not impossible to run it stable on Pi. Have you managed to run a node on Pi so far?Can you point me out ? Tips available and lots of kudos. Thanks.

Hey I managed to run a node on Raspberry Pi. I just created a guide for it: Guide Raspberry Pi 4 HTN Setup [Pi Pool]
I hope it helps :slight_smile:

4 Likes

Would you recommend using SSD rather than just a sdcard on the raspberry ?

In a word definitely, SD cards are generally slower than SSDs without going into the technical reasons, I’d opt for a 250Gb if not higher storage :vulcan_salute:

2 Likes

UPDATE:

I forgot to post back about my tests with cabal 3.2. No, it did not worked out…! I tried different things and building Cardano Node with latest Cabal and GHC version failed every time. Even worst, compiling on Raspberry Pi takes time and the process from zero took a whole day. I’ll stick with the 3.0 since it’s faster and… well, it just work.

ON RPI SSD STORAGE:

SSD over USB3 is effectively much faster on raspberry Pi than SD card. The other reason for using SSD instead of SD card is the long term reliability.
Rough explanation: Flash memory can only be written a defined number of time before burning out. (Don’t worry yet, the number is high). Memory card/ssd come with a controller that cycle through free memory bytes to spread the wear evenly. SSD usually comes with better controller and usually have larger capacity. Larger capacity means more space to spread the wear leading to a better lifespan.

Like @Trigger, I would propose going for 250Gb. Updating later to 500Gb or higher is trivial and you’ll leave times for the price per Gb to drop.

IMPORTANT: You’ll need a SATA-USB3 cable to build this setup. Make some research before buying. Some cables, even if they seems to work at first, won’t allow you to boot on your RPI. Even if you boot on SD card and use SSD as your root “/”. (ie: Sabrent cable have some USB3 issue, see @alessandro answer bellow)

3 Likes

I also sticked with cabal 3.0. It really works well. I produced over 180 blocks on the HTN, really proud of that :smiley:

I have the Sabrent Chipset. It does work on USB 2.0 without problem, but for USB 3.0 you need to add quirks. That works perfect.

1 Like

Thanks for the (quirks) tips, I’ll look-it up! Maybe you just saved the four Sabrent cable I’ve thrown away in my closet…!

Hahaha, I used this tutorial:

2 Likes