ubuntu14.04 安装 ddd 以及运行 ddd 遇到的问题

1. 安装 ddd 遇到的问题

1. ubuntu 下可以直接 sudo apt-get install ddd 即可.
2. 源码安装时, 首先下载ddd最新的源码, http://ftp.gnu.org/gnu/ddd/, 一般的过程如下
# tar zxvf ddd-3.3.12.tar.gz
# cd ddd-3.3.12/
# ./configure --prefix=/usr/local/ddd/
# make
# make install
1). 在 ./configure 过程中遇到如下错误提示
configure: error: The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'

解决方法: sudo apt-get install libmotif-dev libmotif-common
注意,不同的linux版本可能 motif-dev 的名字可能不同, centos 中可能是 # yum install openmotif-devel

2). 在 make 过程中遇到如下错误提示
strclass.C:1546:35: error: ‘EOF’ was not declared in this scope

解决方法: 在报错文件的最开始加上 #include < stdio.h >,因为EOF、stderr等都是在这个文件中定义的。

2. 运行 ddd 遇到的问题

1. 安装完成ddd后,运行ddd时遇到一个问题: “waiting until GDB gets ready”

参考两篇博客的解决方法:

1). http://savannah.gnu.org/bugs/?32949

Encountered this problem too. The easy solution as posted on Stackoverflow is to delete the init file in the ~/.ddd/ directory.

But that means all your customizations will be gone. So I started hunting for the real cause. I observed that the problem only occurs after I have used the “GDB Settings” dialog. Once you opened this dialog the init file mentioned above will grow because a lot of gdb settings will be stored there.

After shrinking those additional lines step by step I found the “offending line”.
The problem is caused by the setting for extended-prompt. After opening the GDB settings dialog this line will read like

set extended-prompt not set\n\

This “not set” is what gdb will report on “show extended-prompt”. Unfortunatley “set extended-prompt” is sort of buggy in gdb, so if I enter “set extended-prompt not set” in a gdb running from a shell without ddd involved gdb will lockup as well.

It looks like the only safe way of setting the extend-prompt is when it contains the string “(gdb)”. So I modified the offending line in the init file and now it reads like this:

set extended-prompt (gdb) \n\

With this setting I do not encounter the problem any longer. Hope that helps in your case too.

2). https://www.sourceware.org/ml/gdb/2013-12/msg00017.html

I now found i just have to delete from within ~/.ddd/init, the line:

set extended-prompt not set\n\

Obviously “not set” is not a valid parameter for “set extended-prompt”.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值