python gdb_无法使用python支持安装GDB

The thing is, I want to have python support in my GDB installation. When I ran

./configure --with-python

with

make

in the GDB source file directory, however, the "make" exited with the following information:

checking whether to use python... yes

checking for python... (cached) /home/tools/tools/../bin/64//python

checking for python2.7... no

configure: error: python is missing or unusable"

Note that the returned information possible indicates that the "make" program is trying to find a python intallation in "/home/tools/tools/../bin/64//python" directory, which, however is not the default python installation of my account. I've set the $PATH variable to make the "python" command pointing to a python installation of my own, which resides under home directory.

Why is this? Can anyone help? A thousand thanks.

PS. There's one thing I'm not sure, since I only want to have some script automatically run in the ".gdbinit" file, which seems like some python script. Does supporting this script equal to making GDB able to debug python script??

解决方案

I had this same problem. I am using Python 2.7.10 - Anaconda 2.3.0 (installed in a non-standard location), and GDB-7.11. It turns out that within gdb-7.11/ there are multiple autoconfigs. When I inspected gdb-7.11/gdb/config.cache, there was an error because it could not find python2.7 library. So the solution is to export LDFLAGS, when running the top level autoconfig in gdb-7.11 otherwise the autoconfig in gdb-7.11/gdb will not know where to find the python2.7 library.

E.G.

make distclean

cd gdb/

make distclean

cd ../

export LDFLAGS=-L/path/to/nonstandard/python/lib/; ./configure --prefix=/path/to/home/directory/gdb-7.11/ --with-python

NOTE : In this situation, it is best to clean both the top level and the gdb configures. Cleaning the top level configure will not clean the gdb/ configure. This gave me some grief.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值