Android源码编译make的错误处理

Android源码下载:

官方下载:http://source.android.com/source/downloading.html

或参考android源码下载方式:http://blog.csdn.net/sunboy_2050/article/details/6746810

Android编译版本: PLATFORM_VERSION=4.0.1(最新Android 4.0.1)

OS 操作系统平台: Linux yanggang 2.6.35- 30-generic #61-Ubuntu SMP Tue Oct 11 15:29:15 UTC 2011 i686 GNU/Linux(Ubuntu10.10  32bit)

首先,我 们先安装一些常用的工具 curl: sudo  apt-get  install  curl

git: sudo  apt-get  install  git

g++: sudo  apt-get  install  g++

然后,make遇到缺什么就安装什么

/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

解决方法:sudo apt-get install zlib1g-dev    sudo apt-get install lib64z1-dev

/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

解决方法:sudo apt-get install bison

/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

解决方法:sudo apt-get install flex

/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

解决方法:sudo apt-get install libncurses5-dev

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

解决方法:sudo apt-get install libgl1-mesa-dev

sh: gperf: not found

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'

解决方法:sudo apt-get install gperf

时间: 2024-11-03 13:49:31

Android源码编译make的错误处理的相关文章

android 源码编译出现的错误

问题描述 android 源码编译出现的错误 xxxxx@compiler:~/xxxx/0313-test-1/0313/packages/xxxx/myTV$ mm -B PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=4.4.2TARGET_PRODUCT=m201TARGET_BUILD_VARIANT=userTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armTARGET_AR

android源码编译 出现的错误

问题描述 android源码编译 出现的错误 编译6.0的时候出现下面这个错误,查了好久毫无头绪 有谁遇到过吗 preparing StaticLib: libc [including out/target/product/generic/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a] preparing StaticLib: libc [including out/target/product/generic/obj/

android源码编译出错误

问题描述 android源码编译出错误 请教下,我按正常的源码编译流程报了一个错误,collect2: ld returned 1 exit status make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libstagefright_omx_intermediates/LINKED/libstagefright_omx.so] Error 1 网上找的解决办法是:cp -Rfp device/ti/blaze/buildspe

android源码编译错误总结

android源码编译及错误解决: 下载的源码,进入源码目录,执行make命令即可. 加快源码编译:make -jN,cpu有几个核N就填几 不过其中会有一些错误,下面是我编译中出现的错误,解决非常的简单: 编译源码中遇到的错误: 贴出来一个个解决: 绿色:表示找出问题 Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y bison -d  -o out/host/linux-x86/obj/EXECUTABLES/aidl_in

使用Android源码编译c模块生成可执行文件

问题描述 使用Android源码编译c模块生成可执行文件 5C 使用的是海思的SDK,这个应该跟Android的编译环境差不多吧.各位大侠 我的问题是这样的写了个helloworld的测试程序,是可以编译成可执行程序然后在机器上运行打印出来的.但是呢,在编译模块的时候遇到问题了.按照之前的方式,在development下创建一个文件夹moudle,然后把所有需要的.c .h .so文件都搬了过来,写了个Android.mk,但是呢 在里面添加一句LOCAL_SHARED_LIBRARIES +=

android源码编译-ubuntu14.0 编译 Android 源码失败

问题描述 ubuntu14.0 编译 Android 源码失败 ubuntu14.0 编译 Android 源码失败贴出错误提示,有知道的大神告诉下,谢谢. *** 没有规则可以创建"out/target/product/rk30sdk/kernel"需要的目标"kernel/arch/arm/boot/Image". 停止.

linux编程-android源码编译失败,出现以下图问题

问题描述 android源码编译失败,出现以下图问题 解决方案 报错提示不是说没有文件输入吗

关于在android源码编译时引用第三方jar宝--需要在android.mk中配置

今天进行android源码编译时出现一个问题,报错找不到文件,最后查看到那些找不到的问题全部都是第三方jar包里的引用文件,于是百度找解决办法.终于找到解决办法,现在分享给大家,我已经亲测通过了. 转自:http://www.cnblogs.com/hopetribe/archive/2012/04/23/2467060.html 开始正文: LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_STATIC_JAVA_LIBRARIES

android源码编译-android 源码编译报错

问题描述 android 源码编译报错 android 源码编译报错,在网上查找没有类似的回答,是否有大神遇到类似问题. 解决方案 看看你报错的上一行,libext2fs.so这个文件缺少,应该是你的源码有问题,或者库没有安装好(编译源码前不是有环境配置吗,要安装一些列东西) 解决方案二: 在android 源码里 编译 aidl 报错 的问题编译android源码报错:build/envsetup.sh: 1: Syntax error: ""("" unexpe