我在尝试交叉编译arm的gdbserver时遇到了一个令人沮丧的错误。我已经使用这个命令下载并交叉编译了termcap
export CC="/bin/arm-mv5sft-linux-gnueabi-gcc"
export CXX="/bin/arm-mv5sft-linux-gnueabi-g++"
export AR="/bin/arm-mv5sft-linux-gnueabi-ar"
CONFOPTS+="--target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --enable-static"
./configure ${CONFOPTS}
make &&
make DESTDIR=~/gdb-7.6/toInst install由于没有提示任何错误,所以交叉编译非常成功,所以我得到了libtercap.a,它是arm,如下所示,位于~/termcap/上
:$ file *.o
termcap.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
tparam.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
version.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not strippe但是,如果我尝试使用相同的选项为arm交叉编译gdbserver并调用交叉编译的lib,则会执行相同的操作。
export CC="/bin/arm-mv5sft-linux-gnueabi-gcc"
export CXX="/bin/arm-mv5sft-linux-gnueabi-g++"
export AR="/bin/arm-mv5sft-linux-gnueabi-ar"
CONFOPTS+="--target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --enable-static --with-termcap=~/termcap/libtermcap.a"
./configure ${CONFOPTS} $@
make &&
make DESTDIR=~/gdb-7.6/toInst install我明白了
checking for library containing waddstr... no
configure: WARNING: no enhanced curses library found; disabling TUI
checking for library containing tgetent... no
configure: error: no termcap library found
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `~/gdb-7.6'
make: *** [all] Error 2我在互联网上找到了几个建议安装libncurses5-dev库的网站,但是我已经安装了吗!
$ sudo apt-get install libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libncurses5-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 67 not upgraded.所以,我不知道我能做什么来交叉编译gdbserver,请帮助!
提前感谢!!
问候
发布于 2013-06-07 13:59:19
我已经找到了交叉编译gbd的变通方法,因为我只对交叉编译gdbserver感兴趣,所以我转到那个文件夹(gdb/gdebserver0),并使用那里的cofigure定位,通过我的交叉编译选项,我没有遇到任何问题,现在我得到了arm的gbd服务器。
我希望这能帮助其他人解决我同样的问题。
问候
发布于 2015-05-10 18:56:11
在这里,我建议自动解决configure:编译crosstool ng时没有找到termcap库的配置错误问题。它在最新的Fedora版本中运行良好
1.Download the termcap-1.3.1.tar.gz from the gnu site
2.Uncompress the source File >tar -xvf termcap-1.3.1.tar.gz
3.>cd termcap 4>./configure /*Configure the Library*/
5.>make /*user */
6.>su /* change to root */
7.then > make install发布于 2014-01-07 02:12:08
我在FC3上也遇到了同样的问题,但即使安装了libncurses-devel它也不能工作。我的解决方案是安装readline-devel
https://stackoverflow.com/questions/16965285
复制相似问题