【发布时间】:2023-04-05 04:19:01
【问题描述】:
我一直在尝试在 64 位 X86 Ubuntu 上编译 GDB 的副本,以用于远程调试 ARM 设备。这意味着使用 expat 编译 GDB; GDB 在连接到远程调试器时使用 XML 解析。以下是我尝试过的一些事情以及结果。
仅使用 --with-expat 编译
./configure --target=arm-none-eabi --with-expat
make
....
checking whether to use expat... yes
checking for libexpat... (cached) no
configure: error: expat is missing or unusable
Makefile:9125: recipe for target 'configure-gdb' failed
....
使用 --with-libexpat-prefix 编译
ls -alg /usr/local/lib/*expat*
-rw-r--r-- 1 root 999128 Mar 20 23:55 /usr/local/lib/libexpat.a
-rwxr-xr-x 1 root 942 Mar 20 23:55 /usr/local/lib/libexpat.la
lrwxrwxrwx 1 root 17 Mar 20 23:55 /usr/local/lib/libexpat.so -> libexpat.so.1.6.0
lrwxrwxrwx 1 root 17 Mar 20 23:55 /usr/local/lib/libexpat.so.1 -> libexpat.so.1.6.0
-rwxr-xr-x 1 root 534224 Mar 20 23:55 /usr/local/lib/libexpat.so.1.6.0
./configure --target=arm-none-eabi --with-expat --with-libexpat-prefix=/usr/local/lib
make
....
checking whether to use expat... yes
checking for libexpat... (cached) no
configure: error: expat is missing or unusable
Makefile:9125: recipe for target 'configure-gdb' failed
....
我尝试了各种我能想到的方式来安装 expat。上述库二进制文件来自使用 make install 的 expat 本地编译;我也做过:
apt-get install libexpat1-dev
apt-get install expat
两者都已经是最新版本。结果与上述相同;只有省略 --with-expat 和 --with-libexpat-prefix 才能编译。
欢迎提出建议。我怎样才能找到更多关于失败的信息 - 我怎样才能弄清楚制作过程如何/在哪里未能找到/批准外籍人士?
各位旅行者(但我在这里没有找到有效的答案):
http://comments.gmane.org/gmane.comp.gdb.devel/29306
gdb remote cross debugging fails with "Remote 'g' packet reply is too long"
【问题讨论】:
-
我会在
configure中找到检查/测试 expat 的测试,然后从 cmd-line 只运行该块并查看出现哪些错误(或其他问题)。当然,这并不像听起来那么简单,因为您需要知道在configure环境中设置了哪些变量。 (PATH、LD_LIBRARY,也许还有其他)。祝你好运。
标签: xml linux debugging gdb arm