今天需要在ubuntu10.10系统中编译gdb-6.8,编译器为gcc-4.4.5。进入gdb-6.8源码目录后按照惯例执行:
./configure; make; make install
编译过程中得到下面错误信息:
cc1: warnings 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
这里提示警告信息被作为错误处理,那应该是Makefile中gcc传递了-Werror选项。原本想打开Makefile改一下,但试了一下
./configure --hlep
发现有这样的选项
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-werror enable -Werror in bootstrap stage2 and later
于是,重新在gdb-6.8目录中执行
./configure --disable-werror
make
后面的编译过程顺利完成,没有再出现错误。
阅读(11238) | 评论(1) | 转发(0) |