Author

Topic: can't compile armory (PyString_FromStringAndSize error) (Read 371 times)

legendary
Activity: 3640
Merit: 1345
Armory Developer
Swig is trying to biuld against libpython. I'm guessing your system is pointing it at the python3 lib.

Detection for the includes is done here, maybe that will help you sort it out:

https://github.com/goatpig/BitcoinArmory/blob/master/configure.ac#L65
newbie
Activity: 7
Merit: 0
Thanks for your quick reply

I tried this
$ python -V
Python 3.6.1 :: Anaconda custom (64-bit)
$ alias python=python2
$ python -V
Python 2.7.13

and then in the same shell where I changed alias
$ make


but I still get the same error

did I mess up something with my python installation?
legendary
Activity: 3640
Merit: 1345
Armory Developer
You're using python3, armory uses python2.
newbie
Activity: 7
Merit: 0
I am trying to compile armory 0.96.1 and 0.96.1.2 from sources on fedora 26 but I get this error and a lot of similar errors on different lines

Quote
CppBlockUtils_wrap.cxx: In function 'PyObject* _wrap_BtcUtils_hash256(PyObject*, PyObject*)':
CppBlockUtils_wrap.cxx:28661:17: error: 'PyString_FromStringAndSize' was not declared in this scope
     resultobj = PyString_FromStringAndSize((char*)((&result)->getPtr()), (&result)->getSize());
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
CppBlockUtils_wrap.cxx:28661:17: note: suggested alternative: 'PyBytes_FromStringAndSize'
     resultobj = PyString_FromStringAndSize((char*)((&result)->getPtr()), (&result)->getSize());
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
                 PyBytes_FromStringAndSize

I have anaconda installed, I don't know if this is the cause of the error

This is the list of commands that I used to compile
Quote
$ git clone https://github.com/goatpig/BitcoinArmory
$ cd BitcoinArmory
$ git submodule init
$ git submodule update
$ git checkout v0.96.1
$ ./autogen.sh
$ ./configure
$ make
Jump to: