Pages:
Author

Topic: Building Armory on OSX - page 6. (Read 32281 times)

hero member
Activity: 742
Merit: 500
September 15, 2012, 01:24:34 AM
#86
I'm testing the threaded branch on my own machine.  It built without issue for me and is easy to run with "PYTHONPATH=`brew --prefix`/lib/python2.7/site-packages /usr/bin/python ArmoryQt.py"

Once I'm happy with the stability, I'll switch my brew tap to it.

If you are itching to try out the bleeding edge: https://github.com/WyseNynja/BitcoinArmory/tree/threading
hero member
Activity: 742
Merit: 500
September 08, 2012, 01:18:43 PM
#85
You probably need to update your command line tools.  Open up Xcode > Preferences > Downloads.  I've compiled on Mountain Lion.  Also, maybe run `brew doctor` and see if it says anything.
Yup that was it... I didn't realize that the OS upgrade would un-install them.

Thanks for everything Red Emerald
Well it leaves them installed, but I think they are all compiled for Lion which has older versions of a lot of things and so won't work.

Glad I could help!
hero member
Activity: 560
Merit: 500
I am the one who knocks
September 08, 2012, 10:49:40 AM
#84
You probably need to update your command line tools.  Open up Xcode > Preferences > Downloads.  I've compiled on Mountain Lion.  Also, maybe run `brew doctor` and see if it says anything.
Yup that was it... I didn't realize that the OS upgrade would un-install them.

Thanks for everything Red Emerald
legendary
Activity: 1498
Merit: 1000
September 04, 2012, 02:47:10 AM
#83
Red Emerald, amazing formula but how do I upgrade, armory is saying their is a new version but

Code:
% brew upgrade wysenynja/bitcoin/armory-qt
Error: armory-qt-HEAD already installed
% brew upgrade --HEAD wysenynja/bitcoin/armory-qt
Error: armory-qt-HEAD already installed
hero member
Activity: 547
Merit: 500
Decor in numeris
September 06, 2012, 08:13:49 AM
#83
Hrm...  So I was able to receive and send funds.  I imported a bunch of addresses (~15) and restarted... now Armory has been loading for >20 mins.....

Any ideas as to what could be causing the slowdown?

EDIT:  40 mins in and it just switched to blk0002.dat.  This sucks,  it is like using a 5 year old PC on a mac.  There has to be some reason for the slowdown.
What are your system specs? What OS version? Latest dev branch?

My load times aren't nearly that bad, but I'm on a SSD.

This is not right.  On my mac it takes less than 2 min to load.  I am using an SSD too, but it is CPU limited.

However, it may be a crash.  Occationally, I see Armory crash when reading a block, in particular if I start it while the Satoshi client is catching up.  I guess it gets confused by reading a block while it is being written to disk.  That could in principle also hang your client.
hero member
Activity: 742
Merit: 500
September 05, 2012, 11:56:28 PM
#82
It's in https://github.com/Homebrew/homebrew-versions

Code:
brew tap homebrew/versions
brew install wysenynja/bitcoin/bitcoind
Thanks... I added it but now I am getting a compile error for it (berkeley-db4):
Code:
libtool: compile:  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -I. -I../dist/.. -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c  -fno-common -DPIC -o .libs/db_java_wrap.o
../dist/../libdb_java/db_java_wrap.c:137:10: fatal error: 'jni.h' file not found
#include
         ^
1 error generated.

I have my feelings that it is due to upgrading to Mt. Lion this weekend, has anyone else compiled this on Mt. Lion?
The new version thing is a bug.  I am waiting for etotheipi to merge some changes and then I will switch the formula to his repo.

You probably need to update your command line tools.  Open up Xcode > Preferences > Downloads.  I've compiled on Mountain Lion.  Also, maybe run `brew doctor` and see if it says anything.
hero member
Activity: 560
Merit: 500
I am the one who knocks
September 04, 2012, 03:02:15 PM
#81
It's in https://github.com/Homebrew/homebrew-versions

Code:
brew tap homebrew/versions
brew install wysenynja/bitcoin/bitcoind
Thanks... I added it but now I am getting a compile error for it (berkeley-db4):
Code:
libtool: compile:  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -c -I. -I../dist/.. -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.8 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fno-strict-aliasing ../dist/../libdb_java/db_java_wrap.c  -fno-common -DPIC -o .libs/db_java_wrap.o
../dist/../libdb_java/db_java_wrap.c:137:10: fatal error: 'jni.h' file not found
#include
         ^
1 error generated.

I have my feelings that it is due to upgrading to Mt. Lion this weekend, has anyone else compiled this on Mt. Lion?
hero member
Activity: 560
Merit: 500
I am the one who knocks
September 04, 2012, 02:42:07 PM
#80
Red Emerald, amazing formula but how do I upgrade, armory is saying their is a new version but

Code:
% brew upgrade wysenynja/bitcoin/armory-qt
Error: armory-qt-HEAD already installed
% brew upgrade --HEAD wysenynja/bitcoin/armory-qt
Error: armory-qt-HEAD already installed
You can't until he updates the forumla.  Last I knew he was waiting for mac specific things to be merged into master.
hero member
Activity: 742
Merit: 500
September 04, 2012, 12:32:03 AM
#79
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 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.
Just tried to get an updated version of bitcoind from your forumula and got this error:
Code:
$ brew install bitcoind                                                                                                                  
Error: No available formula for berkeley-db4 (dependency of bitcoind)

Did you do a keg for that from somewhere?

Btw, I finally removed bsddb, so that dependency should be gone...

Though, in the future, I might add it back if the devs don't move on this new wallet format.  Luckily, I am pretty sure they won't be using BSDDB for the new wallet format, but if they procrastinate much longer past when I get compressed public keys, I might have to do this.
But this is for bitcoind.... doesn't that still depend on BDB?

It's in https://github.com/Homebrew/homebrew-versions

Code:
brew tap homebrew/versions
brew install wysenynja/bitcoin/bitcoind
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 31, 2012, 11:35:28 PM
#78
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 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.
Just tried to get an updated version of bitcoind from your forumula and got this error:
Code:
$ brew install bitcoind                                                                                                                 
Error: No available formula for berkeley-db4 (dependency of bitcoind)

Did you do a keg for that from somewhere?

Btw, I finally removed bsddb, so that dependency should be gone...

Though, in the future, I might add it back if the devs don't move on this new wallet format.  Luckily, I am pretty sure they won't be using BSDDB for the new wallet format, but if they procrastinate much longer past when I get compressed public keys, I might have to do this.
But this is for bitcoind.... doesn't that still depend on BDB?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
August 31, 2012, 11:22:44 PM
#77
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 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.
Just tried to get an updated version of bitcoind from your forumula and got this error:
Code:
$ brew install bitcoind                                                                                                                 
Error: No available formula for berkeley-db4 (dependency of bitcoind)

Did you do a keg for that from somewhere?

Btw, I finally removed bsddb, so that dependency should be gone...

Though, in the future, I might add it back if the devs don't move on this new wallet format.  Luckily, I am pretty sure they won't be using BSDDB for the new wallet format, but if they procrastinate much longer past when I get compressed public keys, I might have to do this.
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 31, 2012, 06:33:07 PM
#76
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 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.
Just tried to get an updated version of bitcoind from your forumula and got this error:
Code:
$ brew install bitcoind                                                                                                                 
Error: No available formula for berkeley-db4 (dependency of bitcoind)

Did you do a keg for that from somewhere?
hero member
Activity: 742
Merit: 500
August 28, 2012, 11:05:31 PM
#75
I saw that error on my own system, but building with the proper libpython2.7.a is what fixed it.

After fixing the symlinks, did you reinstall, or did you just try to rerun the command? You will need to uninstall and install again.

Also, what is in your site packages folder?

Code:
$ ls `brew --prefix`/lib/python2.7/site-packages
PyQt4/                                   pydot.pyc
Twisted-12.1.0-py2.7.egg-info/           pyparsing-1.5.6-py2.7.egg-info/
altgraph/                                pyparsing.py
altgraph-0.9-py2.7.egg-info/             pyparsing.pyc
bsddb3/                                  setuptools-0.6c11-py2.7.egg-info
bsddb3-5.3.0-py2.7.egg-info/             setuptools.pth
distribute-0.6.26-py2.7.egg/             sip.so@
distribute-0.6.27-py2.7.egg/             sipconfig.py@
dot_parser.py                            sipconfig.pyc
dot_parser.pyc                           sipdistutils.py@
easy-install.pth                         site.py
git_remote_helpers/                      site.pyc
git_remote_helpers-0.1.0-py2.7.egg-info@ twisted/
init_cov_core.pth                        virtualenv-1.7.1.2-py2.7.egg-info/
macholib/                                virtualenv.py
macholib-1.4.3-py2.7.egg-info/           virtualenv.pyc
modulegraph/                             virtualenv_support/
modulegraph-0.9.1-py2.7.egg-info/        virtualenvwrapper/
pip-1.1-py2.7.egg/                       virtualenvwrapper-3.4-py2.7-nspkg.pth
py2app/                                  virtualenvwrapper-3.4-py2.7.egg-info/
py2app-0.6.4-py2.7.egg-info/             zope/
pydot-1.0.28-py2.7.egg-info/             zope.interface-4.0.1-py2.7-nspkg.pth
pydot.py                                 zope.interface-4.0.1-py2.7.egg-info/

I have a few more things than you probably, but yours should look similar to mine.
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 28, 2012, 10:04:42 AM
#74
My formula does not install python because brew's python isn't needed (at least in Lion+).  I built armory against the system python as that required less modifications to the Makefile.  That is also why my ArmoryQt.command uses /usr/bin/python and sets PYTHONPATH.

What version of OSX are you using?
Interesting.... I am on Lion (10.7.7).

I'm guessing your messing with the links to the Framework folders is why it won't build.
Ya probably... it was way out of whack with what you posted, here are my new 'fixed' results
Code:
$ ls -la /usr/lib | grep python2.7                                                                                                           
lrwxr-xr-x    1 root  wheel        18 Aug 22  2011 libpython.dylib -> libpython2.7.dylib
lrwxr-xr-x    1 root  wheel        68 Aug 22  2011 libpython2.7.dylib -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/Python
lrwxr-xr-x    1 root  wheel        75 Aug 28 07:57 python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

If those don't match me (likely because you have messed with those while trying to get Armory to work in the past), then change them to be what I have and try to reinstall armory-qt.  Don't point them to brew.  The system python should work fine.  
Expect it didn't :/  Same error I was getting before:
Code:
$ /usr/local/Cellar/armory-qt/HEAD/bin/ArmoryQt.command                                                                                     
********************************************************************************
Loading Armory Engine:
   Armory Version:       0.82.5
   PyBtcWallet  Version: 1.35
Detected Operating system: Mac/OSX
   User home-directory   : /Users/aburns/Library/Application Support
   Satoshi BTC directory : /Users/aburns/Library/Application Support/Bitcoin/
   Armory home dir       : /Users/aburns/Library/Application Support/Armory/
Fatal Python error: PyThreadState_Get: no current thread
/usr/local/Cellar/armory-qt/HEAD/bin/ArmoryQt.command: line 2: 89681 Abort trap: 6           PYTHONPATH=`brew --prefix`/lib/python2.7/site-packages /usr/bin/python `brew --prefix wysenynja/bitcoin/armory-qt`/share/armory/ArmoryQt.py
hero member
Activity: 742
Merit: 500
August 27, 2012, 09:33:04 PM
#73
Hrm...  So I was able to receive and send funds.  I imported a bunch of addresses (~15) and restarted... now Armory has been loading for >20 mins.....

Any ideas as to what could be causing the slowdown?

EDIT:  40 mins in and it just switched to blk0002.dat.  This sucks,  it is like using a 5 year old PC on a mac.  There has to be some reason for the slowdown.
What are your system specs? What OS version? Latest dev branch?

My load times aren't nearly that bad, but I'm on a SSD.
hero member
Activity: 742
Merit: 500
August 27, 2012, 09:25:37 PM
#72
Red Emerald....

I think with your forumla I have *finally* managed some form of success.... Armory appears to be loading now (loading blk0001.dat)

For others running into the dreaded error:
Code:
/usr/lib/python2.7/config/libpython2.7.a: No such file or directory

Here is what I did to, i think, finally resolve this:
 * brew uninstall anything needed  for Armory: python, cryptopp, swig, sip, qt, pyqt, twisted.
 * brew install --HEAD armory-qt  (after adding the tap of course)
 * interestingly enough this did not install python, so: brew install python

This is where things got interesting... I have somehow gotten my python into 'framework' mode so things didn't work out of the box.

Also I found that when python installs libpython is actually a relative symlink, and given that the armory build is looking in /usr/lib this is why it breaks.  I have created the following script that fixes up my symlinks for me and then a brew install armory-qt worked like a champ (i think... it build/appears to run at least).

Also the command file you built did not work for me... I had to use brew python:
Code:
python /usr/local/Cellar/armory-qt/HEAD/share/armory/ArmoryQt.py

Here is the script I made, please note this will almost certainly not work 'out of the box' but at least be a guide for others:
Code:
#!/bin/bash
# See bottom of script for example paths
CELLAR=`brew --cellar python`
FRAMEWORK_PATH="$CELLAR/2.7.3/Frameworks/Python.framework"
PYTHON_PATH="$FRAMEWORK_PATH/Versions/2.7/Python"

# Update Brew links
cd $FRAMEWORK_PATH/Versions/2.7/lib/python2.7/config
rm libpython2.7.a
rm libpython2.7.dylib
ln -s $PYTHON_PATH libpython2.7.a
ln -s $PYTHON_PATH libpython2.7.dylib


# Now update system links
echo "Updating /usr/lib link... will need to sudo:"
sudo rm /usr/lib/python2.7
sudo ln -s $FRAMEWORK_PATH/Versions/2.7/lib/python2.7 /usr/lib/python2.7

echo "Links updated..."

# /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Python
# /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config

@Red Emerald: if armory does indeed come up then I will send you some coin as I have wanted this for MONTHS.  Thank you thank you thank you!
My formula does not install python because brew's python isn't needed (at least in Lion+).  I built armory against the system python as that required less modifications to the Makefile.  That is also why my ArmoryQt.command uses /usr/bin/python and sets PYTHONPATH.

What version of OSX are you using?

I'm guessing your messing with the links to the Framework folders is why it won't build.  What does this command give for you?
Code:
$ ls -la /usr/lib | grep python2.7
lrwxr-xr-x    1 root     wheel    18B Jul 26 16:01 libpython.dylib@ -> libpython2.7.dylib
lrwxr-xr-x    1 root     wheel    68B Jul 26 16:01 libpython2.7.dylib@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/Python
lrwxr-xr-x    1 root     wheel    75B Jul 26 16:01 python2.7@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
If those don't match me (likely because you have messed with those while trying to get Armory to work in the past), then change them to be what I have and try to reinstall armory-qt.  Don't point them to brew.  The system python should work fine.  
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 27, 2012, 05:21:04 PM
#71
Hrm...  So I was able to receive and send funds.  I imported a bunch of addresses (~15) and restarted... now Armory has been loading for >20 mins.....

Any ideas as to what could be causing the slowdown?

EDIT:  40 mins in and it just switched to blk0002.dat.  This sucks,  it is like using a 5 year old PC on a mac.  There has to be some reason for the slowdown.
legendary
Activity: 1498
Merit: 1000
August 27, 2012, 12:26:10 PM
#70
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 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.

thanks works great, but only thing is it never created the link to application, so I just added my own apple script
hero member
Activity: 560
Merit: 500
I am the one who knocks
August 27, 2012, 04:21:48 PM
#70
Red Emerald....

I think with your forumla I have *finally* managed some form of success.... Armory appears to be loading now (loading blk0001.dat)

For others running into the dreaded error:
Code:
/usr/lib/python2.7/config/libpython2.7.a: No such file or directory

Here is what I did to, i think, finally resolve this:
 * brew uninstall anything needed  for Armory: python, cryptopp, swig, sip, qt, pyqt, twisted.
 * brew install --HEAD armory-qt  (after adding the tap of course)
 * interestingly enough this did not install python, so: brew install python

This is where things got interesting... I have somehow gotten my python into 'framework' mode so things didn't work out of the box.

Also I found that when python installs libpython is actually a relative symlink, and given that the armory build is looking in /usr/lib this is why it breaks.  I have created the following script that fixes up my symlinks for me and then a brew install armory-qt worked like a champ (i think... it build/appears to run at least).

Also the command file you built did not work for me... I had to use brew python:
Code:
python /usr/local/Cellar/armory-qt/HEAD/share/armory/ArmoryQt.py

Here is the script I made, please note this will almost certainly not work 'out of the box' but at least be a guide for others:
Code:
#!/bin/bash
# See bottom of script for example paths
CELLAR=`brew --cellar python`
FRAMEWORK_PATH="$CELLAR/2.7.3/Frameworks/Python.framework"
PYTHON_PATH="$FRAMEWORK_PATH/Versions/2.7/Python"

# Update Brew links
cd $FRAMEWORK_PATH/Versions/2.7/lib/python2.7/config
rm libpython2.7.a
rm libpython2.7.dylib
ln -s $PYTHON_PATH libpython2.7.a
ln -s $PYTHON_PATH libpython2.7.dylib


# Now update system links
echo "Updating /usr/lib link... will need to sudo:"
sudo rm /usr/lib/python2.7
sudo ln -s $FRAMEWORK_PATH/Versions/2.7/lib/python2.7 /usr/lib/python2.7

echo "Links updated..."

# /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Python
# /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config

@Red Emerald: if armory does indeed come up then I will send you some coin as I have wanted this for MONTHS.  Thank you thank you thank you!
hero member
Activity: 742
Merit: 500
August 27, 2012, 02:01:57 PM
#69
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 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.

thanks works great, but only thing is it never created the link to application, so I just added my own apple script
It doesn't do that part automatically. My formula tells you how to link the command after it finishes installing. You can also run "brew info wysenynja/bitcoin/armory-qt"
Pages:
Jump to: