1. BUILD need library
If you are using UBUNTU 10.10 many error may occur while compiling. To solve them use this commands below.
Error: / Usr / include / gnu / stubs.h: 7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
sudo apt-get install libc6-dev-i386
Error: make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1
sudo apt-get install g + +-multilib
Error: external / clearsilver / cgi / cgi.c: 22: fatal error: zlib.h: No such file or directory compilation terminated.
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_cgi_intermediates/cgi.o] Error 1
sudo apt-get install zlib1g-dev
Error: / Usr / bin / ld: cannot find-lz collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
sudo apt-get install lib32z1-dev
Error: 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: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
sudo apt-get install bison
Error: Lex: aidl <= frameworks / base / tools / aidl / aidl_language_l.l / Bin / bash: flex: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
sudo apt-get install flex
Error: / Usr / bin / ld: cannot find-lncurses collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
sudo apt-get install lib32ncurses5-dev
sudo apt-get install libncurses5-dev
Error: prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h: 55: fatal error: X11/Xlib.h: No such file or directory compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates / Android / Main-common.o] Error 1
sudo apt-get install libx11-dev
Error: sh: gperf: not found
calling gperf failed: 32512 at. / makeprop.pl line 96.
make: *** [out / target / product / generic / obj / STATIC_LIBRARIES / libwebcore_intermediates / WebCore / css / CSSPropertyNames.h] Error 25
make: *** Deleting file `out / target / product / generic / obj / STATIC_LIBRARIES / libwebcore_intermediates / WebCore / css / CSSPropertyNames.h ‘
sudo apt-get install gperf
sudo apt-get install zlib1g-dev:i386
2. build ERROR#1
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<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
To fix this, refer to this patch.
https://github.com/CyanogenMod/android_build/commit/e9cbfa60c8dd60d04570d8bf7bd0d54a4304baf5
It will patch line 61 in /build/core/combo/HOST_linux-x86.mk as following.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
3. build ERROR #2
Error:
external/mesa3d/src/glsl/
......
external/mesa3d/src/glsl/
make: *** [out/host/linux-x86/obj/
Fix:
vi external/mesa3d/src/glsl/
Add '#include <stddef.h>' to list of includes as shown:
#include <climits>
#include <stddef.h>
#include <pixelflinger2/pixelflinger2_
4. build ERROR #3
Error:
host C++: liboprofile_pp <= external/oprofile/libpp/
In file included from external/oprofile/libpp/
external/oprofile/libpp/
make: *** [out/host/linux-x86/obj/
Fix:
vi external/oprofile/libpp/
Remove 'mutable' from 'mutable counts_t & counts;' on line 94:
counts_t & counts;
5. build ERROR #4
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
external/gtest/include/gtest/internal/gtest-param-util.h
add
#include <cstddef>
6. build ERROR #5
The failure /external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] Error 1
해결 방법 :
external/llvm/llvm-host-build.mk 파일에 다음 문장 추가
LOCAL_LDLIBS := -lpthread -ldl
7. build ERROR #6
frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:error: variable 'ParamName' set but not used [Werror=unused-but-set-variable]
해결 방법:
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 (-Werror) 삭제