我在尝试为 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
由于没有提示任何错误,因此交叉编译成功,我得到了 libtermcap.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 做同样的事情,使用相同的选项并调用交叉编译的库
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,请帮忙!
提前致谢!!
问候