【问题标题】:error on cross compile gdbserver交叉编译 gdbserver 时出错
【发布时间】:2012-06-15 02:48:44
【问题描述】:

我想在arm-Linux开发板上使用gdb调试。编译 gdbserver 时出现错误。

主机:Ubuntu 11 32bit 目标:arm-linux-gcc(gcc版本4.4.3)

root@mickeyvm:/home/mickey/gdb-7.4# ./configure --target=arm-linux --host=arm-linux

make

我收到此错误消息:

configure: error: no termcap library found

根据我在 Google 中搜索到的内容。编译器无法获取 ncurses 库。

checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no

我按照建议的解决方案安装 libncurses5-dev,但问题仍然存在。 libncurses5 确实存在于我的 Linux 中。

root@mickeyvm:/home/mickey# dpkg -l | grep curse
ii  libcurses-perl                                  1.28-1                                     Curses interface for Perl
ii  libghc6-hscurses-dev                            1.3.0.2-3build3                            ncurses bindings for Haskell - development files for GHC6
ii  libncurses5                                     5.7+20101128-1                             shared libraries for terminal handling
ii  libncurses5-dev                                 5.7+20101128-1                             developer's libraries for ncurses
ii  libncursesw5                                    5.7+20101128-1                             shared libraries for terminal handling (wide character support)
ii  libncursesw5-dev                                5.7+20101128-1                             developer's libraries for ncursesw
ii  mtr-tiny                                        0.80-1                                     Full screen ncurses traceroute tool
ii  ncurses-base                                    5.7+20101128-1                             basic terminal type definitions
ii  ncurses-bin                                     5.7+20101128-1                             terminal-related programs and man pages
ii  ncurses-term                                    5.7+20101128-1                             additional terminal type definitions

请帮助并指出我错过了什么。非常感谢

【问题讨论】:

  • 尝试apt-get install libtinfo-dev,然后重试./configuremake 步骤。
  • 您需要交叉构建 ARM 目标所需的所有库,并相应地设置目标 arm env 的依赖库路径。

标签: linux compiler-errors gdb gdbserver


【解决方案1】:

主机:Ubuntu 11 32bit

32 位什么?大概你的主机是 i686-linux-gnu,而不是 sparc-linux-gnu。

./configure --target=arm-linux --host=arm-linux

使用上述命令,您正在尝试构建将在 arm-linux 上运行并调试 arm-linux 二进制文件的 GDB,即您正在为 arm-linux 配置 native GDB(但在 i686 上构建它-Linux)。这样的原生 GDB 不能使用宿主库(原因很明显)。

但看起来你想要一个跨 gdb,而不是原生的。在这种情况下,请尝试

./configure --build=i686-linux --host=i686-linux --target=arm-linux

阅读this 可能会有所帮助。

【讨论】:

  • 在我看来,他希望本机 ARM gdb 直接在板上运行。但它仍然没有回答问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-09-13
  • 2014-01-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-02-02
相关资源
最近更新 更多