Chinaunix首页 | 论坛 | 博客
  • 博客访问: 769623
  • 博文数量: 247
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 501
  • 用 户 组: 普通用户
  • 注册时间: 2013-07-12 21:53
个人简介

系统未建立

文章分类

全部博文(247)

文章存档

2021年(1)

2020年(3)

2019年(5)

2018年(3)

2017年(44)

2016年(75)

2015年(52)

2014年(63)

2013年(1)

我的朋友

分类: LINUX

2020-03-07 15:50:56

gdb交叉编译网上有很多教程,在编译时,会碰到一条错误:

 configure: error: no termcap library found

一般的解决是下载termcap代码,然后编译成目标系统的lib,放入目标系统编译环境中,  但是——————
   有时候发现这样做上面的错误提示还在,原因是,还要把ncurses源码下载下来,和termcap一样,编译成目标系统的lib,放入。。。,然后才行。(这句话是我花了4个晚上才搞定的,看到的同学要珍惜); https://invisible-mirror.net/archives/ncurses/
 ==================================附上编译的一些步骤======================
编译tercap: 以arm-linux为例:
./configure --host=arm-linux CC=arm-linux-gcc
编译出来后,.h,.a文件放入编译环境中,编译环境用这个命令查找: arm-linux-gcc --print-file-name libc.a ,
比如我的环境:/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi//sys-root/usr/

编译ncurses:
./configure --host=arm-linux CC=arm-linux-gcc --prefix=/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sys-root/usr/
make
make install

编译gdb-7.4
./configure --host=arm-linux --prefix="$PWD/../gdb"   --without-x --disable-gdbtk --disable-tui --without-included-regex --without-included-gettext CC=arm-linux-gcc
(来自https://www.cnblogs.com/souroot/p/5625516.html
我下载是gdb-7.8
在make过程失败
../../libiberty/libiberty.a(floatformat.o): In function `floatformat_to_double':
floatformat.c:(.text+0x838): undefined reference to `ldexp'
floatformat.c:(.text+0x8a8): undefined reference to `ldexp'
../../libiberty/libiberty.a(floatformat.o): In function `floatformat_from_double':
floatformat.c:(.text+0xce0): undefined reference to `frexp'
floatformat.c:(.text+0xdac): undefined reference to `ldexp'

后来发现有人遇到相同的问题,降低版本到7.7就没有问题了

阅读(1310) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~