mempoolco / spruned

A Bitcoin-without-Blockchain client w/ RPC that can fetch any block or transaction
MIT License
170 stars 35 forks source link

Build fails for pyvel dependency (bump dependency version?) #58

Closed windsok closed 6 years ago

windsok commented 6 years ago

Installing on Ubuntu 18.04 with Python 3.6, pip install fails for pyvel with the current required version of 0.9.0.

Changed required version to 1.0.4 and everything seems to be working fine so far.

Error output from 0.9.0:

  Failed building wheel for plyvel
  Running setup.py clean for plyvel
Failed to build plyvel
Installing collected packages: plyvel, daemonize, chardet, attrs, multidict, idna, idna-ssl, yarl, aiohttp, pycoin
  Running setup.py install for plyvel ... error
    Complete output from command /home/btcd/spruned/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-f04a3fxe/plyvel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-n34nxc1d/install-record.txt --single-version-externally-managed --compile --install-headers /home/btcd/spruned/venv/include/site/python3.6/plyvel:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/plyvel
    copying plyvel/_version.py -> build/lib.linux-x86_64-3.6/plyvel
    copying plyvel/__init__.py -> build/lib.linux-x86_64-3.6/plyvel
    running build_ext
    building 'plyvel._plyvel' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/plyvel
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -I/home/btcd/spruned/venv/include/python3.6m -c plyvel/_plyvel.cpp -o build/temp.linux-x86_64-3.6/plyvel/_plyvel.o -Wall -g
    x86_64-linux-gnu-gcc: error: /usr/share/dpkg/no-pie-compile.specs: No such file or directory
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/btcd/spruned/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-f04a3fxe/plyvel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-n34nxc1d/install-record.txt --single-version-externally-managed --compile --install-headers /home/btcd/spruned/venv/include/site/python3.6/plyvel" failed with error code 1 in /tmp/pip-install-f04a3fxe/plyvel/
gdassori commented 6 years ago

Hello, the rationale behind using 0.9 instead of 1.0.x is backward compatibility.

According the plyvel readme: The mimimum LevelDB version is now 1.20, which added an option for the maximum file size, which is now exposed in Plyvel. (pr #61)

But, googling around distros repos, I've found 1.20 is quite rare on non cutting-edge debian based distros. Personally, I also had trouble building spruned on different environments for this reason and, actually, spruned should work with 0.9.

Btw, googling about your error, I've found something else: The file referenced (/usr/share/dpkg/no-pie-compile.specs) is in the libdpkg-perl package on Debian, so installing that package should solve the immediate problem.

And you can try, but I personally tend to disagree... Would you please ensure you have python3-dev, gcc and all the system packages listed here: http://spruned.readthedocs.io/en/latest/getting-started.html#installation

windsok commented 6 years ago

Thanks for the explanation, makes sense.

I double checked and a definitely have all of those dependencies installed.

I tried deleting my venv and starting again with version 0.9.0 and now everything seems to install OK... so maybe I was just doing something wrong first time around...

I'm going to start again with a blank server install and see if everything works.

Thanks again for the help.

osthafen commented 6 years ago

It seems like the plyvel wheels for ubuntu 18.04 python exist since Version 1.0.5: https://github.com/wbolster/plyvel/issues/78