0.9.2: make fails on ARM w Makefile:827: recipe for target 'main.o' failed #4384

issue ghost opened this issue on June 21, 2014
  1. ghost commented at 6:42 PM on June 21, 2014: none

    I checked out 0.9.2 today using github clone of 0.9.2 and tried to build.

    pi@raspberrypi ~ $ uname -a
    Linux raspberrypi 3.12.22+ [#691](/bitcoin-bitcoin/691/) PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux
    pi@raspberrypi ~ $ make -v
    GNU Make 4.0
    Built for arm-unknown-linux-gnueabihf
    

    I made one change to the source, based on recco from #4362, but errors don't seem related to that.

    $ ./autogen.sh; ./configure --disable-wallet --without-gui
    

    Log from configure: http://pastebin.com/SdsGj4EG

    $ make
    $ tail -f bitcoin/makelog.txt
    Making all in src
    make[1]: Entering directory '/home/pi/bitcoin/src'
    make  all-recursive
    make[2]: Entering directory '/home/pi/bitcoin/src'
    Making all in .
    make[3]: Entering directory '/home/pi/bitcoin/src'
      CXX      addrman.o
      CXX      alert.o
      CXX      bloom.o
      CXX      checkpoints.o
      CXX      coins.o
      CXX      init.o
      CXX      keystore.o
      CXX      leveldbwrapper.o
      CXX      main.o
    g++: internal compiler error: Killed (program cc1plus)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
    Makefile:827: recipe for target 'main.o' failed
    make[3]: *** [main.o] Error 4
    make[3]: Leaving directory '/home/pi/bitcoin/src'
    Makefile:849: recipe for target 'all-recursive' failed
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory '/home/pi/bitcoin/src'
    Makefile:640: recipe for target 'all' failed
    make[1]: *** [all] Error 2
    make[1]: Leaving directory '/home/pi/bitcoin/src'
    Makefile:497: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    

    I got make errors yesterday when I cloned "master" branch (yesterday was about missing files).

  2. sipa commented at 6:46 PM on June 21, 2014: member

    Are you sure you have enough RAM on you RPi to build bitcoind?

  3. jgarzik commented at 6:48 PM on June 21, 2014: contributor

    Not a bitcoin problem. As @sipa noted, it is probably RAM (check 'dmesg' for OOM killing evidence) or some other hardware issue. e.g. I've seen GCC ICEs like this when a CPU overheated.

  4. jgarzik closed this on Jun 21, 2014

  5. ghost commented at 6:53 PM on June 21, 2014: none

    @jgarzik - wow that was quick... 5 minutes to close a suspected issue based on "probable" OOM cause...

    I've submitted a 4-5 bitcoin bugs that occured on this Pi with v0.9.1, so unless something spectacularly changed, it's not an out of memory condition as I've built bitcoind on the same box 3-4 times already. 512 MB RAM isn't little (okay, 16 GB is shared to display card).

  6. jgarzik commented at 7:00 PM on June 21, 2014: contributor

    Whatever the problem, it has nothing to do with bitcoin.

    And yes, compiling one bitcoin source file may require many hundreds of megabytes of RAM. https://bitcointalk.org/index.php?topic=304389.0

  7. ghost commented at 6:06 AM on June 22, 2014: none

    Yes, but if I took time to properly submit this issue (and other already confirmed issues), that means I'm contributing. You could have added exactly the same comments and leave the issue open, then I'd come back and look into your comment, potentially confirm that you were right, you'd close the issue and others would be able to learn something.

    So, the problem was the lack of virtual memory because two days ago I replaced the SD card and didn't increase swap size on the new card. By increasing swap size to the size I had before (500 MB) I was able to build bitcoin successfully as before.
    A secondary conclusion of potential interest to bitcoin builders on small devices is that make can throw weird and unrelated errors - like file not found and recipe not found.

    I'm adding these notes for the benefit of others only because you replied.

  8. laanwj commented at 10:02 AM on June 22, 2014: member

    I can confirm that this is a out-of-memory issue. For this reason I added the memory recommendation to doc/build-unix.md at some point: 4babd08.

    For small devices you should really use cross-compilation. You're tormenting yourself by compiling something as heavy as bitcoind on the device itself.

  9. gr33k commented at 2:05 AM on November 8, 2017: none

    100% out of memory issue - Confirmed by checking dmesg (this happens on altcoins too): [255397.620182] Out of memory: Kill process 14776 (cc1plus) score 321 or sacrifice child [255397.620401] Killed process 14776 (cc1plus) total-vm:738196kB, anon-rss:473340kB, file-rss:0kB

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me