Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ghost opened this issue Jun 21, 2014 · 7 comments
Closed

Comments

@ghost
Copy link

ghost commented Jun 21, 2014

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 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).

@sipa
Copy link
Member

sipa commented Jun 21, 2014

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

@jgarzik
Copy link
Contributor

jgarzik commented Jun 21, 2014

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.

@jgarzik jgarzik closed this as completed Jun 21, 2014
@ghost
Copy link
Author

ghost commented Jun 21, 2014

@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).

@jgarzik
Copy link
Contributor

jgarzik commented Jun 21, 2014

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

@ghost
Copy link
Author

ghost commented Jun 22, 2014

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.

@laanwj
Copy link
Member

laanwj commented Jun 22, 2014

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.

@gr33k
Copy link

gr33k commented Nov 8, 2017

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

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants