I was able to compile in Lion. It's a weird mix of system and brew though and I'm not sure I like it. I don't understand what exactly is going on, but it compiles.
I'll have updated instructions up sometime soon.
EDIT: It seems like this would be a breeze if you didn't use bsddb.
It's been depreciated in python 2.6 and completely removed in 3.0. I'm not sure if pybsddb even supports the newest version of berkeley-db4 (and berkeley-db5 has been out a while).Looks like I had an older version in my pip cache. I downloaded
http://pypi.python.org/packages/source/b/bsddb3/bsddb3-5.3.0.tar.gz#md5=d5aa4f293c4ea755e84383537f74be82 and installed that easily.
Install homebrew packages:
$ brew install python cryptopp swig sip qt pyqt berkeley-db
$ export PATH=`brew --prefix`/share/python:$PATH
$ export CFLAGS="-arch x86_64"
$ export ARCHFLAGS="-arch x86_64"
$ export BERKELEYDB_INCDIR=`brew --prefix berkeley-db`/include
$ export BERKELEYDB_LIBDIR=`brew --prefix berkeley-db`/lib
$ export PYTHONPATH=`brew –prefix`/lib/python2.7/site-packages:$PYTHONPATH
$ pip install twisted bsddb3
$ mkdir ~/src
$ cd ~/src
$ git clone git://github.com/etotheipi/BitcoinArmory.git
$ cd BitcoinArmory/cppForSwig
This is where it gets weird. I want this to work:
$ ln -s `brew --prefix`/lib/python2.7/config/libpython2.7.a .
But that fails with:
g++ -shared -lpthread UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a libpython2.7.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
Undefined symbols for architecture x86_64:
"_environ", referenced from:
_initposix in libpython2.7.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [swig] Error 1
So instead I'm building against the system python v2.7.1 (even though all the modules and such are brew's v2.7.3)
$ ln -s /usr/lib/python2.7/config/libpython2.7.a .
I also had to edit the makefile
vim Makefile
================================================================================
diff --git a/cppForSwig/Makefile b/cppForSwig/Makefile
index de3bb1d..716a039 100755
--- a/cppForSwig/Makefile
+++ b/cppForSwig/Makefile
@@ -8,10 +8,10 @@ OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUt
INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS
LIBRARY_OPTS += -lpthread
-SWIG_INC += -I/usr/include/python2.7
+SWIG_INC += -I/usr/local/include/python2.7
SWIG_OPTS += -c++ -python -classic
-ifneq (exists, $(shell [ -d /usr/include/python2.7 ] && echo exists ))
+ifneq (exists, $(shell [ -d /usr/local/include/python2.7 ] && echo exists ))
SWIG_INC = -I/usr/include/python2.6
LIBRARY_OPTS = -lpthread
ifneq (exists, $(shell [ -d /usr/include/python2.6 ] && echo exists ))
@@ -26,7 +26,7 @@ all :
make BlockUtilsTest.out
swig : $(OBJS) CppBlockUtils_wrap.o
- g++ -shared $(LIBRARY_OPTS) $(OBJS) libpython2.6.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
+ g++ -shared $(LIBRARY_OPTS) $(OBJS) libpython2.7.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so
pyrcc4 -o ../qrc_img_resources.py ../imgList.xml
BlockUtilsTest.out : $(OBJS) BlockUtilsTest.cpp
================================================================================
And then its just a little bit of waiting
make clean
make swig
cd ..
/usr/bin/python ArmoryQt.py
Note that is "/usr/bin/python" not brew's python. I don't get it, but it works because of PYTHONPATH (I think)
Loading blockchain took 83.3 seconds
EDIT: I just clicked "Filter:" and everything locked up