网上找了半天,自己汇总一下。
======================错误一===============================
error: "_FORTIFY_SOURCE"解决方法:
修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:
将以下语句
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
修改为
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
======================错误2===============================
bits/predefs.h:没有那个文件
解决:sudo apt-get install libc6-dev-i386
======================错误3===============================
/usr/bin/ld: cannot find -lstdc++
sudo apt-get install g++-multilib
======================错误4===============================
apt-get install zlib1g-dev
发现已经安装。
缺少lib32z1-dev,安装即可:apt-get install lib32z1-dev
======================错误5===============================
/usr/bin/ld: cannot find -lncurses
apt-get install lib32ncurses5-dev
======================错误6===============================
external/oprofile/libpp/format_output.h:94:22: 错误: reference ‘counts’ cannot be declared ‘mutable’
解决办法:
external/oprofile/libpp/format_output.h
把:
mutable counts_t & counts;
改为:
counts_t & counts;
======================错误7===============================
/home/qupeng/android/iTop4412_ICS/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
gedit external/llvm/llvm-host-build.mk
增加
LOCAL_LDLIBS := -lpthread -ldl
======================错误8===============================
解决办法如下:
external/gtest/src/../include/gtest/internal/gtest-param-util.h
在头部添加上:#include <cstddef>
======================错误9===============================
把:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
改为:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
参考:http://code.google.com/p/android/issues/detail?id=22006#c0
参考:http://groups.google.com/group/android-building/browse_thread/thread/0207abb98ed72304