0

super new to Solana. Trying to get the cloned repo build on my local machine. But the build stops while compiling solana-validator package and the terminal closes itself (crashes if you will) without showing any error or warning. screenshot

Nothing can be seen on the logs either. Tried cargo build --verbose. Nothing. I have Ubuntu 22.04 OS with 15GB RAM and 500GB SSD. So I reckon I have enough resources to get it build. Any ideas why I could be facing this issue?

These are the versions I have installed :

  1. rustup - 1.24.0
  2. rustc - 1.60.0
  3. solana-cli - 1.11.0
  4. nodejs - 16.15.0

Thank you!

1 Answers1

0

This is totally normal, especially with 15GB of RAM -- cargo defaults to spinning up N jobs, where N is the number of cores on your machine. With a lot of cores, it's easy to use up too much memory while trying to compile so many modules in parallel, causing the OOM killer on Linux to take down processes until memory is recovered.

To get around this, you can start with cargo build --jobs 1, which should succeed. If you want to speed up, feel free to experiment with larger numbers, but know that it might fail again!

Jon C
  • 7,019
  • 10
  • 17
  • Thank you so much! I have 8 cores. And every time I ran `cargo build` all cores ran at 100% capacity. So I wasn't sure if 16GB RAM was enough. As an alternative I was using release build. But now it builds successfully. Thanks again! – WonderGirlPrism May 03 '22 at 17:21
  • Glad that it worked! Could you accept the answer? That way other people can find it more easily in the future – Jon C May 04 '22 at 10:00