Valgrind and CFFI [update]

42 views
Skip to first unread message

Sébastien Pierre

unread,
Feb 20, 2017, 3:24:19 PM2/20/17
to python-cffi
Hi all

First, apologies for the partial post, I accidently hit the send key combo in Gmail. I am trying to debug a CFFI-wrapped extension with Valgrind and have compiled Python accordingly (--without-pymalloc --with-pydebug --with-valgrind --enable-shared).

I now have a functional interpreter with Valgrind, however I get this error:

python -c "import cffi;cffi.FFI()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/sebastien/.local/lib/python2.7/site-packages/cffi/api.py", line 56, in __init__
import _cffi_backend as backend
ImportError: /home/sebastien/.local/lib/python2.7/site-packages/_cffi_backend.so: undefined symbol: Py_InitModule4_64
[51074 refs]

This might not be directly related to CFFI, but I was wondering if anyone had encountered the same problem and knows of a solution.

Thanks,

-- Sébastien

Armin Rigo

unread,
Feb 20, 2017, 5:36:05 PM2/20/17
to pytho...@googlegroups.com
Hi,

On 20 February 2017 at 21:24, Sébastien Pierre
<sebastie...@gmail.com> wrote:
> /home/sebastien/.local/lib/python2.7/site-packages/_cffi_backend.so:
> undefined symbol: Py_InitModule4_64

Maybe you should recompile cffi (and all the CPython C extensions)?
Try "./python -m ensurepip" followed by "./python -m pip install
--no-use-wheel cffi".


A bientôt,

Armin.

Sébastien Pierre

unread,
Feb 22, 2017, 8:57:33 AM2/22/17
to python-cffi
Thanks, the --no-use-wheel did the trick!
Reply all
Reply to author
Forward
0 new messages