2012-06-15 157 views
1

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

主持人:Ubuntu的11 32位 目标:ARM-Linux的海湾合作委员会(GCC 4.4.3版)

[email protected]:/home/mickey/gdb-7.4# ./configure --target=arm-linux --host=arm-linux 

make 

我收到此错误信息:

configure: error: no termcap library found 

从我搜查谷歌。编译器无法获取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中。

[email protected]:/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 

请帮忙指出我错过了什么。非常感谢您

+0

尝试'apt-get install libtinfo-dev',然后重新尝试'./configure'和'make'步骤。 – sarnold

+0

您需要为ARM目标交叉构建所有必需的库,并相应地为目标arm env设置相关lib路径。 –

回答

0

主持人:Ubuntu的11 32位

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

的./configure --target =在arm-linux的主机=臂的Linux

与你正试图建立GDB将在arm-linux和调试arm-linux二进制运行上面的命令,也就是你正在为arm-linux配置原生 GDB(但在i686-linux上构建它)。这样的本地GDB不能使用主机库(出于显而易见的原因)。

但它看起来像你想跨越gdb,而不是本地的。在这种情况下,请尝试

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

阅读this可能会有所帮助。

+0

对我而言,他希望本地ARM gdb直接在板上运行。而且它仍然没有回答这个问题。 –