Bitcoin Forum
April 25, 2024, 12:01:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Compiling bitcoin core on raspberry pi failed  (Read 291 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 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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
1714003269
Hero Member
*
Offline Offline

Posts: 1714003269

View Profile Personal Message (Offline)

Ignore
1714003269
Reply with quote  #2

1714003269
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714003269
Hero Member
*
Offline Offline

Posts: 1714003269

View Profile Personal Message (Offline)

Ignore
1714003269
Reply with quote  #2

1714003269
Report to moderator
1714003269
Hero Member
*
Offline Offline

Posts: 1714003269

View Profile Personal Message (Offline)

Ignore
1714003269
Reply with quote  #2

1714003269
Report to moderator
1714003269
Hero Member
*
Offline Offline

Posts: 1714003269

View Profile Personal Message (Offline)

Ignore
1714003269
Reply with quote  #2

1714003269
Report to moderator
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1197
Merit: 580


OGRaccoon


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

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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


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

Thanks,

I get this:

.

DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1197
Merit: 580


OGRaccoon


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

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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...
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1197
Merit: 580


OGRaccoon


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.

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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 (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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.
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1197
Merit: 580


OGRaccoon


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

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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!