编译android源代码,老出错误,查了半天编译环境,觉得配的android tool-chain没问题。。后来发现是TMD本地编译环境有问题。。。。。。一直以为android只会交叉编译呢。。。。
/bin/bash: line 0: cd: sdk/layoutopt/app/src/resources: No such file or directory
host C: acp <= build/tools/acp/acp.c
host C: libhost <= build/libs/host/CopyFile.c
cc1: error: unrecognized option `-Winit-self'
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: error: unrecognized option `-Winit-self'
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
host C.............考。是本地gcc的问题。后来查看了一下我的gcc版本。。
$gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/specs
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug i486-linux-gnu
Thread model: posix
gcc version 3.3.6 (Ubuntu 1:3.3.6-15ubuntu6)
3.3.6....老掉牙的版本了。。。~升级!
sudo rm /usr/bin/gcc
sudo ln /usr/bin/gcc-4.2 /usr/bin/gcc
改完了编译~~走你了~~~终于能编译了。。。
阅读(2858) | 评论(0) | 转发(0) |