Pages:
Author

Topic: Building Armory on OSX - page 5. (Read 32312 times)

legendary
Activity: 1498
Merit: 1000
December 03, 2012, 09:44:08 PM
I did brew update and it did list it as one of the forumlas it did update
Code:
% brew install wysenynja/bitcoin/armory-qt
Error: armory-qt-HEAD already installed
hero member
Activity: 742
Merit: 500
December 03, 2012, 09:39:39 PM
It gives me the error, that it is up to date and it isn't armory is still 0.8.4

Can you post the output of `brew install wysenynja/bitcoin/armory-qt`

Also, if you have already used my tap, you will need to `brew update` otherwise you will be using the old formula.
legendary
Activity: 1498
Merit: 1000
December 03, 2012, 09:32:12 PM
It gives me the error, that it is up to date and it isn't armory is still 0.8.2.5 BETA
hero member
Activity: 742
Merit: 500
December 03, 2012, 08:53:25 PM
I've updated my brew tap to point to master! Let me know if it works!

Code:
brew doctor
brew tap WyseNynja/bitcoin
brew install --HEAD wysenynja/bitcoin/armory-qt

From there it's incredibly easy to run (assuming you have brew's bin on your path, which you probably do).

Code:
ArmoryQt.command

If you need bitcoind, it is in my tap, too.

Code:
brew install wysenynja/bitcoin/bitcoind

Once etotheipi tags a stable version, I'll setup the formula so you don't have to use "--HEAD"


There's already a tag for "v0.85-beta".  Though I accidentally tagged it on the threading branch, I don't think that matters.  Simply referencing that tag should get you there, regardless of what branch you're on.
Done!

You should probably update the instructions on bitcoinarmory.com to match.

I'll keep "--HEAD" on whatever branch you are developing and make the default install your most recent stable tag/branch.

Code:
brew doctor
brew tap WyseNynja/bitcoin
brew update
brew install wysenynja/bitcoin/armory-qt
ArmoryQt.command
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
December 03, 2012, 08:43:53 PM
I've updated my brew tap to point to master! Let me know if it works!

Code:
brew doctor
brew tap WyseNynja/bitcoin
brew install --HEAD wysenynja/bitcoin/armory-qt

From there it's incredibly easy to run (assuming you have brew's bin on your path, which you probably do).

Code:
ArmoryQt.command

If you need bitcoind, it is in my tap, too.

Code:
brew install wysenynja/bitcoin/bitcoind

Once etotheipi tags a stable version, I'll setup the formula so you don't have to use "--HEAD"


There's already a tag for "v0.85-beta".  Though I accidentally tagged it on the threading branch, I don't think that matters.  Simply referencing that tag should get you there, regardless of what branch you're on.
hero member
Activity: 742
Merit: 500
December 03, 2012, 08:42:24 PM
I've updated my brew tap to point to master! Let me know if it works!

Code:
brew doctor
brew tap WyseNynja/bitcoin
brew install --HEAD wysenynja/bitcoin/armory-qt

From there it's incredibly easy to run (assuming you have brew's bin on your path, which you probably do).

Code:
ArmoryQt.command

If you need bitcoind, it is in my tap, too.

Code:
brew install wysenynja/bitcoin/bitcoind

Once etotheipi tags a stable version, I'll setup the formula so you don't have to use "--HEAD"
hero member
Activity: 742
Merit: 500
November 23, 2012, 09:41:05 PM
So I made this super simple for people.  I'm sure etotheipi will eventually do this himself, but if you want Armory up and running fast and right now.

Code:
brew tap homebrew/versions
brew tap WyseNynja/bitcoin
brew install wysenynja/bitcoin/bitcoind
brew install --HEAD wysenynja/bitcoin/armory-qt

You don't need to install bitcoind, but I like to. I might eventually add a startup service for bitcoind.

EDIT: I forgot to mention tapping homebrew/versions
berkely-db4 is now in the main brew formula list.  However, armory doesn't need it anymore. Once threading gets merged into master, I'll update this tap.  I'll also get rid of the "--HEAD" requirement
hero member
Activity: 742
Merit: 500
November 07, 2012, 03:05:48 AM
#99
EDIT: Check out the most up-to-date instructions here.

Success gentlemen Smiley

The only thing that needs adding to those instructions is:

Code:
brew install berkeley-db

The rest was me not installing the stuff properly (I grabbed the entire block and pasted it into the terminal.  I though it was installing the stuff 1 by 1 but clearly not Cheesy).

Thanks a lot for the help everyone.   Not ideal having to install it this way, but it works (and it's kind of fun if you're a dork like me, so that helps).
We don't need berkeley-db anymore.  It was only used to import the satoshi wallets and that has been dropped.


Here are my steps:


Code:
$ brew doctor
Do what the doctor says!

Code:
$ brew install python cryptopp swig sip qt pyqt
Make sure this ends in success!

I prefer to use brew's python since it is newer (2.7.3 vs ML's 2.7.2). Plus it is installed as my user so I can muck with it without sudo and I don't have to worry about breaking anything on my system.

Put this in your ~/.bashrc.  I do not recommend setting PYTHONPATH here.  It can get annoying when you are working on other Python projects.
Code:
export PATH=`brew --prefix`/share/python:$PATH
export CFLAGS="-arch x86_64"
export ARCHFLAGS="-arch x86_64"

Then run some more commands
Code:
$ pip install twisted
$ mkdir ~/src
$ cd ~/src
$ git clone git://github.com/etotheipi/BitcoinArmory.git
$ git checkout threading
$ cd BitcoinArmory
$ make
Hopefully soon we will won't need the threading branch and can just use master.

Running Armory is a bit awkward, but it isn't too bad.  You have to set PYTHONPATH so the system python can find pyqt and twisted.  I'm not sure why, but I haven't been able to get it built against brew's python.  Since "make" builds against the system python, you need to make sure you don't use some other one. Brew recommends you put it's python in the front of PATH, so using the full path to the system python makes sure we use the right one.
Code:
$ PYTHONPATH=`brew --prefix`/lib/python2.7/site-packages /usr/bin/python ArmoryQt.py

Once I can get it Armory online properly, I'll update my brew tap.  I keep getting a segfault while it's loading the blockchain.  I'm re-downloading the chain now.

EDIT: A fresh blockchain didn't help.  I'm going to dig deeper this weekend.
hero member
Activity: 798
Merit: 1000
November 07, 2012, 12:27:55 AM
#98
Success gentlemen Smiley

The only thing that needs adding to those instructions is:

Code:
brew install berkeley-db

The rest was me not installing the stuff properly (I grabbed the entire block and pasted it into the terminal.  I though it was installing the stuff 1 by 1 but clearly not Cheesy).

Thanks a lot for the help everyone.   Not ideal having to install it this way, but it works (and it's kind of fun if you're a dork like me, so that helps).
hero member
Activity: 798
Merit: 1000
November 07, 2012, 12:02:33 AM
#97
Right, when running the "make swig" command, it processes for while then ends with:

swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
make: swig: No such file or directory
make: *** [CppBlockUtils_wrap.cxx] Error 1

Is swig in /usr/local/bin?  If so, you probably just need to add /usr/local/bin to the PATH


No, swig isn't present....

Code:
brew install swig

Thanks Smiley

Well, I did that and swig installed fine as far as I can tell.  However, make swig gives me:

Code:
macmini:cppforswig Simon$ make swig
g++ -shared -lpthread  UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a "/usr/lib/python`python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`/config/libpython`python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'`.a" CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
pyrcc4 -o ../qrc_img_resources.py ../imgList.xml
make: pyrcc4: No such file or directory
make: *** [swig] Error 1

brew install pyrcc4? (edit:  nope...)


EDIT2:  Ah, hold on.  The initial round of "brew installs" didn't work I don't think (hence why I didn't have swig).   Just reinstalling the stuff now.
hero member
Activity: 742
Merit: 500
November 06, 2012, 09:54:22 PM
#96
Right, when running the "make swig" command, it processes for while then ends with:

swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
make: swig: No such file or directory
make: *** [CppBlockUtils_wrap.cxx] Error 1

Is swig in /usr/local/bin?  If so, you probably just need to add /usr/local/bin to the PATH


No, swig isn't present....

Code:
brew install swig
hero member
Activity: 798
Merit: 1000
November 06, 2012, 03:31:09 PM
#95
Right, when running the "make swig" command, it processes for while then ends with:

swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
make: swig: No such file or directory
make: *** [CppBlockUtils_wrap.cxx] Error 1

Is swig in /usr/local/bin?  If so, you probably just need to add /usr/local/bin to the PATH


No, swig isn't present....
hero member
Activity: 547
Merit: 500
Decor in numeris
November 06, 2012, 07:25:25 AM
#94
Right, when running the "make swig" command, it processes for while then ends with:

swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
make: swig: No such file or directory
make: *** [CppBlockUtils_wrap.cxx] Error 1

Is swig in /usr/local/bin?  If so, you probably just need to add /usr/local/bin to the PATH

picobit, are you also setting PYTHONPATH?

Otherwise, I don't see how the system python would find pyqt.

Yes indeed, I set PYTHONPATH.  I will edit my post and add it.
hero member
Activity: 798
Merit: 1000
November 06, 2012, 05:13:53 AM
#93
Right, when running the "make swig" command, it processes for while then ends with:

swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
make: swig: No such file or directory
make: *** [CppBlockUtils_wrap.cxx] Error 1
hero member
Activity: 798
Merit: 1000
November 06, 2012, 04:59:37 AM
#92
Right, now stuck on:

macmini:BitcoinArmory Simon$ cd cppForSwig
macmini:cppForSwig Simon$ export CFLAGS=”-arch x86_64″
-bash: export: `x86_64″': not a valid identifier


EDIT:  Ok, think I sorted that, just something wrong with the speech marks Smiley 
hero member
Activity: 798
Merit: 1000
November 06, 2012, 04:35:36 AM
#91
Ah, forgot about this, giving it a try now and I get the following:

macmini:~ Simon$ export BERKELEYDB_INCDIR=/usr/local/Cellar/berkeley-db/5.3.21/include/
macmini:~ Simon$ sudo easy_install bsddb3
Searching for bsddb3
Reading http://pypi.python.org/simple/bsddb3/
Reading http://www.jcea.es/programacion/pybsddb.htm
Reading http://www.argo.es/~jcea/programacion/pybsddb.htm
Best match: bsddb3 5.3.0
Downloading http://pypi.python.org/packages/source/b/bsddb3/bsddb3-5.3.0.zip#md5=305c3d42fe598b56349161497eb9bfc4
Processing bsddb3-5.3.0.zip
Running bsddb3-5.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Dm3no_/bsddb3-5.3.0/egg-dist-tmp-VrGGt6
Can't find a local Berkeley DB installation.
(suggestion: try the --berkeley-db=/path/to/bsddb option)
error: Setup script exited with 1
macmini:~ Simon$

Everything up until then went OK, and I assume it's a simple fix but I just don't know enough unix/OSX to troubleshoot it unfortunately...


EDIT:  OK, somehow managed to get BerkeleyDB installed and got past that error.   Moving on Smiley
hero member
Activity: 742
Merit: 500
November 05, 2012, 09:33:22 PM
#90
picobit, are you also setting PYTHONPATH?

Otherwise, I don't see how the system python would find pyqt.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
November 05, 2012, 10:03:41 AM
#89
Thanks for that picobit.

While I don't know much about OSX, I do want to point out that I removed the BSDDB dependency in Armory.  So the steps that involve configuring and installing that can be removed.  It was because the BSDDB was only used for migrating pre-0.6.0 Bitcoin-Qt wallets, and those have been "out of style" so long that I finally removed the feature altogether.

Maybe it's okay to leave those steps, since I might add it back in one day.  But if someone is getting stuck there, they should know that it's unimportant.
hero member
Activity: 547
Merit: 500
Decor in numeris
November 05, 2012, 04:23:39 AM
#88
I installed the new "threading" version of Armory under Mac OS X Mountain Lion.  Although still slightly experimental, it is the version that etotheipi says is going to be the official version real soon now, when Armory goes into beta (from alpha, see https://bitcointalksearch.org/topic/m.1315445).

I use homebrew to install the dependencies.  On a Mac, there are at least three competing package managers for Unix/Linux software, homebrew, macports and fink.  I would be seriously surprised if it matters which one you choose, so don't let this thread decide for you.  Also, I have chosen to use the system's Python installation, and *not* install homebrews own python.  This is more in line with homebrew's philosophy of not duplicating packages, and is one of the reasons I chose homebrew.  But again, I really cannot claim superiority of this approach [in fact, I really don't know what I am doing Smiley ], and I am sure both choices are equally good for Armory.

So here are the steps (partly from memory, forgive me if I forgot something essential!).  All of this is done in a Terminal window.

0) Be sure to have the newest xcode installed, including the command line tools.

1) Install homebrew by copy-pasting the ruby installation command from the homebrew web page into the Terminal, see http://mxcl.github.com/homebrew/    

1a) You probably want to run brew doctor and fix any fixable problems before proceeding.

2) Install the first batch of prerequisites for Armory
Code:
brew install cryptopp
brew install swig
brew install sip
brew install qt
brew install pyqt
brew install berkeley-db

2a) (EDIT)  You have now installed Python stuff in /usr/local/lib.  The standard OS X Python will not find them, unless you add the directory to PYTHONPATH, e.g. by adding this line to the .profile file in your home directory
Code:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
Note that the .profile file starts with a period, meaning that it is a hidden file.

3) You also need some Python packages not in homebrew.  These can be installed with Python's easy_install or with pip (easy_install pip).  I think pip makes it easier to uninstall later, but neither of them do a proper job when it comes to package management Sad

Code:
easy_install twisted
export BERKELEYDB_INCDIR=/usr/local/Cellar/berkeley-db/5.3.21/include
easy_install bsddb3
WARNING: Don't uncritically copy-past the BERKELEYDB_INCDIR path above, it will change as new versions come along.  Instead, type it using TAB-completion.

4) Get the Armory source code, and switch to the threading branch (this assumes you want it placed as a subdirectory under your home directory, replace the first cd command if you want it elsewhere).

Code:
cd ~
git clone git://github.com/etotheipi/BitcoinArmory.git
cd BitcoinArmory
git checkout threading
(I am no git wizard - this could undoubtedly be done as one git command.)

5) Compile the C++/swig part of Armory.

Code:
cd cppForSwig
export CFLAGS=”-arch x86_64″
export ARCHFLAGS=”-arch x86_64″
make swig

6) Return to the main Armory directory

Code:
cd ..

7) Try it out!  Make sure you have internet, that the Satoshi client is running and (preferably) that it has finished catching up.

Code:
python ArmoryQt.py

8 ) Have fun.  Although I do have a bitcoin address in my signature, I really think you should donate to the Armory guys instead!

hero member
Activity: 798
Merit: 1000
November 04, 2012, 04:23:12 PM
#87
Hi guys,

So, this might be an interesting test for you.   I have just (literally, today) moved from Windows to OSX.   I'm almost totally new to Mac's in general, but certainly new to compiling on it.

I do have xcode and the command line tools installed, but not homebrew or anything else just yet.

Does anyone fancy giving me a bit of a step by step guide for getting Armory up and running?   I figure it'll serve as a good beginners guide going forward, and will also be a good test of the processes you've set up.

Much appreciated!!
Pages:
Jump to: