First, let's install some commonly used tools
curl: sudo apt-get install curl
git: sudo apt-get install git
g++: sudo apt-get install g++
Then, make encountered what is missing on the installation
The ================= error ===================
/ Usr / bin / ld: cannot find-lz
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/ Usr / bin / ld: cannot find-lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
Solution: sudo apt-get install zlib1g-dev sudo apt-get install lib64z1-dev
A ================= error ===================
/ Bin / bash: bison: command not found
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: command not found
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
Solution: sudo apt-get install bison
The ================= error ===================
/ Bin / bash: flex: command not found
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function 'int yyparse ()':
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: 1827: warning: deprecated conversion from string constant to 'char *'
out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: 1970: warning: deprecated conversion from string constant to 'char *'
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
Solution: sudo apt-get install flex
A ================= error ===================
/ Usr / bin / ld: cannot find-lncurses
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
/ Usr / bin / ld: cannot find-lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1
Solution: sudo apt-get install libncurses5-dev
The ================= error ===================
fatal error: GL / glx.h: No such file or directory
development / tools / emulator / opengl / host / libs / Translator / GLcommon / GLDispatch.cpp: 22: fatal error: GL / glx.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libGLcommon_intermediates/GLDispatch.o] Error 1
Solution: sudo apt-get install libgl1-mesa-dev
================= Error 6 ===================
sh: gperf: not found
target Generated: libwebcore <= external / webkit / Source / JavaScriptCore / create_regex_tables
Generating CSSPropertyNames.h <= CSSPropertyNames.in
sh: gperf: not found
calling gperf failed: 32512 at. / makeprop.pl line 140.
make: *** [out / target / product / generic / obj / STATIC_LIBRARIES / libwebcore_intermediates / Source / WebCore / css / CSSPropertyNames.h] Error 25
make: *** Deleting file `out / target / product / generic / obj / STATIC_LIBRARIES / libwebcore_intermediates / Source / WebCore / css / CSSPropertyNames.h '
Solution: sudo apt-get install gperf
================= Error 7 ===================
error: variable 'ParamName' set but not used [-Werror = unused-but-set-variable]
frameworks / compile / slang / slang_rs_export_foreach.cpp: 247:23: error: variable 'ParamName' set but not used [-Werror = unused-but-set-variable]
cc1plus: all warnings being treated as errors
Solution:
$ 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
================= Error 8 ===================
.external/mesa3d/src/glsl/linker.cpp: 623:33: warning: 'Virtual ir_visitor_status remap_variables (ir_instruction * gl_shader * hash_table *) :: remap_visitor :: visit (ir_dereference_variable-*)' hidden [-Woverloaded- virtual]
external/mesa3d/src/glsl/linker.cpp: function 'void assign_varying_locations or (gl_shader_program * gl_shader * gl_shader *)' in:
external/mesa3d/src/glsl/linker.cpp: 1394:49: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1394:50: error: 'varyings' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1394:58: error: 'offsetof' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1395:48: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1412:47: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1412:48: error: 'position' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1414:47: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1414:48: error: 'pointSize' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1424:47: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1424:48: error: 'position' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1428:47: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1428:48: error: 'frontFacingPointCoord' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1431:47: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1431:48: error: 'frontFacingPointCoord' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: function 'void link_shaders (const gl_context * gl_shader_program *)':
external/mesa3d/src/glsl/linker.cpp: 1734:49: error: expected primary-expression before ',' token
external/mesa3d/src/glsl/linker.cpp: 1734:50: error: 'fragColor' in this scope has not been declared
external/mesa3d/src/glsl/linker.cpp: 1734:59: error: 'offsetof' in this scope has not been declared
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
Solution:
vim external/mesa3d/src/glsl/linker.cpp
Add:
# Include <cstddef>
================= Error 9 ===================
In file included from external / oprofile / libpp / arrange_profiles.cpp: 24:0:
external / oprofile / libpp / format_output.h: 94:22: error: reference 'counts' cannot be declared 'mutable' [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
The solution:
vim external / oprofile / libpp / format_output.h
To:
mutable counts_t just & counts;
Read:
counts_t and counts;
The ================= error 10 ===================
undefined reference to `pthread_mutexattr_destroy '
host C + +: libgtest_host <= external / gtest / src / gtest-all.cc
true
host C + +: libgtest_main_host <= external / gtest / src / gtest_main.cc
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a (Signals.o): In function `PrintStackTrace ':
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc: 219: undefined reference to `dladdr '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Unix/Signals.inc: 231: undefined reference to `dladdr '
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a (Threading.o): In function `llvm :: llvm_execute_on_thread (void (*) (void *), void *, unsigned int) ':
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp: 96: undefined reference to `pthread_create '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp: 91: undefined reference to `pthread_attr_setstacksize '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Threading.cpp: 100: undefined reference to `pthread_join '
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a (Mutex.o): In function `MutexImpl ':
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp: 69: undefined reference to `pthread_mutexattr_init '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp: 75: undefined reference to `pthread_mutexattr_settype '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp: 80: undefined reference to `pthread_mutexattr_setpshared '
/ Home/aa/project/android4.0.1/external/llvm/lib/Support/Mutex.cpp: 89: undefined reference to `pthread_mutexattr_destroy '
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a (Mutex.o): In function `llvm :: sys :: MutexImpl :: tryacquire () ':
/ Home/aa/project/android4.0.1/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
make: *** Waiting for unfinished jobs ....
Solution:
$ Vi external / llvm / llvm-host-build.mk
LOCAL_LDLIBS: =-lpthread-ldl
The following methods can not resolve the error, there will be a new error: can't find threads.h file or dir $ vi external / llvm / lib / Support / Android.mk
Add the following two:
LOCAL_C_INCLUDES + = system / core / include / cutils
LOCAL_SHARED_LIBRARIES: = libcutil
$ Vi external / llvm / lib / Support / Mutex.cpp
Add:
# Include <threads.h>
$ Vi external / llvm / lib / Support / Threading.cpp
Add:
# Include <threads.h>
The ================= error 11 ===================
make[2]: *** [keyboard.o] Error 1
make[2]: Leaving directory `/tmp/pom1-1.0.0/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/pom1-1.0.0/src'
make: *** [install-recursive] Error 1
pi@PiDesktop /tmp/pom1-1.0.0 $ pom1
bash: pom1: command not found
Solution:
$ sudo apt-get install libsdl1.2-dev
================= error 12 ===================
[out/target/product/generic/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp] Error 127
Solution:
$ sudo apt-get install libswitch-perl
$ sudo apt-get install gperf
/bin/bash: xmllint: command not found
$ sudo apt-get install libxml2-utils
'AOSP' 카테고리의 다른 글
AOSP kitkat(4.4) 빌드방법 (0) | 2015.03.03 |
---|---|
libz.so.1: cannot open shared object file (0) | 2015.03.03 |
libz.so.1 error1 (0) | 2015.03.03 |
aidl_language_l.cpp error 127 (0) | 2015.03.03 |
error: Exited sync due to fetch errors (0) | 2015.03.03 |