2015-08-29 21:16:27
来 源
中存储网
Ubuntu
刚把Android 4.0.1下载到自己的Ubuntu 11.10(64位)系统里,把整个编译环境都配置好了,编译时还是出现了如下的错误提示: command-line:0:0: warning: _FORTIFY_SOURCE redefined [enabled by default] built-in:0:0: note: this is the location of the p

刚把Android 4.0.1下载到自己的Ubuntu 11.10(64位)系统里,把整个编译环境都配置好了,编译时还是出现了如下的错误提示:

<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]

<built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors

make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1

后来发现了,原来是Ubuntu11.10里的gcc和g++版本太高了,于是执行接下来的操作:

sudo apt-get install gcc-4.4

sudo apt-get install g++-4.4

sudo rm -rf /usr/bin/gcc /usr/bin/g++

sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc

sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++

把默认的4.6版本换为了4.4,继续编译源码,又出现了另一个错误,大致提示为:

g++ selected multilib '32' not installed

继续奋战吧,安装相应的工具吧:sudo apt-get install g++-4.4-multilib,现在正在make -j8在我的i5/4G机子里跑着。

声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。