etotheipi / BitcoinArmory

Python-Based Bitcoin Software
Other
826 stars 619 forks source link

Doesn't compile in python3.4 #276

Closed majje closed 9 years ago

majje commented 9 years ago

cppForSwig doesn't compile in python3 as PyString_FromStringAndSize doens't exist

$ make
...
g++  -O2 -pipe -fPIC  -Icryptopp -Imdb -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS -I/usr/include/python3.4m -I/usr/include/python3.4m -std=c++11 -c CppBlockUtils_wrap.cxx
CppBlockUtils_wrap.cxx: In function ‘PyObject* _wrap_BlockHeader_getThisHash(PyObject*, PyObject*)’:
CppBlockUtils_wrap.cxx:30195:88: error: ‘PyString_FromStringAndSize’ was not declared in this scope
...
make[1]: *** [CppBlockUtils_wrap.o] Error 1
make[1]: Leaving directory '/home/majje/BitcoinArmory/cppForSwig'
Makefile:9: recipe for target 'all' failed

PYVER=python2 make works better

josephbisch commented 9 years ago

What commit are you building from? This recent commit seems like it might fix the error you are experiencing: https://github.com/etotheipi/BitcoinArmory/commit/df6dfa419fa8f98f5f3d8c2da42b0273265706d5.

majje commented 9 years ago

Sorry, missed to add that: commit a9e0f25d511574ec22b386be85b102add96a6476 (HEAD, tag: v0.93.1)

jimmysong commented 9 years ago

The current master branch does not support python3. However, we have the python3 branch, which is aimed at adding python3 support.

The python3 branch is entirely experimental, but if you'd like to give it a shot, it's here:

https://github.com/etotheipi/BitcoinArmory/tree/python3

majje commented 9 years ago

Yes, that seems to solve it. Thanx. I just tried to build the latest tag available, and didn't do much investigation. PYVER=python just appeared too generic to me. Case closed, then :D