Chinaunix首页 | 论坛 | 博客
  • 博客访问: 631151
  • 博文数量: 75
  • 博客积分: 988
  • 博客等级: 准尉
  • 技术积分: 1269
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-10 15:44
文章分类

全部博文(75)

文章存档

2022年(1)

2019年(1)

2018年(1)

2016年(9)

2015年(7)

2013年(6)

2012年(40)

2011年(10)

分类: LINUX

2012-08-06 19:52:00

编译Android文件系统
执行
make TARGET_PRODUCT=beaglebone OMAPES=4.x -j4
我这里报错了,是之前的java环境没有装好。解决办法:
sudo gedit /etc/profile
在最末尾加入如下语句:
#set java environment
JAVA_HOME=/usr/lib/jvm/jdk1.6.0_32
export JRE_HOME=/usr/lib/jvm/jdk1.6.0_32/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
重启系统

再编译,报错如下:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs....
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

sudo ./build/envsetup.sh
make clean
make TARGET_PRODUCT=beaglebone OMAPES=4.x -j4报错:
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
解决办法: sudo apt-get install build-essential
sudo apt-get install libc6-dev-i386 还是出问题,根据提示好多没有权限,就直接用超用户来操作。
又报其他的错,如下:
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
make: *** Waiting for unfinished jobs....
根据网上的提示,应该是编译器版本过高导致,一种办法是直接更换低版本的编译器,另一种办法
build/core/combo/HOST_linux-x86.mk line 61:

把:
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
改为:
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
继续编译,编译N久还是报错
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
host C++: liboprofile_pp <= external/oprofile/libpp/callgraph_container.cpp
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
make: *** Waiting for unfinished jobs....
 需要修改external/oprofile/libpp/format_output.h:94行

mutable counts_t & counts为

counts_t & counts

修改后效果不明显

external/oprofile/libpp/format_output.h:95:14: error: expected ‘;’ at end of member declaration
host C++: liboprofile_pp <= external/oprofile/libpp/callgraph_container.cpp
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
make: *** Waiting for unfinished jobs....

只有按照网上的办法来降低编译器版本了。

sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4



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