Ubuntu下编译insight错误:cc1: warnings being treated as errors
.././gdb/cli/cli-cmds.c: In function ‘pwd_command’:
.././gdb/cli/cli-cmds.c:323: error: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result
make[2]: *** [cli-cmds.o] 错误 1
make[2]:正在离开目录 `/home/qiang/tools/insight-6.8-1/gdb"
make[1]: *** [all-gdb] 错误 2
make[1]:正在离开目录 `/home/qiang/tools/insight-6.8-1"
make: *** [all] 错误 2解决方案:方法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了。Linux 时钟管理Red Hat Linux的分区及文件系统相关资讯 Ubuntu知识
- Ubuntu 有这功能吗?-回答4个新用 (10/14/2014 16:54:49)
- Ubuntu小知识总结 (07/08/2013 17:02:10)
- 万圣节Halloween与Ubuntu (10/31/2012 07:59:01)
| - Ubuntu系统诞生10周年:让Linux更 (10/14/2014 16:53:00)
- Ubuntu 官方发布 Ubuntu 应用程序 (02/15/2013 21:49:58)
- Ubuntu内置捐款选项:为掌握用户需 (10/11/2012 13:57:23)
|
本文评论 查看全部评论 (2)
评论声明- 尊重网上道德,遵守中华人民共和国的各项有关法律法规
- 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
- 本站管理人员有权保留或删除其管辖留言中的任意内容
- 本站有权在网站内转载或引用您的评论
- 参与本评论即表明您已经阅读并接受上述条款
| |