1.
host C: libneo_util <= external/clearsilver/util/neo_err.chost C: libneo_util <= external/clearsilver/util/neo_files.c
host C: libneo_util <= external/clearsilver/util/neo_misc.c
host C: libneo_util <= external/clearsilver/util/neo_rand.c
host C: libneo_util <= external/clearsilver/util/ulist.c
host C: libneo_util <= external/clearsilver/util/neo_hdf.c
host C: libneo_util <= external/clearsilver/util/neo_str.c
host C: libneo_util <= external/clearsilver/util/neo_date.c
host C: libneo_util <= external/clearsilver/util/wildmat.c
host C: libneo_util <= external/clearsilver/util/ulocks.c
host C: libneo_util <= external/clearsilver/util/neo_hash.c
host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)
host C: libneo_cs <= external/clearsilver/cs/csparse.c
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C: libneo_cgi <= external/clearsilver/cgi/cgiwrap.c
host C: libneo_cgi <= external/clearsilver/cgi/cgi.c
external/clearsilver/cgi/cgi.c:22:18: 致命错误: zlib.h:没有那个文件或目录
编译中断。
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] 错误 1
kerson@kerson-PC:~/Android-2.3.1$
解决方法:
sudo apt-get install zlib1g-dev
2.
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
bison -d -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/bin/bash: bison: 未找到命令
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] 错误 127
kerson@kerson-PC:~/Android-2.3.1$ sudo apt-get install bison
3.
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: flex: 未找到命令
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] 错误 127
kerson@kerson-PC:~/Android-2.3.1$ sudo apt-get install flex
4.
In file included from external/qemu/android/main.c:30:0:
prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: 致命错误: X11/Xlib.h:没有那个文件或目录
编译中断。
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/android/main.o] 错误 1
kerson@kerson-PC:~/Android-2.3.1$ sudo apt-get install libx11-dev
5.
<command-line>:0:0: 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
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