0

Encountered the following error attempting to compile monero from source following this guide: https://github.com/moneroexamples/monero-compilation#example-compilation-of-monero-on-ubuntu-1804. Building on Ubuntu in a VM on windows

Error log

The error always occurred when it reaches the core_rpc_server. Sometimes it hangs my VM entirely, sometimes it manages to exit with the above error code. Any solutions? Can't use cli binary because I need to use the following library: https://github.com/moneroexamples/transactions-export

5
  • How much memory available, and what are your build steps? Are you able to build from github.com/monero-project/monero ? Jun 1, 2020 at 10:59
  • 6.8 GB available. Followed the exact steps from github.com/moneroexamples/…. No, I get the same error too. Jun 1, 2020 at 11:09
  • If you were refering to RAM, it was 2GB. I increased ram allocated to 8gb and restarted, still trying. Jun 1, 2020 at 11:56
  • 1
    Update: successfully compiled Monero after bumping RAM to 8GB. Looks like lack of RAM was causing GCC to crash. Thanks for the prompt. Jun 1, 2020 at 12:40
  • Yes. Minimum 2GB RAM per thread. Jun 1, 2020 at 12:41

1 Answer 1

1

c++: fatal error: Killed signal terminated program cc1plus usually means running out of memory.

You can confirm by running sudo dmesg right after the error, and looking for a message like:

Out of memory: Kill process 23747 (cc1plus) score 15 or sacrifice child
Killed process 23747, UID 2243, (cc1plus) total-vm:214456kB, anon-rss:178936kB, file-rss:5908kB

Two things to try:

  1. If you're running with a -j# flag (like -j8), that will use 8 cores - try using -j1 instead (will be a bit slower)
  2. Create a swap file (this uses your disk as extra RAM):
$ sudo dd if=/dev/zero of=/swapfile bs=64M count=128
$ sudo mkswap /swapfile
$ sudo swapon /swapfile

(These particular commands add 64M * 128 = 8GB of new "RAM" - Adjust as needed)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.