Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2935657
  • 博文数量: 401
  • 博客积分: 12926
  • 博客等级: 上将
  • 技术积分: 4588
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-22 14:51
文章分类

全部博文(401)

文章存档

2015年(16)

2014年(4)

2013年(12)

2012年(82)

2011年(98)

2010年(112)

2009年(77)

分类: 嵌入式

2010-06-09 10:19:28

编译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

改完了编译~~走你了~~~终于能编译了。。。
阅读(2809) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~