Bitcoin Forum
December 03, 2020, 04:50:34 AM *
News: Bitcointalk Community Awards
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Compiling bitcoin core on raspberry pi failed  (Read 224 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 03, 2018, 02:00:30 PM
 #1

When running sudo make I get this printed (I thought I'd show it in its entirety as it's quite small).
I ran ./autogen.sh and ./configure --with-incompatible-bdb (or whatever the syntax is) previously on another session.
Code:
Making all in src
^[ xmake[1]: Entering directory '/home/pi/bitexperiment/bitcoin/src'          ma                                                      ke[2]: Entering directory '/home/pi/bitexperiment/bitcoin/src'
make[3]: Entering directory '/home/pi/bitexperiment/bitcoin'
make[3]: Leaving directory '/home/pi/bitexperiment/bitcoin'
  CXX      libbitcoin_server_a-init.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:5882: recipe for target 'libbitcoin_server_a-init.o' failed
make[2]: *** [libbitcoin_server_a-init.o] Error 4
make[2]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:9948: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:764: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Please don't question why I'm using a raspberry pi (it's for educational purposes only). Smiley

1606971034
Hero Member
*
Offline Offline

Posts: 1606971034

View Profile Personal Message (Offline)

Ignore
1606971034
Reply with quote  #2

1606971034
Report to moderator
1606971034
Hero Member
*
Offline Offline

Posts: 1606971034

View Profile Personal Message (Offline)

Ignore
1606971034
Reply with quote  #2

1606971034
Report to moderator
1606971034
Hero Member
*
Offline Offline

Posts: 1606971034

View Profile Personal Message (Offline)

Ignore
1606971034
Reply with quote  #2

1606971034
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1606971034
Hero Member
*
Offline Offline

Posts: 1606971034

View Profile Personal Message (Offline)

Ignore
1606971034
Reply with quote  #2

1606971034
Report to moderator
1606971034
Hero Member
*
Offline Offline

Posts: 1606971034

View Profile Personal Message (Offline)

Ignore
1606971034
Reply with quote  #2

1606971034
Report to moderator
MagicByt3
Sr. Member
****
Offline Offline

Activity: 714
Merit: 413


<Insert No Fucks Given Here>


View Profile
August 03, 2018, 02:07:04 PM
Merited by LoyceV (1)
 #2

Code:
free
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free
make -f makefile.unix


It looks like compile may run out of memory.
Running make runs lots of process which use more memory. The problem above occurs when your system runs out of memory

You can try 'free -m' option to check

"If you don't believe it or don't get it, I don't have the time to try to convince you, sorry". Satoshi Nakamoto
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 03, 2018, 02:18:07 PM
 #3

Thanks,

I get this:

.


MagicByt3
Sr. Member
****
Offline Offline

Activity: 714
Merit: 413


<Insert No Fucks Given Here>


View Profile
August 03, 2018, 03:12:23 PM
 #4

Try add more swap space this should fix the issue.

Code above in previous post

"If you don't believe it or don't get it, I don't have the time to try to convince you, sorry". Satoshi Nakamoto
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 03, 2018, 04:01:26 PM
 #5

Same error happens again.

Code:
:~/bitexperiment/bitcoin $ sudo make
Making all in src
make[1]: Entering directory '/home/pi/bitexperiment/bitcoin/src'
make[2]: Entering directory '/home/pi/bitexperiment/bitcoin/src'
make[3]: Entering directory '/home/pi/bitexperiment/bitcoin'
make[3]: Leaving directory '/home/pi/bitexperiment/bitcoin'
  CXX      libbitcoin_server_a-init.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:5882: recipe for target 'libbitcoin_server_a-init.o' failed
make[2]: *** [libbitcoin_server_a-init.o] Error 4
make[2]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:9948: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:764: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I ran it previously and it worked beyond that stage, do I have to undo what I previously did? It failed at a point later though...

MagicByt3
Sr. Member
****
Offline Offline

Activity: 714
Merit: 413


<Insert No Fucks Given Here>


View Profile
August 04, 2018, 12:42:59 AM
Merited by suchmoon (4), jackg (1)
 #6

Try this. You many need to use sudo command for the swap space.

Type "dmesg",

Code:
[ 1377.575785] Out of memory: Kill process 12305 (cc1plus) score 905 or sacrifice child
[ 1377.575800] Killed process 12305 (cc1plus) total-vm:579928kB, anon-rss:546144kB, file-rss:0kB

If you see output like this, your machine does not have enough memory to compile. 
You can fix this by adding more swap.

To add a 1gb swap file, in /swapfile:

Code:
sudo dd if=/dev/zero of=/swapfile bs=1024M count=1000
sudo mkswap /swapfile
sudo swapon /swapfile


After compiling

Code:
sudo swapoff /swapfile
sudo rm /swapfile

Please post any further issues.

"If you don't believe it or don't get it, I don't have the time to try to convince you, sorry". Satoshi Nakamoto
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 06, 2018, 12:36:35 PM
Last edit: August 06, 2018, 01:04:42 PM by jackg
 #7

Same error Sad

Code:
  CXX      libbitcoin_server_a-init.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:5882: recipe for target 'libbitcoin_server_a-init.o' failed
make[2]: *** [libbitcoin_server_a-init.o] Error 4
make[2]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:9948: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/bitexperiment/bitcoin/src'
Makefile:764: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Increased swap to 1GiB and didn't work.
I'm trying 2GiB now...
2GiB didn't work, so I switched Pis and it's working now (normally, without the swap stuff).

king nothin
Newbie
*
Offline Offline

Activity: 11
Merit: 1


View Profile
August 06, 2018, 07:01:34 PM
 #8

what RPI are you using? compiling on my tinker board went pretty straight, but it has 2GB RAM
you might be running into same issue as that guy https://bitcointalk.org/index.php?topic=304389.0
try monitoring your ram while compiling on a second ssh session
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 06, 2018, 07:05:31 PM
 #9

what RPI are you using? compiling on my tinker board went pretty straight, but it has 2GB RAM
you might be running into same issue as that guy https://bitcointalk.org/index.php?topic=304389.0
try monitoring your ram while compiling on a second ssh session

Yeah I'll try that. I ran into another error with producing the daemon after I fixed the first error Sad (I'll post the log tomorrow).

I'm not sure what Pi I'm running it from, I have a Pi 2 and a B+ I assume the second (latter) was the 2 that I used which got further along the installation.

I found an OS that comes preinstalled with bitcoin core for a raspberry pi so I'm going to try that.

MagicByt3
Sr. Member
****
Offline Offline

Activity: 714
Merit: 413


<Insert No Fucks Given Here>


View Profile
August 23, 2018, 12:27:20 PM
 #10

What was the end result did you get this to work.
Been having  issues on a RPI 2 B board with my own daemon I am working on.

My guess is its a dependency issue that's caused this.  

I would be warey of pre-installed on imaged could be asking for trouble if its been modified.

You could try add all of the list below to allow for building I got it to work on mine with the following.

Code:
sudo apt-get install git
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libboost-all-dev
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler

"If you don't believe it or don't get it, I don't have the time to try to convince you, sorry". Satoshi Nakamoto
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1946
Merit: 1932


https://bit.ly/387FXHi ← lightning theory


View Profile
August 23, 2018, 12:57:11 PM
 #11

I think I've done most of these but I'll try it again at some point... Thanks!

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!