编译常见问题汇总
2014-12-18 18:20
169 查看
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
解决:
sudo apt-get install libc6-dev-i386
错误:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1
解决:
sudo apt-get install g++-multilib
错误:
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
错误:
/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
错误:
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
错误:
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
错误:
/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
错误:
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
错误:
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
gnu/stubs-32.h:No such file or directory
解决办法:
export LIBRARY_PATH=/usr/lib/i386-linux-gnu/export C_INCLUDE_PATH=/usr/include/i386-linux-gnuexport CPLUS_INCLUDE_PATH=/usr/include/i386-linux-gnu
问题一:在32位Ubuntu12.04上编译Android4.0.4源码时,出现了关于emulator的错误,关键是其Makefile里的-m64参数,将其用-m32代替即可,错误提示如下:
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/emulator64-target-arm_intermediates/tcg/tcg.o] Error 1
涉及需要改的文件如下:
external/qemu/Makefile.target
external/qemu/Makefile.common
参考网址:http://www.eoeandroid.com/home.php?mod=space&uid=23065&do=blog&id=2778
http://www.cnblogs.com/jqyp/archive/2012/02/27/2369291.html
http://www.eoeandroid.com/blog-636394-2916.html
问题二:编译时出现如下提示:
target Dex: core
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
make: *** [out/target/common/obj/J***A_LIBRARIES/core_intermediates/noproguard.classes-with-local.dex] Error 1
查找build/core/definitions.mk文件发现如下内容:
#TODO: use a smaller -Xmx value for most libraries;
# only core.jar and framework.jar need a heap this big.
# Avoid the memory arguments on Windows, dx fails to load for some reason with them.
define transform-classes.jar-to-dex
@echo "target Dex: $(PRIVATE_MODULE)"
@mkdir -p $(dir $@)
$(hide) $(DX) \
$(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
--dex --output=$@ \
$(incremental_dex) \
$(if $(NO_OPTIMIZE_DX), \
--no-optimize) \
$(if $(GENERATE_DEX_DEBUG), \
--debug --verbose \
--dump-to=$(@:.dex=.lst) \
--dump-width=1000) \
$(PRIVATE_DX_FLAGS) \
$<
endef
由于我的电脑只有2GB的内容,那么上面的2048M肯定满足不了,因为linux分配时还需分配给内核内存,故将该参数调小为1024M。
继续编译还会出现一些关于emulator的错误,而查阅了google官方资料,说是要在64bit系统上编译,换成64位的后,没出现什么错误,编译一切正常。
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpePic7X out/target/product/glacier/OMX_glacier-ota-eng.michael.zip
Could not create the Java virtual machine.
ERROR: signapk.jar failed: return code 1
make: *** [out/target/product/glacier/OMX_glacier-ota-eng.michael.zip] Error 1
解决:
更改 build/toos/releasetools/common.py文件找到
cmd = ["java", "-Xmx2048m", "-jar",
os.path.join(OPTIONS.search_path, "signapk.jar")]
把2048改为1024及可
2、/bin/sh uuencode not found
解决:apt-get install sharutils
3、unfortunately system ui has stopped
解决:把out的system的build.prop里的ro.sf.lcd_density=160改为ro.sf.lcd_density=213 ,这个是分辨率的密度,android是根据这个来判定是pad还是phone,但是不得超过213,据说是字符转换出了错的原因。
4、 /bin/bash: bison: command not found
解决:apt-get install bash
5、/bin/bash: flex: command not found
解决:apt-get install flex
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] 错误 1
解决:
sudo apt-get install libc6-dev-i386
错误:
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] error 1
解决:
sudo apt-get install g++-multilib
错误:
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
错误:
/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
错误:
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
错误:
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
错误:
/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
错误:
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
错误:
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
gnu/stubs-32.h:No such file or directory
解决办法:
export LIBRARY_PATH=/usr/lib/i386-linux-gnu/export C_INCLUDE_PATH=/usr/include/i386-linux-gnuexport CPLUS_INCLUDE_PATH=/usr/include/i386-linux-gnu
问题一:在32位Ubuntu12.04上编译Android4.0.4源码时,出现了关于emulator的错误,关键是其Makefile里的-m64参数,将其用-m32代替即可,错误提示如下:
ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/emulator64-target-arm_intermediates/tcg/tcg.o] Error 1
涉及需要改的文件如下:
external/qemu/Makefile.target
external/qemu/Makefile.common
参考网址:http://www.eoeandroid.com/home.php?mod=space&uid=23065&do=blog&id=2778
http://www.cnblogs.com/jqyp/archive/2012/02/27/2369291.html
http://www.eoeandroid.com/blog-636394-2916.html
问题二:编译时出现如下提示:
target Dex: core
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
make: *** [out/target/common/obj/J***A_LIBRARIES/core_intermediates/noproguard.classes-with-local.dex] Error 1
查找build/core/definitions.mk文件发现如下内容:
#TODO: use a smaller -Xmx value for most libraries;
# only core.jar and framework.jar need a heap this big.
# Avoid the memory arguments on Windows, dx fails to load for some reason with them.
define transform-classes.jar-to-dex
@echo "target Dex: $(PRIVATE_MODULE)"
@mkdir -p $(dir $@)
$(hide) $(DX) \
$(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
--dex --output=$@ \
$(incremental_dex) \
$(if $(NO_OPTIMIZE_DX), \
--no-optimize) \
$(if $(GENERATE_DEX_DEBUG), \
--debug --verbose \
--dump-to=$(@:.dex=.lst) \
--dump-width=1000) \
$(PRIVATE_DX_FLAGS) \
$<
endef
由于我的电脑只有2GB的内容,那么上面的2048M肯定满足不了,因为linux分配时还需分配给内核内存,故将该参数调小为1024M。
继续编译还会出现一些关于emulator的错误,而查阅了google官方资料,说是要在64bit系统上编译,换成64位的后,没出现什么错误,编译一切正常。
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpePic7X out/target/product/glacier/OMX_glacier-ota-eng.michael.zip
Could not create the Java virtual machine.
ERROR: signapk.jar failed: return code 1
make: *** [out/target/product/glacier/OMX_glacier-ota-eng.michael.zip] Error 1
解决:
更改 build/toos/releasetools/common.py文件找到
cmd = ["java", "-Xmx2048m", "-jar",
os.path.join(OPTIONS.search_path, "signapk.jar")]
把2048改为1024及可
2、/bin/sh uuencode not found
解决:apt-get install sharutils
3、unfortunately system ui has stopped
解决:把out的system的build.prop里的ro.sf.lcd_density=160改为ro.sf.lcd_density=213 ,这个是分辨率的密度,android是根据这个来判定是pad还是phone,但是不得超过213,据说是字符转换出了错的原因。
4、 /bin/bash: bison: command not found
解决:apt-get install bash
5、/bin/bash: flex: command not found
解决:apt-get install flex
相关文章推荐
- Android系统编译过程中常见问题汇总(1)
- 常见通用编译调试问题汇总
- Android系统编译过程中常见问题汇总(1)
- Android系统编译过程中常见问题汇总(1)
- Android系统编译过程中常见问题汇总(1)
- 常见创建项目编译运行问题汇总
- [FAQ14830]【Build and Make】L版本常见编译问题汇总
- Android系统编译过程中常见问题汇总(1)
- 64位平台编译常见问题汇总(个人移植问题仅供参考)
- Android系统编译过程中常见问题汇总(1)
- Windows 编译caffe常见错误问题汇总
- Gnuradio C++block 编译常见问题汇总
- Jenkins自动编译常见问题汇总(持续更新)
- Android系统编译过程中常见问题汇总
- Android系统编译过程中常见问题汇总(1)
- Ldd3编译遇到常见问题汇总
- 搭建oracle的cres编译环境常见问题汇总
- 版本常见编译问题汇总
- 对于JAVA基础测试中常见的异常问题汇总
- Veritas常见问题汇总