在Ubuntu 10.04中安装 insight
2011-12-07 13:07
169 查看
在Ubuntu 10.04中安装 insight
说明:如果你的Ubuntu版本<10.04>,你可以直接sudo apt-get install insight安装,不用从源码安装.Ubuntu 10.04以上的版本,删除了对Insight的默认支持,只能下载insight的源码编译安装
首先从ftp://sourceware.org/pub/insight/releases/下载源码(这东西可是有20+MB,慢慢下载喔)
1 解压insight-6-8-1
sudo tar jvxf insight-6-8-1.tar.bz2
2 修改源代码,然后进入insight-6-8-1/gdb
cd insight-6-8-1/gdb
sudo gedit i386-linux-nat.c
在头文件部分加上:
#include "i387-tdep.h"
保存,退出
3.从新回到 insight 目录,生成Makefile
cd ..
sudo ./configure
4 开始编译
sudo make
5.遇到错误的处理
linux-nat.c:2879: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
解决方案:
方法1.修改源代码,
linux-nat.c:2879:error:ignoring return value of 'fgets',declared with attribute warn_unused_result
老代码
fgets(buffer, MAXPATHLEN, procfile);
解决的方法是
char* temp_p = fgets(buffer, MAXPATHLEN, procfile);
类似的问题还有几个,基本上都是gdb的问题,照着解决就行了,我就不一个个说了。
方法2.进入insight-6.8-1/gdb目录,打开Makefile文件搜索-Werror
老代码
WERROR_CFLAGS = -Werror
新代码
WERROR_CFLAGS = #-Werror
这2个办法都可以通过编译,就可以使用insight了
cd ..
6.接着make
sudo make
7.这时再过段时间看看,是不是编译通过 呢
编译通过后安装 sudo make install
最后补充几点:
1. 没有必等到make出error的时候再去添加头文件,开始的时候加上就好,一气呵成的编译。
另:头文件之间有前后的依赖关系,要把i387-tdep.h 放到include 较为靠后的位置,没有查到底是依赖于哪个头文件,我把它放在了
代码:
#ifdef H***E_SYS_REG_H
#include <sys/reg.h>
#endif
之后,可以编译通过。
2. 编译之前应当check下机器是否安装了termcap库文件,若无的话安装libncurses5-dev
代码:
sudo apt-get install libncurses5-dev
相关文章推荐
- ubuntu-ubuntu10.04使用wine安装SourceInsight
- Ubuntu 10.04使用Wine安装Source Insight 转自:http://www.linuxidc.com/
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source Insight
- Linux编程软件:ubuntu10.04使用wine安装SourceInsight
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source Insight
- 【Linux/Ubuntu学习2】ubuntu-ubuntu10.04使用wine安装SourceInsight
- 在Ubuntu10.04下安装insight遇到的问题及解决办法
- Ubuntu 10.04使用Wine安装Source Insight 来源:Linux社区 作者:linuxfx
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source Insight
- 【Linux/Ubuntu学习2】ubuntu-ubuntu10.04使用wine安装SourceInsight
- [转载]ubuntu10.04 安装insight后无法启动
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source Insight
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source + wine 速度慢的解决方法
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source Insight
- Linux下的Source Insight+Ubuntu 10.04使用Wine安装Source
- 在Ubuntu 10.04中安装 insight
- ubuntu10.04 wine安装source insight3.5
- Ubuntu 10.04屏幕录像软件Xvidcap安装及详细配置
- 手把手教你安装交叉编译工具链(宿主机系统为ubuntu10.04)
- vmware 中安装Ubuntu 10.04 LTS 后键盘失效问题解决