Chinaunix首页 | 论坛 | 博客
  • 博客访问: 424972
  • 博文数量: 69
  • 博客积分: 957
  • 博客等级: 准尉
  • 技术积分: 1161
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-26 14:54
文章分类

全部博文(69)

文章存档

2013年(15)

2012年(12)

2011年(42)

分类: LINUX

2011-11-24 12:41:03

///
:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
 :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
此处编译错误是由于ubuntu 11.10采用了GCC4.6.1导致的。
解决方法:
修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:
将以下语句
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
修改为
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

编译时还有可能出现类似的错误,根据错误提示的关键词比如g++错误、jre错误等,都是些细节问题,比较好解决。经过两小时左右的等待后,终于顺利完成。编译成功后会生成system.img等镜像文件,下面是编译完成提示:

Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
Installed file list: out/target/product/generic/installed-files.txt



///java版本出错处理
安装jdk-6u27-linux-i586-0.bin,在/etc/profile中添加如下设置:
export PATH=//usr/local/jdk1.6.0_27bin:$PATH
export JAVA_HOME=/usr/local/jdk1.6.0_27


///

arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

make: *** [out/target/product/generic/obj/lib/crtbegin_dynamic.o] Error 1

如果之前的依赖包都已经安装成功的话,此处应该是交叉编译工具权限的问题。这个问题只要在文章开头lunch时执行了赋予权限命令,就应该不会遇到了。


///
bad class file:javax/microedition/khronos/egl/EGLConfig.class(javax/microedition/khronos/egl:EGLConfig.class)unable to access file: corrupted zipfile Please remove or make sure it appearsin the correct subdirectory of the classpath.importjavax.microedition.khronos.egl.EGLConfig;

^

make: ***[out/target/common/obj/APPS/Camera_intermediates/classes-full-debug.jar]Error 41

make: *** Waiting for unfinishedjobs....

这一错误是Ubuntu使用了fastjar而不是jar。卸载jar即可,而且推荐用apt-get安装jdk,因为解压tar.gz后不会在系统注册jar,也不能用update-alternatives对其配置。

///

file not recognized: File truncated collect2: ld returned 1 exit status

碰到这个问题,一般建议先做make clean,重新再编译一次,基本都可以解决.

阅读(2907) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~