本人刚学习在Ubuntu上下载、编译和安装Android源代码,不过在进行如下编译命令后:
USER-NAME@MACHINE-NAME:~/Android$ make
出现了如下错误:
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
哪位大侠比较明白,小弟请教 

解决方案 »

  1.   

    只是一个warning, makefile中把Werror去掉就ok了
      

  2.   

    http://source.android.com/source/initializing.html
    可以对照这里检查需要的编译工具是否齐全
      

  3.   

    _FORTIFY_SOURCE 这个变量里重复设置了-Werrror这个参数,去掉他
      

  4.   

    版大,这里貌似不是重复设置Werror吧,Werror是一个编译选项,去掉它 warnings 就不会being treated as errors了。呵呵
      

  5.   

    请参考下文:
    http://webcache.googleusercontent.com/search?q=cache:YS7HPCw9gp4J:blog.chinaunix.net/space.php%3Fuid%3D495571%26do%3Dblog%26id%3D3026801+%3Ccommand-line%3E:0:0:+error:+%22_FORTIFY_SOURCE%22+redefined+%5B-Werror%5D&cd=8&hl=en&ct=clnk&gl=sg&lr=lang_zh-CN|lang_zh-TW|lang_en&client=ubuntu