Cannot compile GDB7.8 with Python support

Posted by j0h on Ask Ubuntu See other posts from Ask Ubuntu or by j0h
Published on 2014-08-20T01:52:42Z Indexed on 2014/08/20 4:30 UTC
Read the original article Hit count: 388

Filed under:
|

I am trying to install GDB7.8 with Python support. From the source folder, I am running ./configure --with-python When I did tab-complete from --with- I did not see Python in the list. But when I ran configure with that flag, it did not baulk.

When I run make, it complains that Python is not found.

checking for python2.7... no

but Python is installed:

 $ which python
python                python2.7             python2.7-dbg-config
python2               python2.7-dbg 

$ which python2.7 
/usr/bin/python2.7

I compiled GDB without --with-python and things installed without error. I was under the impression that GDB7.8 had Python support without the need for special flags. But when I run:

$gdb python
(gdb) run test.py

I get some sort of cannot import gdb Import error

So then I tried calling "pi":

(gdb) pi printf.py
Python scripting is not supported in this copy of GDB.

So... how do I get Python support in GDB7.8? is it actually not supported? Or should I not call "pi"?

© Ask Ubuntu or respective owner

Related posts about python

Related posts about gdb