Android 编译环境配置搭建(Ubuntu 14)及环境导致编译错误

转载来自:http://www.linuxidc.com/Linux/2013-11/92232p2.htm

.Android 编译报错(环境问题)QA:

Question:
g++: g++: selected multilib '32' not installed
selected multilib '32' not installed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/lib/libESR_Portable.so] Error 1
Answer:
sudo apt-get install g++-4.4-multilib gcc-4.4-multilib

 
Question:
/usr/bin/ld: cannot find -lreadline
make: *** [out/host/linux-x86/obj/EXECUTABLES/sqlite3_intermediates/sqlite3] Error 1

make: *** Waiting for unfinished jobs....

Answer:

sudo apt-get install libreadline6-dev lib32readline6-dev

 

Question:
/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] 错误 1

Answer:

  sudo apt-get install libc6-dev-i386


Question:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1

Answer:

  sudo apt-get install g++-multilib


Question:
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

Answer:

sudo apt-get install zlib1g-dev


Question:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

Answer:

sudo apt-get install lib32z1-dev


Question:
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

Answer:

sudo apt-get install bison


Question:
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

Answer:

sudo apt-get install flex


Question:
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

Answer:

sudo apt-get install lib32ncurses5-dev


Question:
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

Answer:

sudo apt-get install libx11-dev

Question:
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'

Answer:
sudo apt-get install gperf


你可能感兴趣的:(android,编译)