作者:金良([email protected]) csdn博客:http://blog.csdn.net/u012176591
apt-get install git-core
apt-get install gnupg
apt-get install flex
apt-get install bison
apt-get install gperf
apt-get install libsdl-dev
apt-get install libesd0-dev
apt-get install build-essential
apt-get install zip
apt-get install curl
apt-get install libncurses5-dev
apt-get install zlib1g-dev
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++.so when searching for -lstdc++make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1
apt-get install g++-multilib
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
apt-get install lib32z1-dev
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
ubuntu 11.04 32bit下命令如下
sudo apt-get install libncurses5-dev
ubuntu 12.04 64bit下命令如下
sudo apt-get install libncurses5-dev:i386
host C: acp <= build/tools/acp/acp.c
/bin/bash: cc: command not found
apt-get install gcc
/bin/bash: g++: command not found
apt-get install g++
/usr/bin/ld: cannot find -lX11
apt-get install libx11-dev:i386
error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
此处编译错误是由于ubuntu11.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
cannot find -lGL
apt-get install libgl1-mesa-dev:i386
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
解决方法:
$ vi frameworks/compile/slang/Android.mk
#local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter