求助: 在ubuntu10.04中安装 insight 遇到问题
-
- 帖子: 4
- 注册时间: 2007-10-31 7:47
求助: 在ubuntu10.04中安装 insight 遇到问题
这些天想在ubuntu10.04中,安装一个 insight调试工具,我安装的过程是 先sudo ./configure 然后sudo make,
但是在编译的时候,总是把一些警告信息 当成错误,无法继续编译
例如:
cc1:warning being treated as errors
linux-nat.c: In function 'linux_nat_info_proc_cmd':
linux-nat.c:2879:error:ignoring return value of 'fgets',declared with attribute warn_unused_result
我想问的是,如果把编译的 Werror选项关掉,让它不要把一些警告信息当成错误。
请高手帮帮忙啊,希望把操作过程写详细点,小弟感激不尽
但是在编译的时候,总是把一些警告信息 当成错误,无法继续编译
例如:
cc1:warning being treated as errors
linux-nat.c: In function 'linux_nat_info_proc_cmd':
linux-nat.c:2879:error:ignoring return value of 'fgets',declared with attribute warn_unused_result
我想问的是,如果把编译的 Werror选项关掉,让它不要把一些警告信息当成错误。
请高手帮帮忙啊,希望把操作过程写详细点,小弟感激不尽
-
- 帖子: 50
- 注册时间: 2007-12-24 13:23
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
呵呵,我也是遇到这个问题了。以前一直用insight,10.04不知道什么原因去掉了 ,转而用ddd,ddd实在是太慢了。今天有时间,就下载了一个insight-6.8-1的源代码编译了一下,也遇到了楼主的问题,解决方法如下:
方法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了。
呵呵!
方法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了。
呵呵!
-
- 帖子: 4
- 注册时间: 2007-10-31 7:47
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
哇,终于有人回复我了,你说的两个方法我以前都试过,第一个:我实在受不了了,太多了,于是试第二种,再Makefile中并没有找到 WERROR_CFLAGS = -Werror这一项呀。
请问你的操作过程详细点是什么样的。
我首先解压包:sudo tar xvf insight-6-8-1
然后 sudo ./configure 这一步生成makefile,请问你在这一步添加了什么附加的参数了没呀?为什么我找不到WERROR_CFLAS 呢?
请问你的操作过程详细点是什么样的。
我首先解压包:sudo tar xvf insight-6-8-1
然后 sudo ./configure 这一步生成makefile,请问你在这一步添加了什么附加的参数了没呀?为什么我找不到WERROR_CFLAS 呢?
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
-
- 帖子: 4
- 注册时间: 2007-10-31 7:47
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
不行呀,按照兄台说的还是有点问题,我先说一下我的操作方法
解压后进入 insight目录
sudo ./configure
然后进入 gdb目录
打开 Makefile文件,然后将 WERROR_CFLAGS = -Werror 改成 WERROR_CLFAGS = #-Werror
然后回到insight目录,接着make
然后就出现了新的问题:
libgdb.a(i386-linux-nat.o): In function `fill_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:378: undefined reference to `i387_collect_fxsave'
libgdb.a(i386-linux-nat.o): In function `supply_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:367: undefined reference to `i387_supply_fxsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:312: undefined reference to `i387_collect_fsave'
libgdb.a(i386-linux-nat.o): In function `supply_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:301: undefined reference to `i387_supply_fsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:378: undefined reference to `i387_collect_fxsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:312: undefined reference to `i387_collect_fsave'
collect2: ld returned 1 exit status
请问兄台遇到这个问题没?如果没有遇到,能不能说说你操作的步骤,详细一点,先谢过了
解压后进入 insight目录
sudo ./configure
然后进入 gdb目录
打开 Makefile文件,然后将 WERROR_CFLAGS = -Werror 改成 WERROR_CLFAGS = #-Werror
然后回到insight目录,接着make
然后就出现了新的问题:
libgdb.a(i386-linux-nat.o): In function `fill_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:378: undefined reference to `i387_collect_fxsave'
libgdb.a(i386-linux-nat.o): In function `supply_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:367: undefined reference to `i387_supply_fxsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:312: undefined reference to `i387_collect_fsave'
libgdb.a(i386-linux-nat.o): In function `supply_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:301: undefined reference to `i387_supply_fsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpxregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:378: undefined reference to `i387_collect_fxsave'
libgdb.a(i386-linux-nat.o): In function `fill_fpregset':
/tools/insight-6.8-1/gdb/i386-linux-nat.c:312: undefined reference to `i387_collect_fsave'
collect2: ld returned 1 exit status
请问兄台遇到这个问题没?如果没有遇到,能不能说说你操作的步骤,详细一点,先谢过了
-
- 帖子: 4
- 注册时间: 2007-10-31 7:47
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
好了,终于解决问题了,下面应该结贴了。呵呵
下面详细说一下操作方法:
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 (因为我的源文件存放在 /tools目录下,所以需要加 sudo)
5.遇到错误,编译一段时间过后就会发现本贴一开始提到的错误,一些warning被当成错误了
cd gdb #(进入insight下的gdb目录)
sudo gedit Makefile
找到WERROR_CFLAGS = -Werror,将其改为
WERROR_CFLAGS=#-Werror(这里也可以将‘=’后面的内容删除掉变成 WERROR_CFLGAS= )
保存退出
仍然回到insight目录
cd ..
6.接着make
sudo make
7.这时再过段时间看看,是不是编译通过 呢
编译通过后安装 sudo make install
再次感谢大家帮我解决问题,希望以后大家遇到这个问题,不用到处寻求解决办法了
下面详细说一下操作方法:
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 (因为我的源文件存放在 /tools目录下,所以需要加 sudo)
5.遇到错误,编译一段时间过后就会发现本贴一开始提到的错误,一些warning被当成错误了
cd gdb #(进入insight下的gdb目录)
sudo gedit Makefile
找到WERROR_CFLAGS = -Werror,将其改为
WERROR_CFLAGS=#-Werror(这里也可以将‘=’后面的内容删除掉变成 WERROR_CFLGAS= )
保存退出
仍然回到insight目录
cd ..
6.接着make
sudo make
7.这时再过段时间看看,是不是编译通过 呢
编译通过后安装 sudo make install
再次感谢大家帮我解决问题,希望以后大家遇到这个问题,不用到处寻求解决办法了
-
- 帖子: 50
- 注册时间: 2007-12-24 13:23
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
先恭喜canjiane一下终于解决了。不好意思我这几天调试个Bug,没有上论坛。呵呵!
insight速度还可以,就是我在调试大项目的时候,经常出现不能接受键盘事件的问题,很麻烦。
后来总结出来了点规律,好像打开窗口的时候,如果同时有watch窗口出现,就有很大的几率不接受键盘事件,看了下log好像跟输入法有关系,呵呵。
现在是ddd和insight混着用了,嘿嘿!
insight速度还可以,就是我在调试大项目的时候,经常出现不能接受键盘事件的问题,很麻烦。
后来总结出来了点规律,好像打开窗口的时候,如果同时有watch窗口出现,就有很大的几率不接受键盘事件,看了下log好像跟输入法有关系,呵呵。
现在是ddd和insight混着用了,嘿嘿!
-
- 帖子: 6
- 注册时间: 2010-03-13 16:07
-
- 帖子: 1
- 注册时间: 2010-09-26 22:37
-
- 帖子: 6
- 注册时间: 2008-04-27 7:04
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
lz的这个帖子真是好心帮倒忙呀,许许多多的中文网页都引用了这里的解决方案,可惜这个方案是不准确的。我给大家一个准确的方案,已经在Xubuntn11.10中测试过了。
1. sudo apt-get install libx11-dev
2. sudo apt-get install libncurses5-dev
3. tar -xjvf insight-6.8-1.tar.bz2
4. cd insight-6.8-1/
5. ./configure –disable-werror
6. sudo make
7. sudo make install
1. sudo apt-get install libx11-dev
2. sudo apt-get install libncurses5-dev
3. tar -xjvf insight-6.8-1.tar.bz2
4. cd insight-6.8-1/
5. ./configure –disable-werror
6. sudo make
7. sudo make install
-
- 帖子: 1
- 注册时间: 2012-03-11 20:56
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
用10楼的方法解决了,版本是ubuntu11.10
-
- 帖子: 2
- 注册时间: 2014-09-22 19:25
- 系统: ubuntu kylin14.04
Re: 求助: 在ubuntu10.04中安装 insight 遇到问题
cd .. \miaofantasy 写了:用10楼的方法解决了,版本是ubuntu11.10
&& CONFIG_FILES=po/Makefile.in:po/Make-in \
CONFIG_HEADERS= /bin/bash ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Leaving directory `/home/assembly/Downloads/insight-6.8-1/bfd/po'
make[3]: Entering directory `/home/assembly/Downloads/insight-6.8-1/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/home/assembly/Downloads/insight-6.8-1/bfd/po'
make[3]: Entering directory `/home/assembly/Downloads/insight-6.8-1/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/home/assembly/Downloads/insight-6.8-1/bfd'
make[2]: ***[info-recursive]Error1
make[2]: Leaving directory `/home/assembly/Downloads/insight-6.8-1/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/assembly/Downloads/insight-6.8-1'
make: *** [all] Error 2
在ubuntu14.04下遇见这种问题,已经试遍各种大神的方法,难道是我的姿势不对?