Bitcoin Forum
November 18, 2017, 02:17:27 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Building Armory on Raspberry Pi  (Read 9690 times)
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 21, 2013, 03:57:43 PM
 #1

I'm trying to build Bitcoin Armory on a Raspberry Pi with Rapsbian (to use as an offline wallet) and I'm in need of assistance.

I've found a couple of guides on how to set up a cross compiler, building it, and then moving it over to the pi. I can't get any of them to work, so I decided to start by getting Armory to build on the Pi itself, and then moving on to getting it to work on the cross compiler.

Since Raspbian is based on debian, I was hoping I could just use the build instructions for Ubuntu found on the official Armory page http://bitcoinarmory.com/building-armory-from-source/.

Doing this ends up with the error:

Quote
make[2]: Entering directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
g++ -DNDEBUG -O -g0 -native -template=no%extdef  -c 3way.cpp
g++: error: unrecognized option ‘-native’
g++: error: unrecognized option ‘-template=no%extdef’
make[2]: *** [3way.o] Error 1
make[2]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
mv: cannot stat `libcryptopp.a': No such file or directory
make[1]: *** [libcryptopp.a] Error 1
make[1]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

To get past this i opened up cppForSwig/cryptopp/Makefile and edited line 106 from:
   CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
to
   CXXFLAGS = -DNDEBUG -O -g0 $(M32OR64)

And ran make oncemore. This resulted in the error:
Quote
g++ -xar -o libcryptopp.a 3way.o adler32.o algebra.o algparam.o arc4.o asn.o authenc.o base32.o base64.o basecode.o bfinit.o blowfish.o blumshub.o camellia.o cast.o casts.o cbcmac.o ccm.o channels.o cmac.o cpu.o crc.o cryptlib_bds.o cryptlib.o default.o des.o dessp.o dh2.o dh.o dll.o dsa.o eax.o ec2n.o eccrypto.o ecp.o elgamal.o emsa2.o eprecomp.o esign.o files.o filters.o fips140.o fipstest.o gcm.o gf2_32.o gf256.o gf2n.o gfpcrypt.o gost.o gzip.o hex.o hmac.o hrtimer.o ida.o idea.o integer.o iterhash.o luc.o md2.o md4.o md5.o misc.o modes.o mqueue.o mqv.o nbtheory.o network.o oaep.o osrng.o pch.o pkcspad.o polynomi.o pssr.o pubkey.o queue.o rabin.o randpool.o rc2.o rc5.o rc6.o rdtables.o rijndael.o ripemd.o rng.o rsa.o rw.o safer.o salsa.o seal.o seed.o serpent.o shacal2.o sha.o sharkbox.o shark.o simple.o skipjack.o socketft.o sosemanuk.o square.o squaretb.o strciphr.o tea.o tftables.o tiger.o tigertab.o trdlocal.o ttmac.o twofish.o vmac.o wait.o wake.o whrlpool.o winpipes.o xtr.o xtrcrypt.o zdeflate.o zinflate.o zlib.o
g++: error: language ar not recognized

(repeated once for each file)

make[2]: *** [libcryptopp.a] Error 1
make[2]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
mv: cannot stat `libcryptopp.a': No such file or directory
make[1]: *** [libcryptopp.a] Error 1
make[1]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

I fiddled around a bit more in the makefile, but there are so many things that I'm not quite sure what they do that I figure its more efficient to ask for help.

What do I need to do to make this work?
1511014647
Hero Member
*
Offline Offline

Posts: 1511014647

View Profile Personal Message (Offline)

Ignore
1511014647
Reply with quote  #2

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

Posts: 1511014647

View Profile Personal Message (Offline)

Ignore
1511014647
Reply with quote  #2

1511014647
Report to moderator
1511014647
Hero Member
*
Offline Offline

Posts: 1511014647

View Profile Personal Message (Offline)

Ignore
1511014647
Reply with quote  #2

1511014647
Report to moderator
1511014647
Hero Member
*
Offline Offline

Posts: 1511014647

View Profile Personal Message (Offline)

Ignore
1511014647
Reply with quote  #2

1511014647
Report to moderator
whitenight639
Full Member
***
Offline Offline

Activity: 154



View Profile
March 21, 2013, 04:38:08 PM
 #2

https://bitcointalk.org/index.php?topic=73648.20



page 2 somebody has same issue on compiling armory for Mac,


gcc can be a pain, I have had similar issues compiling mining software on Ubuntu, I think you can install extra gcc libraries but you can seriously break your system, I think you need to follow the above thread to see if theres a resolution and read the gcc documentation, you might be able to set proper flags for ppc or whatever pi is based on.

125uWc197UW5kM659m4uwEakxoNHzMKzwz
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 22, 2013, 05:52:41 AM
 #3

ok, thanks… seems a bit more difficult than I was hoping for. I'll look into it.

If i manage to get it working I'll include a step by step guide here for future reference.
nomis
Newbie
*
Offline Offline

Activity: 7


View Profile
March 25, 2013, 06:53:44 PM
 #4

Hi,

I followed this instruction to get armory working on my raspberry pi:

https://gist.github.com/FiloSottile/3646033

As the CXX.patch file is quite old, I had to patch those two files (cppForSwig/Makefile, cppForSwig/cryptopp/Makefile) by hand. Just search for the red marked lines (https://gist.github.com/FiloSottile/3646033#file-cxx-patch) and replace them by the green ones. And because of the static linking of python you also need to adjust cppForSwig/Makefile to point to your libpython$(PYVER).so. You need to get this file from your raspberry pi, then save it on your compiling machine and change the Makefile accordingly.

Good luck!

Cheers!

1959rGTMe3jxS2SaEovmhmYmzWuEiuVi93
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 25, 2013, 06:56:00 PM
 #5

Excellent! Thanks for taking the time to post it here.

I'll give it a try first thing tomorrow!
Tuckie
Newbie
*
Offline Offline

Activity: 6


View Profile WWW
March 25, 2013, 10:16:05 PM
 #6

Were you able to get this working? It seems like this would be a great use for the RaspberryPi!
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 26, 2013, 07:18:50 AM
 #7

Still not managing to get it to work…

First I manually applied the patch like you suggested. Then I copied
Quote
/usr/lib/libpython2.7.so
to my compiling computer. I then opened cppForSwig/Makefile and changed the line
Quote
STATICPYTHON += "$(DEPSDIR)/lib/libpython$(PYVER).so"
to
Quote
STATICPYTHON += "/home/testuser/libpython2.7.so"

This nets me the error message
Quote
make[2]: Leaving directory `/home/testuser/src/RaspberryPi/staging/BitcoinArmory/cppForSwig/cryptopp'
g++ -shared -lpthread  UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a "/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so" CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [swig] Error 1
make[1]: Leaving directory `/home/testuser/src/RaspberryPi/staging/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

when i run make…

Hopefully I'm doing something obviously stupid here so its easy to fix Smiley
nomis
Newbie
*
Offline Offline

Activity: 7


View Profile
March 26, 2013, 08:23:50 AM
 #8

Hi,

Did you:

1. enabled c++ in menuconfig of the crosscompiler (C-compiler → Additional supported languages)?
2. added the x-tools/arm-unknown-linux-gnueabi/bin to your PATH (step 18)?
3. run make using "CXX=arm-unknown-linux-gnueabi-g++ make"?

Cheers!

1959rGTMe3jxS2SaEovmhmYmzWuEiuVi93
nomis
Newbie
*
Offline Offline

Activity: 7


View Profile
March 26, 2013, 08:32:40 AM
 #9

Additional:

Are you sure you edited all required lines in cppForSwig/Makefile?

Quote
make[2]: Leaving directory `/home/testuser/src/RaspberryPi/staging/BitcoinArmory/cppForSwig/cryptopp'
g++ -shared -lpthread  UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a "/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so" CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
/home/testuser/src/RaspberryPi/staging/BitcoinArmory/libpython2.7.so: could not read symbols: File in wrong format

It still seems to use g++ instead of arm-unknown-linux-gnueabi-g++.

Quote
remove >> g++ -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so << remove
replace >> $(CXX) -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so  << replace

Cheers!

1959rGTMe3jxS2SaEovmhmYmzWuEiuVi93
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 26, 2013, 11:10:45 AM
 #10

Duh, I just ran
Quote
make
instead of
Quote
CXX=/home/testuser/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++ make

When i actually remember to call the correct compiler i end up with this error instead:
Quote
make[2]: Leaving directory `/home/testuser/Desktop/BitcoinArmory/cppForSwig/cryptopp'
/home/testuser/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++  -I"/usr/include/python`python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`" -c -O2 -pipe -fPIC  -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS  -lpthread  CppBlockUtils_wrap.cxx
In file included from /usr/include/python2.7/Python.h:58:0,
                 from CppBlockUtils_wrap.cxx:151:
/usr/include/python2.7/pyport.h:873:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
make[1]: *** [CppBlockUtils_wrap.o] Error 1
make[1]: Leaving directory `/home/testuser/Desktop/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

I remember getting this error last week as well (didn't mention it in the post since i gave up on crosscompiling and was trying to compile it on the pi itself), and it is mentioned in the comments in the gists.


I assume this is why I'm copying the libpython2.7.so file from the pi? Any idea what I might be doing wrong this time?
nomis
Newbie
*
Offline Offline

Activity: 7


View Profile
March 26, 2013, 11:21:51 AM
 #11

Quote
/home/testuser/local/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-g++  -I"/usr/include/python`python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`" -c -O2 -pipe -fPIC  -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS  -lpthread  CppBlockUtils_wrap.cxx

Please check your cppForSwig/Makefile again, it still includes the wrong path to the python library!

EDIT: I checked my Makefile and its pointing to the same include dir. Don't know why it worked with my version. You could try to get the whole /usr/include/python* directory from your RPi and then adjust the path in the Makefile for SWIG_INC.

EDIT2: Did you 'make clean' after the faulty make without the CXX env set?

1959rGTMe3jxS2SaEovmhmYmzWuEiuVi93
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 26, 2013, 12:12:25 PM
 #12

It finally compiled!

What I hadn't done was copy all of /usr/include/python2.7 to my cross compiler. After doing this and editing one more line in the makefile it worked perfectly.

I'm going to write down the exact steps I took to get this to work, since I will probably end up doing this again in like a year or so. If there is any interest I'll post it here once I've made sure it is complete and no steps are missing.


I'm also gonna give it a few more tries to get it to compile directly on the Pi. I feel it would be nice to get this to work (even if its very slow) since then one wouldn't need an additional computer.


Big thanks to nomis for the help!



bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 26, 2013, 12:16:02 PM
 #13

Hehe, didn't notice your edit until after i was done. But that was the trick. Good catch!
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 28, 2013, 07:42:49 AM
 #14


I noticed this thread being linked from the official Armory subforum which inspired me to include a step by step guide to get it working. This could probably be made into a shellscript, but my linuxfu is not strong enough and it will probably be broken very easily as time marches on and things gets updated.

These steps were tested on a clean install of Ubuntu 12.10 64-bit on 2013-03-26. The current version of Bitcoin Armory is 0.87-beta.

(This pretty much a copy paste from a markdown file I wrote for future me, however, there are a few manual edits to account for the forum syntax)
========================================

## Starting point
This step by step guide is done on a clean install of ubuntu 12.10 desktop amd64. During installation the option ”Download updates while installing” was left unchecked to make the results completly replicable.

After the installation process completed the only things I did before starting this guide is change the resolution of the screen and install OpenSSH-server since I’m used to the OS X terminal app.
Quote
   sudo apt-get install openssh-server
   
to figure out the ip of the computer i used
Quote
   ifconfig
(Yes, this is a VERY thorough walkthrough, the idea is that when I’m doing this again, maybe in a year or two, nothing should have to be googled while following this guide)

## Download crosstool-ng
Quote
   wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.17.0.tar.bz2
   tar xfv crosstool-ng-1.17.0.tar.bz2
   cd crosstool-ng-1.17.0.tar.bz2/

## Install required packages
My main gripe with the other guides was that apparantly they had some stuff already installed on their systems. I say this because when I followed their instructions I kept hitting roadblocks.

The complete list of packages i installed after the ubuntu installer was do is as follows:

* openssh-server    (i can’t imagine this affects anything, but I’m not going to leave anything out)
* automake   
* bison
* build-essential
* flex
* gawk
* gperf
* libncurses5-dev
* libtool
* subversion
* texinfo

## Create directories
Quote
   mkdir -p ~/src/Crosstool/RaspberryPi/include         
   mkdir -p ~/src/Crosstool/RaspberryPi/staging
   mkdir -p ~/bin/Crosstool/crosstool-ng
   mkdir -p ~/bin/Crosstool/Toolchains/
## Configure and Build crosstool-ng
Quote
   sudo apt-get install automake bison build-essential flex gawk gperf libncurses5-dev libtool subversion texinfo
   wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.17.0.tar.bz2
   tar xfv crosstool-ng-1.17.0.tar.bz2
   
   cd crosstool-ng-1.17.0/
   ./configure --prefix=/home/[USERNAME]/bin/Crosstool/crosstool-ng
   make
   make install
   cd ..
   rm -r crosstool-ng-1.17.0 crosstool-ng-1.17.0.tar.bz2
   
   export PATH=$PATH:/home/[USERNAME]/bin/Crosstool/crosstool-ng/bin/
   
   cd ~/src/Crosstool/RaspberryPi/staging/
   ct-ng menuconfig
This opens up a menubased interface to configure crosstool before building it. Do the following steps:
Quote
   Paths and misc options —> Try features marked as EXPERIMENTAL (NEW)
   Paths and misc options —> Prefix directory (NEW) —> ${HOME}/bin/Crosstool/Toolchains/${CT_TARGET}
   
   Target options    —> Target Architecture(alpha) —> arm
   
   Operating System —> Target OS (bare-metal) —> linux
   
   Binary utilities —> binutils version (2.22 (EXPERIMENTAL)) —> 2.21.1a
   
   C compiler —> Show Linaro versions (EXPERIMENTAL) (NEW)
   C compiler —> C++
   
   Exit —> Yes
Finally build it:
Quote
   ct-ng build
## Modify path permanently (untested)
Add these lines to the bottom of the ~/.profile file:
Quote
   export PATH=$PATH:/home/[USERNAME]/bin/Crosstool/Toolchains/arm-unknown-linux-gnueabi/bin
## Check compiler
Quote
   arm-unknown-linux-gnueabi-gcc --version

   mkdir /tmp/helloWorld/
   cd /tmp/helloWorld/

   cat > test.c
   #include <stdio.h>
   int main() { printf("Hello, world!\n"); return 0; }
   ^D

   arm-unknown-linux-gnueabi-gcc -o test test.c
   chmod +x test

   scp test pi@@[IP_OF_PI_GOES_HERE]:/tmp/
   ssh pi@[IP_OF_PI_GOES_HERE] /tmp/test

## Resources / References
* [Kitware blog: Cross-Compiling for Raspberry Pi](http://kitware.com/blog/home/post/426)
* [Building a Raspberry Pi Cross Compiler: could not retrieve eglibc-2_16](http://brains.witsmith.com/2012/10/building-cross-compiling-toolchain-for.html)
* [How to build a cross compiler for your Raspberry Pi](http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/)
* [crosstool-ng](http://crosstool-ng.org/)
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 28, 2013, 07:46:15 AM
 #15

# Build Bitcoin Armory for Raspberry Pi (using cross compiler)
This is a step by step guide on how to build Bitcoin Armory for the Raspberry Pi. This guide assumes that a working crosscompiler has been set up in a fashion similar to the previous post

## Install packages
Quote
   
   sudo apt-get install git-core build-essential pyqt4-dev-tools swig libqtcore4 libqt4-dev python-qt4 python-dev python-twisted
## Download Armory sourcecode
Quote
   
   cd ~/src/Crosstool/RaspberryPi/staging
   git clone git://github.com/etotheipi/BitcoinArmory.git
   cd BitcoinArmory
   
## Copy libraries from Pi
Quote
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/include/python2.7 ~/src/Crosstool/RaspberryPi/include
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/lib/libpython2.7.so ~/src/Crosstool/RaspberryPi/lib
## Modify code for ARM
Create a patchfile by executing
Quote
   cat > BitcoinArmory.patch
and then copy and paste
Quote
   diff -rupN BitcoinArmory/cppForSwig/cryptopp/Makefile BitcoinArmoryModified/cppForSwig/cryptopp/Makefile
   --- BitcoinArmory/cppForSwig/cryptopp/Makefile   2013-03-26 16:14:29.670518482 +0100
   +++ BitcoinArmoryModified/cppForSwig/cryptopp/Makefile   2013-03-26 21:34:58.438595983 +0100
   @@ -38,7 +38,7 @@ ifeq ($(UNAME),Darwin)
    CXXFLAGS += -arch x86_64 -arch i386
    else
    #CXXFLAGS += -march=native
   -CXXFLAGS += -mtune=generic
   +#CXXFLAGS += -mtune=generic
    endif
    endif
   
   diff -rupN BitcoinArmory/cppForSwig/Makefile BitcoinArmoryModified/cppForSwig/Makefile
   --- BitcoinArmory/cppForSwig/Makefile   2013-03-26 16:14:29.666518482 +0100
   +++ BitcoinArmoryModified/cppForSwig/Makefile   2013-03-26 21:36:47.046595921 +0100
   @@ -1,18 +1,16 @@
   -COMPILER = g++
   +COMPILER = $(CXX)
    #COMPILER_OPTS = -c -g -Wall -fPIC -D_DEBUG
    COMPILER_OPTS = -c -O2 -pipe -fPIC
   
    #**************************************************************************
   -LINKER = g++
   +LINKER = $(CXX)
    OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a
   
   
   -DEPSDIR ?= /usr
   -
    INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS
    LIBRARY_OPTS += -lpthread
    SWIG_OPTS    += -c++ -python -classic -threads
   -PYVER        += `python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`
   +PYVER        += 2.7
   
   
    UNAME := $(shell uname)
   @@ -37,7 +35,7 @@ all :
       make BlockUtilsTest.out
       
    swig : $(OBJS) CppBlockUtils_wrap.o
   -   g++ -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
   +   $(CXX) -shared $(LIBRARY_OPTS) $(OBJS) $(STATICPYTHON) CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
       pyrcc4 -o ../qrc_img_resources.py ../imgList.xml
   
    BlockUtilsTest.out : $(OBJS) BlockUtilsTest.cpp
and close the file by hitting control+d.

Apply the patch:
Quote
   patch -p1 < BitcoinArmory.patch
## Build & package it
Quote
   DEPSDIR=/home/[USERNAME]/src/Crosstool/RaspberryPi CXX=arm-unknown-linux-gnueabi-g++ make

   mkdir -p /tmp/BitcoinArmoryRPi/img/
   cp *.py *.so README LICENSE /tmp/BitcoinArmoryRPi/
   cp img/* /tmp/BitcoinArmoryRPi/img/
   cd /tmp
   tar cvfz BitcoinArmoryRPi.tar.gz BitcoinArmoryRPi

   scp /tmp/BitcoinArmoryRPi.tar.gz pi@[IP_OF_PI_GOES_HERE]:/home/pi/Desktop/
## Configure Pi
Install required packages
Quote
   sudo apt-get update
   sudo apt-get install python-qt4 python-twisted
Finally, to start armory execute:
Quote
   python ArmoryQt.py

## Resources / References
* [Building Armory from source](https://bitcoinarmory.com/building-armory-from-source/)
* [Building the Armory Bitcoin client for the Raspberry Pi](https://gist.github.com/FiloSottile/3646033#file-cxx-patch)
* [Bitcointalk: Building Armory on Raspberry Pi](https://bitcointalk.org/index.php?topic=156003)
* [The Ten Minute Guide to diff and patch](http://jungels.net/articles/diff-patch-ten-minutes.html)
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
March 28, 2013, 07:54:28 AM
 #16

Some things I feel are noteworthy:

Would be nice to have Armory autostart once x is up and running. Not sure how to do this in linux. I intend to figure it out after easter is done. I would imagine it is very simple.

It is VERY slow to decrypt an encrypted wallet, it took a couple of minutes to do it for me when i was doing an initial test. I'm contemplating using full disk encryption instead of encrypting each individual wallet since I intend to have a SD-card that i use only for armory. However, i fear this might make the Pi so slow as to make it unusable. Not sure how to it either, but isn't that the point of having a pi? To learn new stuff Smiley. Anyway, this also something to add to the todo list.
chufchuf
Full Member
***
Offline Offline

Activity: 205


View Profile
April 09, 2013, 12:08:37 AM
 #17

thanks a lot for this write up. i want to ask you two things:

do you think it being so slow might be because raspberry pi isn't designed for ubuntu. it's not one of its officially supported OSes. Or is it because pi is generally slow all around when it comes to 2D acceleration?

And, I noticed you used the command line a lot. Is there any reason why a simpler transfer through USB stick, and Unetbootin, might not be just as good, first the OS through an .iso, then Armory, as detailed (though not with Pi) in this blog: http://georgeoughttohelp.tumblr.com/post/46937654072/transferring-bitcoins-to-a-secure-offline-wallet-using
bektar
Jr. Member
*
Offline Offline

Activity: 37


View Profile
April 09, 2013, 04:37:11 AM
 #18

On the Pi i used Raspbian wheezy. I didn't think of mentioning it, so I'm glad thing you asked.

Not sure why it is so slow, my guess would be simply because the arm chip isn't very powerful. I imagine the libraries used aren't optimized for arm either. Neither one of these theories provide a way to increase the speed though, so hopefully i'm wrong.

I'm sure using tools with GUIs will work just as well. The main reason I stuck with the command line is that it is so easy to reproduce the results; just copy each line and in the end it will work. Using a GUI makes it a bit trickier to clearly explain each step.
runeks
Legendary
*
Offline Offline

Activity: 952



View Profile WWW
April 21, 2013, 10:39:58 PM
 #19

I'm trying to build Bitcoin Armory on a Raspberry Pi with Rapsbian (to use as an offline wallet) and I'm in need of assistance.

I've found a couple of guides on how to set up a cross compiler, building it, and then moving it over to the pi. I can't get any of them to work, so I decided to start by getting Armory to build on the Pi itself, and then moving on to getting it to work on the cross compiler.

Since Raspbian is based on debian, I was hoping I could just use the build instructions for Ubuntu found on the official Armory page http://bitcoinarmory.com/building-armory-from-source/.

Doing this ends up with the error:

Quote
make[2]: Entering directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
g++ -DNDEBUG -O -g0 -native -template=no%extdef  -c 3way.cpp
g++: error: unrecognized option ‘-native’
g++: error: unrecognized option ‘-template=no%extdef’
make[2]: *** [3way.o] Error 1
make[2]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig/cryptopp'
mv: cannot stat `libcryptopp.a': No such file or directory
make[1]: *** [libcryptopp.a] Error 1
make[1]: Leaving directory `/home/pi/Desktop/Armory/BitcoinArmory/cppForSwig'
make: *** [all] Error 2

[...]


This error seems to be caused by the Makefile in cryptopp 5.6.1 detecting the compiler on the Raspberry Pi to be a Sun C++ compiler (I have no idea why that happens). To fix this issue simply replace the Makefile in cppForSwig/cryptopp with the GNUmakefile that is in cryptopp 5.6.2 (link).

The next problem I ran into was strange assembler errors. Turns out this was caused by the Pi running out of memory. Creating a large swap file and using it as swap solved this issue. How to do this is described here: http://www.roberteklund.org/projects/raspberry-pi#TOC-Installation1
wsoei
Jr. Member
*
Offline Offline

Activity: 46



View Profile
May 12, 2013, 04:34:59 AM
 #20

   
## Copy libraries from Pi
Quote
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/include/python2.7 ~/src/Crosstool/RaspberryPi/include
   scp -r pi@[IP_OF_PI_GOES_HERE]:/usr/lib/libpython2.7.so ~/src/Crosstool/RaspberryPi/lib


I'm stuck on this one.  Can an example of IP_of_PI be given?  Thanks for any help provided.

Tip Jar: 19j2N3ow9X8G9jTfjZHEWDSfzBBkunkg6W
Petition to Ban BFL from Advertising
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!