android 4.0.3编译 总结

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

ATTENTION:
There is a SPACE between the -U_FORTIFY_SOURCE and -D_FORTIFY_SOURCE

第二处错误上场了
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach

在工程根目录下,打开下面的makefile文件:
源码目录 frameworks/compile/slang/Android.mk

.在打开的makefile文件中按照下面更改:
#local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror

local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter


原因很简单 把警告当作error处理,所以此处要修改

-----------------------------------------------

Error:
external/gtest/src/../include/gtest/gtest-param-test.h:287:58: note: ‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1

Two fixes required:
1)
vi external/gtest/src/Android.mk

Add '-fpermissive' to lines 52 and 70 (both lines contain same info)
LOCAL_CFLAGS += -O0 -fpermissive

2)
vi external/gtest/include/gtest/internal/gtest-param-util.h

Add '#include <stddef.h>' to list of includes as shown:
#include <vector>
#include <stddef>
#include <gtest/internal/gtest-port.h>

-------------------------------------------------------------------------------------

In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: 错误: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
解决办法: 
external/oprofile/libpp/format_output.h 
把: 
mutable counts_t & counts; 
改为: 
counts_t & counts;



--------------------------------------------------------------------

http://blog.csdn.net/ilittleone/article/details/7101446

http://blog.csdn.net/xumercury/article/details/7746229


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值