python-bitcoin-blockchain-parser
python-bitcoin-blockchain-parser copied to clipboard
Setup.py fails on Ubuntu 16.04
Operating System
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
Leveldb:
$ sudo apt-get install libleveldb-dev
[sudo] password for parallels:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libleveldb-dev is already the newest version (1.18-5).
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
running sudo python setup.py install
fails with this backtrace:
Running plyvel-1.0.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hA48Is/plyvel-1.0.4/egg-dist-tmp-1ZRxxS
warning: no files found matching 'plyvel/*.pxi'
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:26:10: error: expected ‘;’ at end of member declaration
Status() noexcept : state_(nullptr) { }
^
/usr/local/include/leveldb/status.h:26:12: error: ‘noexcept’ does not name a type
Status() noexcept : state_(nullptr) { }
^
/usr/local/include/leveldb/status.h:26:12: note: C++11 ‘noexcept’ only available with -std=c++11 or -std=gnu++11
/usr/local/include/leveldb/status.h:32:16: error: expected ‘,’ or ‘...’ before ‘&&’ token
Status(Status&& rhs) noexcept : state_(rhs.state_) { rhs.state_ = nullptr; }
^
/usr/local/include/leveldb/status.h:32:22: error: invalid constructor; you probably meant ‘leveldb::Status (const leveldb::Status&)’
Status(Status&& rhs) noexcept : state_(rhs.state_) { rhs.state_ = nullptr; }
^
/usr/local/include/leveldb/status.h:32:22: error: expected ‘;’ at end of member declaration
/usr/local/include/leveldb/status.h:32:24: error: ‘noexcept’ does not name a type
Status(Status&& rhs) noexcept : state_(rhs.state_) { rhs.state_ = nullptr; }
^
/usr/local/include/leveldb/status.h:32:24: note: C++11 ‘noexcept’ only available with -std=c++11 or -std=gnu++11
/usr/local/include/leveldb/status.h:33:27: error: expected ‘,’ or ‘...’ before ‘&&’ token
Status& operator=(Status&& rhs) noexcept;
^
/usr/local/include/leveldb/status.h:33:33: error: expected ‘;’ at end of member declaration
Status& operator=(Status&& rhs) noexcept;
^
/usr/local/include/leveldb/status.h:33:35: error: ‘noexcept’ does not name a type
Status& operator=(Status&& rhs) noexcept;
^
/usr/local/include/leveldb/status.h:33:35: note: C++11 ‘noexcept’ only available with -std=c++11 or -std=gnu++11
/usr/local/include/leveldb/status.h: In member function ‘bool leveldb::Status::ok() const’:
/usr/local/include/leveldb/status.h:56:39: error: ‘nullptr’ was not declared in this scope
bool ok() const { return (state_ == nullptr); }
^
/usr/local/include/leveldb/status.h: In member function ‘leveldb::Status::Code leveldb::Status::code() const’:
/usr/local/include/leveldb/status.h:95:23: error: ‘nullptr’ was not declared in this scope
return (state_ == nullptr) ? kOk : static_cast<Code>(state_[4]);
^
/usr/local/include/leveldb/status.h: In copy constructor ‘leveldb::Status::Status(const leveldb::Status&)’:
/usr/local/include/leveldb/status.h:103:27: error: ‘nullptr’ was not declared in this scope
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
^
/usr/local/include/leveldb/status.h: In member function ‘leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)’:
/usr/local/include/leveldb/status.h:110:29: error: ‘nullptr’ was not declared in this scope
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
^
/usr/local/include/leveldb/status.h: At global scope:
/usr/local/include/leveldb/status.h:114:40: error: expected ‘,’ or ‘...’ before ‘&&’ token
inline Status& Status::operator=(Status&& rhs) noexcept {
^
/usr/local/include/leveldb/status.h:114:48: error: expected initializer before ‘noexcept’
inline Status& Status::operator=(Status&& rhs) noexcept {
^
In file included from /usr/local/include/leveldb/db.h:11:0,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/iterator.h:80:9: error: expected nested-name-specifier before ‘CleanupFunction’
using CleanupFunction = void (*)(void* arg1, void* arg2);
^
/usr/local/include/leveldb/iterator.h:81:24: error: ‘CleanupFunction’ has not been declared
void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2);
^
/usr/local/include/leveldb/iterator.h:88:5: error: ‘CleanupFunction’ does not name a type
CleanupFunction function;
^
/usr/local/include/leveldb/iterator.h: In member function ‘bool leveldb::Iterator::CleanupNode::IsEmpty() const’:
/usr/local/include/leveldb/iterator.h:94:35: error: ‘function’ was not declared in this scope
bool IsEmpty() const { return function == nullptr; }
^
/usr/local/include/leveldb/iterator.h:94:47: error: ‘nullptr’ was not declared in this scope
bool IsEmpty() const { return function == nullptr; }
^
/usr/local/include/leveldb/iterator.h: In member function ‘void leveldb::Iterator::CleanupNode::Run()’:
/usr/local/include/leveldb/iterator.h:96:49: error: ‘function’ was not declared in this scope
void Run() { assert(function != nullptr); (*function)(arg1, arg2); }
^
In file included from /usr/local/include/leveldb/db.h:12:0,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/options.h: In constructor ‘leveldb::ReadOptions::ReadOptions()’:
/usr/local/include/leveldb/options.h:183:18: error: ‘nullptr’ was not declared in this scope
snapshot(nullptr) {
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_f_6plyvel_7_plyvel_db_get(__pyx_obj_6plyvel_7_plyvel_DB*, PyObject*, PyObject*, leveldb::ReadOptions)’:
plyvel/_plyvel.cpp:2469:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = __pyx_v_db->_db->Get(__pyx_v_read_options, __pyx_v_key_slice, (&__pyx_v_value));
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘int __pyx_pf_6plyvel_7_plyvel_2DB___init__(__pyx_obj_6plyvel_7_plyvel_DB*, PyObject*, PyBoolObject*, PyBoolObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’:
plyvel/_plyvel.cpp:3935:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = leveldb::DB::Open(__pyx_v_self->options, __pyx_v_fsname, (&__pyx_v_self->_db));
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_pf_6plyvel_7_plyvel_2DB_10put(__pyx_obj_6plyvel_7_plyvel_DB*, PyObject*, PyObject*, PyBoolObject*)’:
plyvel/_plyvel.cpp:5187:22: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = __pyx_v_self->_db->Put(__pyx_v_write_options, __pyx_v_key_slice, leveldb::Slice(((const char *)__pyx_v_value_buffer.buf), __pyx_v_value_buffer.len));
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_pf_6plyvel_7_plyvel_2DB_12delete(__pyx_obj_6plyvel_7_plyvel_DB*, PyObject*, PyBoolObject*)’:
plyvel/_plyvel.cpp:5417:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = __pyx_v_self->_db->Delete(__pyx_v_write_options, __pyx_v_key_slice);
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_pf_6plyvel_7_plyvel_repair_db(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’:
plyvel/_plyvel.cpp:9357:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = leveldb::RepairDB(__pyx_v_fsname, __pyx_v_options);
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_pf_6plyvel_7_plyvel_2destroy_db(PyObject*, PyObject*)’:
plyvel/_plyvel.cpp:9487:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = leveldb::DestroyDB(__pyx_v_fsname, __pyx_v_options);
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
plyvel/_plyvel.cpp: In function ‘PyObject* __pyx_pf_6plyvel_7_plyvel_10WriteBatch_10write(__pyx_obj_6plyvel_7_plyvel_WriteBatch*)’:
plyvel/_plyvel.cpp:10450:20: error: ambiguous overload for ‘operator=’ (operand types are ‘leveldb::Status’ and ‘leveldb::Status’)
__pyx_v_st = __pyx_v_self->db->_db->Write(__pyx_v_self->write_options, __pyx_v_self->_write_batch);
^
In file included from /usr/local/include/leveldb/iterator.h:20:0,
from /usr/local/include/leveldb/db.h:11,
from plyvel/_plyvel.cpp:547:
/usr/local/include/leveldb/status.h:105:16: note: candidate: leveldb::Status& leveldb::Status::operator=(const leveldb::Status&)
inline Status& Status::operator=(const Status& rhs) {
^
/usr/local/include/leveldb/status.h:33:11: note: candidate: leveldb::Status& leveldb::Status::operator=(leveldb::Status)
Status& operator=(Status&& rhs) noexcept;
^
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
plyvel requires leveldb development libraries for LevelDB >1.2.X
libleveldb-dev is already the newest version (1.18-5).
I think I had to add a custom PPA to get the latest development libs for leveldb.
Or it might be that 16.04 is too old to have the most recent libs, you might have to compile a more recent version.