Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inbloom.c compilation error #5

Open
gabrielspmoreira opened this issue Jan 18, 2016 · 4 comments
Open

inbloom.c compilation error #5

gabrielspmoreira opened this issue Jan 18, 2016 · 4 comments

Comments

@gabrielspmoreira
Copy link

Great job with this cross-platform implementation.

Therefore, I when I try to install it via pip (and pip3) I got the following compilation error:

Running setup.py install for inbloom
Running command /usr/bin/python3 -c "import setuptools, tokenize;file='/tmp/pip_build_root/inbloom/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-e5h0ko0c-record/install-record.txt --single-version-externally-managed --compile
running install
running build
running build_ext
building 'inbloom' extension
creating build
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/inbloom
creating build/temp.linux-x86_64-3.4/vendor
creating build/temp.linux-x86_64-3.4/vendor/libbloom
creating build/temp.linux-x86_64-3.4/vendor/libbloom/murmur2
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 -Ivendor/libbloom/murmur2 -I/usr/include/python3.4m -c inbloom/inbloom.c -o build/temp.linux-x86_64-3.4/inbloom/inbloom.o

inbloom/inbloom.c:186:9: error: ‘Filter’ has no member named ‘ob_type’
self->ob_type->tp_free((PyObject*)self);

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

Is there any other installation requirement?

@bergundy
Copy link
Collaborator

Hi,
The issue is that we lack support for Python 3.
I don't think I'll be able to add Python 3 support soon. So your best options are either working with Python 2 (if that's possible) or provide a PR for Python 3 support.

@gabrielspmoreira
Copy link
Author

Thanks for the quick answer. I tried to port the C extension following this guide (http://python3porting.com/cextensions.html) and could compile and install via pip, but when I import inbloom in Python 3 I end up stuck with the error "Segmentation fault", with no reference of the line causing the exception. Maybe I will try a pure Python Bloom Filter, and maybe make it compatible with your Java implementation, for portability.

@dvirsky
Copy link
Member

dvirsky commented Jan 19, 2016

Can you send us the ported diff, I'll try to debug it and see what happened.

@yuansip
Copy link

yuansip commented Jul 21, 2022

@gabrielspmoreira I have submitted a PR to support Python3. It works in my local env. You can have a try if you want ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants