首页 > 学院 > 开发设计 > 正文

linux使用---15.源码编译insight及使用

2019-11-06 06:50:29
字体:
来源:转载
供稿:网友
 linux使用---15.源码编译insight及使用 2016-06-30 18:51:37

分类: LINUX

1.下载insight的源码http://sourceware.org/insight/downloads.php下载insight-6.8-1a.tar.bz22.Ubuntu14.04下编译出错及解决a.出错1 bfd.texinfo:326: unknown command `colophon'bfd.texinfo:337: unknown command `cygnus'查到了这个文章:http://permalink.gmane.org/gmane.linux.lfs.devel/13912sed -i -e 's/ <at> colophon/ <at> <at> colophon/' / -e 's/doc <at> cygnus.com/doc <at> <at> cygnus.com/' bfd/doc/bfd.texinfo 竟然是!!正确的是这个:   sed -i -e 's/@colophon/@@colophon/' /       -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfob.出错2./elf.texi:11: raising the section level of @subsubsection which is too lowcong@msi:/work/ffmpeg/insight/insight-6.8-1$ cp bfd/doc/elf.texi bfd/doc/elf.texi_bakcong@msi:/work/ffmpeg/insight/insight-6.8-1$ sed -i 's/subsubsection/subsection/' ./bfd/doc/elf.texi这就是一个拼写错误,我承认是瞎蒙的,但是可以编过去了。c.出错3elf64-x86-64.c:2364:16: error: variable 'warned' set but not used [-Werror=unused-but-set-variable] bfd_boolean warned;cong@msi:/work/ffmpeg/insight/insight-6.8-1$ ./configure --disable-werrord.出错4linux-nat.h:63:18: error: field ‘siginfo’ has incomplete type struct siginfo siginfo;                  ^In file included from linux-nat.c:32:0:linux-nat.h:63:18: error: field ‘siginfo’ has incomplete type   struct siginfo siginfo;解决方法: 把所有的 struct siginfo替换为 struct siginfo_t, 脚本如下:#!/bin/shfor c_file in `find . -name '*.c' -o -name '*.h'`do    sed -i 's/struct siginfo/siginfo_t/' $c_filedone3. 使用insight3.1 调试时报错直接insight ./hello时会报错:wrong version in compilation unit header (is 4, should be 2) 这需要在被调试的程序的Makefile加上:CFLAGS+= -gdwarf-2 -gstrict-dwarf参考: http://ju.outofmemory.cn/entry/949173.2 TMD还有问题cong@msi:/work/ffmpeg/test/jpeg/jpeg6b$ insight ./mytestBFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278BFD: /lib/x86_64-linux-gnu/libc.so.6: invalid relocation type 37BFD: BFD (GNU Binutils) 2.18.50.20080226 assertion fail elf64-x86-64.c:278next重新编译gdb也解决不了。算了,放弃了,世上无难事,只要肯放弃。换DDD或cgdb了。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表