Bitcoin Forum
June 30, 2024, 05:22:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: can't compile armory (PyString_FromStringAndSize error)  (Read 374 times)
newuser3 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 25, 2017, 03:15:37 PM
 #1

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
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3682
Merit: 1347

Armory Developer


View Profile
August 25, 2017, 03:20:34 PM
 #2

You're using python3, armory uses python2.

newuser3 (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 25, 2017, 03:29:10 PM
 #3

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?
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3682
Merit: 1347

Armory Developer


View Profile
August 25, 2017, 03:38:05 PM
 #4

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

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!