1

操作系统:CentOS 7 GDB-7.11

我需要 GDB-7.11,因为最终支持线程名称出现在远程调试会话的调试器中。但是,我无法显示线程名称,我相信这是因为当我运行 GDB 时,我得到以下信息:

warning: Can not parse XML target description; XML support was disabled at compile time

如果我使用:yum whatprovides libexpat

[root@localhost lib64]# yum whatprovides libexpat
Loaded plugins: auto-update-debuginfo, fastestmirror, langpacks, nvidia
Loading mirror speeds from cached hostfile
 * base: mirror.fdcservers.net
 * elrepo: ord.mirror.rackspace.com
 * epel: mirror.steadfast.net
 * epel-debuginfo: mirror.steadfast.net
 * extras: chicago.gaminghost.co
 * ius: ord.mirror.rackspace.com
 * ius-debuginfo: ord.mirror.rackspace.com
 * updates: mirror.sesp.northwestern.edu
expat-2.1.0-8.el7.i686 : An XML parser library
Repo        : base
Matched from:
Provides    : libexpat.so.1

它显然在那里,位于 /usr/lib64

当我运行 ./configure --with-read-line --with-libexpat

.
.
.
checking whether to use expat... auto
checking for libexpat... (cached) no
configure: WARNING: expat is missing or unusable; some features may be unavailable.
.
.
.

那么问题来了,为什么 GDB 的配置脚本找不到呢?它似乎找到了其他一切......?

4

2 回答 2

0

gdb 8.3 的版本也有同样的问题。想了很多办法,还是不行。最后我用的是10.2版本,所有问题都没有了。

于 2021-05-12T19:38:18.130 回答
0
yum install expat-devel

(复制自@ks1322 评论)


我观察到的原始错误是

checking for libexpat... no
configure: error: expat is missing or unusable
gmake[1]: *** [configure-gdb] Error 1

这个错误很奇怪,因为yum install expat安装了共享库文件/usr/lib64/libexpat.so.1yum install expat-devel安装共享库文件/usr/lib64/libexpat.so。看来 GNUconfigure只搜索libexpat.so.

于 2019-10-17T20:33:14.753 回答