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 likeset 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
原文链接:https://www.f2er.com/ubuntu/355208.htmlI 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”.