stephan-hof / pyrocksdb

Python bindings for RocksDB
BSD 3-Clause "New" or "Revised" License
150 stars 169 forks source link

Unable to install pyrocksdb against RocksDB master #24

Closed Iulian7 closed 9 years ago

Iulian7 commented 9 years ago

I followed the instructions from here: http://pyrocksdb.readthedocs.org/en/latest/installation.html

When I try pip install git+git://github.com/stephan-hof/pyrocksdb.git I get the following output with error:

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-3.4

creating build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/__init__.py -> build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/interfaces.py -> build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/errors.py -> build/lib.linux-x86_64-3.4/rocksdb

creating build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/__init__.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/test_db.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/test_options.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

running egg_info

creating pyrocksdb.egg-info

writing dependency_links to pyrocksdb.egg-info/dependency_links.txt

writing top-level names to pyrocksdb.egg-info/top_level.txt

writing requirements to pyrocksdb.egg-info/requires.txt

writing pyrocksdb.egg-info/PKG-INFO

writing manifest file 'pyrocksdb.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found

reading manifest file 'pyrocksdb.egg-info/SOURCES.txt'

writing manifest file 'pyrocksdb.egg-info/SOURCES.txt'

copying rocksdb/_rocksdb.cpp -> build/lib.linux-x86_64-3.4/rocksdb

running build_ext

building 'rocksdb._rocksdb' extension

creating build/temp.linux-x86_64-3.4

creating build/temp.linux-x86_64-3.4/rocksdb

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/iulian/py3env/include -I/usr/include/python3.4m -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.4/rocksdb/_rocksdb.o -std=gnu++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

rocksdb/_rocksdb.cpp:289:27: fatal error: rocksdb/slice.h: No such file or directory

 #include "rocksdb/slice.h"

                           ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/home/iulian/py3env/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-mndoekm3-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3fwa2_ff-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/iulian/py3env/include/site/python3.4" failed with error code 1 in /tmp/pip-mndoekm3-build

I tried to checkout various versions of RocksDB (3.5, 3.6, 3.8, 3.9) and still no luck.

I am using Python 3.4 on a 64 bit Ubuntu 14.04.

stephan-hof commented 9 years ago

Hmm can you double check that the include environment variable is set correctly ? rocksdb/slice.h is the first file being included in pyrocksdb and present in rocksdb since ever. So I believe its a problem in your build environment.

Downchuck commented 9 years ago

Install worked well for me on OS X using homebrew.

stephan-hof commented 9 years ago

The creator of this ticket did not reply for a long while, furthermore I cannot reproduce the issue. Hence I will close this issue.