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