第一个错误:

        host Executable: cmu2nuance (out/host/linux-x86/obj/EXECUTABLES/cmu2nuance_intermediates/cmu2nuance)

        /usr/bin/ld: cannot find -lncurses

        collect2: ld returned 1 exit status

        make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1

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

        host Executable: coverage (out/host/linux-x86/obj/EXECUTABLES/coverage_intermediates/coverage)



        安装libncurses5-dev:i386能够解决



        sudo apt-get install libncurses5-dev:i386



       编译kernel源代码时出现例如以下错误:



        HOSTLD  scripts/kconfig/mconf

        scripts/kconfig/mconf.o: In function `show_help':

        mconf.c:(.text+0x811): undefined reference to `stdscr'

        scripts/kconfig/mconf.o: In function `main':

        mconf.c:(.text+0x1286): undefined reference to `initscr'

        mconf.c:(.text+0x128d): undefined reference to `stdscr'

        scripts/kconfig/lxdialog/checklist.o: In function `print_arrows':

        checklist.c:(.text+0x41): undefined reference to `wmove'

        checklist.c:(.text+0x61): undefined reference to `acs_map'



        安装libncurses5-dev能够解决



        sudo apt-get install libncurses5-dev



第二个错误:

      cc1plus: all warnings being treated as errors

    make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] 错误 1

    解决:通过SMBAserver进入并改动源代码文件夹下/build/core/combo/HOST_linux-x86.mk文件:



    将下面语句

    HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

    改动为

    HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0



第三个错误:

    make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach

    在project根文件夹下,打开以下的makefile文件:

    源代码文件夹 frameworks/compile/slang/Android.mk

    .在打开的makefile文件里依照以下更改:

    #local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror

    local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter



    原因非常easy 把警告当作error处理,所以此处要改动



第四个错误:

    make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1



    solutions:external/mesa3d/src/glsl/linker.cpp

    +#include <stddef.h>

    #include <cstdlib>

    #include <cstdio>





第五个错误:

    In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:

    external/oprofile/libpp/format_output.h:94:22: 错误: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]

    make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] 错误 1



    改动external/oprofile/libpp/format_output.h:94行

        mutable counts_t & counts;

    改为:

counts_t & counts;

第六个错误:

    target arm C: libc <= bionic/libc/bionic/pthread.c

    arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

    make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o] Error 1

    gcc -print-prog-name=cc1   

    运行命令:export PATH=path/to/cc1:$PATH

后面的错误及解决方法:參照http://www.cnblogs.com/xingfuzzhd/archive/2012/09/05/2672000.html



编译成功后:

root@sjc-pc:~# vim ~/.bashrc

在文件里适当位置加入

#java 程序开发/执行的一些环境变量

export ANDROID_PRODUCT_OUT=~/out/target/product/generic



ANDROID_PRODUCT_OUT_BIN=~/out/host/linux-x86/bin



export PATH=${PATH}:${ANDROID_PRODUCT_OUT_BIN}:${ANDROID_PRODUCT_OUT};

#以上为songjiachen加入20140303





root@sjc-pc:~# source ~/.bashrc

root@sjc-pc:~# cd ~/out/target/product/generic

root@sjc-pc:~/out/target/product/generic# emulator -system system.img -data userdata.img -ramdisk ramdisk.img

emulator: WARNING: system partition size adjusted to match image file (166 MB > 66 MB)

此时模拟器已经成功执行

Could not configure '/dev/hpet' to have a 1024Hz timer. This is not a fatal

error, but for better emulation accuracy type:

'echo 1024 > /proc/sys/dev/hpet/max-user-freq' as root.

root@sjc-pc:~/out/target/product/generic# emulator -system system.img -data userdata.img -ramdisk ramdisk.img -partition-size 1024

此时模拟器已经成功执行 加入 -partition-size 1024为使=warning消除

直接输入emulator也可

[odroid-pc] ubuntu12.04 64bit Android4.0.3 源码编译报错及解决的方法的更多相关文章

  1. Ubuntu12.04下载Android4.0.1源码全过程,附若干问题解决[转]

    学校里一直在做应用层开发,考虑到日后就业问题,这次决定研究源码和驱动,并进行编译.没想到就下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再下源码的人不要再走无谓的弯路了.事实 ...

  2. [2013.7.5新鲜出炉] Ubuntu12.04下载Android4.0.1源码全过程----------------折腾两天,终于下好,附若干问题解决

    本文转至 http://blog.csdn.net/yanzi1225627/article/details/9255457 下载源码这一步折腾了我整整两天,期间遇到很多问题,哎,记录于此,希望日后再 ...

  3. 英蓓特Mars board的android4.0.3源码编译过程

    英蓓特Mars board的android4.0.3源码编译过程 作者:StephenZhu(大桥++) 2013年8月22日 若要转载,请注明出处 一.编译环境搭建及要点: 1. 虚拟机软件virt ...

  4. ubuntu13.04下载android4.0.1源码过程

    最初我参考的是老罗的博客http://blog.csdn.net/luoshengyang/article/details/6559955 进行下载安装的,但弄着弄着就发现不太对劲了.这里记录下详细过 ...

  5. 转载: ubuntu13.04下载android4.0.1源码过程

    转自:http://blog.csdn.net/zhanglongit/article/details/9263009,中间有些不行的地方进行了些小修改. 最初我参考的是老罗的博客http://blo ...

  6. Ubuntu12.04 64bit版本下载Android源码完整教程

    首先去官网http://source.android.com/source/initializing.html可以看到完整的安装教程.不过一般情况下,按照这个教程是无法一步到位的,因为中途肯定会遇到很 ...

  7. Ubuntu12.04编译Android4.0.1源码全过程-----附wubi安装ubuntu编译android源码硬盘空间不够的问题解决

    昨晚在编译源码,make一段时间之后报错如下: # A fatal error has been detected by the Java Runtime Environment: # # SIGSE ...

  8. dotfuscator 在混淆.Net Framework 4.0以上版本的时候报错的解决方法

    dotfuscator 在混淆.Net Framework 4.0以上版本的时候报错的解决方法 在混淆的时候报错了,错误描述大致如下: Could not find a compatible vers ...

  9. spark2.1.0的源码编译

    本文介绍spark2.1.0的源码编译 1.编译环境: Jdk1.8或以上 Hadoop2.7.3 Scala2.10.4 必要条件: Maven 3.3.9或以上(重要) 点这里下载 http:// ...

随机推荐

  1. bzoj 2055: 80人环游世界 -- 上下界网络流

    2055: 80人环游世界 Time Limit: 10 Sec  Memory Limit: 64 MB Description     想必大家都看过成龙大哥的<80天环游世界>,里面 ...

  2. 9.3n+1问题

    时间限制: 1 s 空间限制: 32000 KB 题目等级 : 白银 Silver 题解 查看运行结果 题目描述 Description 3n+1问题是一个简单有趣而又没有解决的数学问题.这个问题是由 ...

  3. CodeM资格赛3

    题目描述 美团点评上有很多餐馆优惠券,用户可以在美团点评App上购买.每种优惠券有一个唯一的正整数编号.每个人可以拥有多张优惠券,但每种优惠券只能同时拥有至多一张.每种优惠券可以在使用之后继续购买. ...

  4. 关闭Spring Boot的Jsckson的FAIL_ON_EMPTY_BEANS

    说明:Spring Boot中默认使用了Jackson做JSON的解析. 解决方法: 1.通过注入Bean来实现 错误: org.springframework.http.converter.Http ...

  5. Delphi插件创建、调试与使用应用程序扩展

    Delphi插件创建.调试与使用应用程序扩展 翻译 : MiracleZ  有没有使用过Adobe Photoshop?如果用过,你就会对插件的概念比较熟悉.对外行人来说,插件仅仅是从外部提供给应用程 ...

  6. linux 升级系统内核linux-4.10版本

    http://blog.csdn.net/steven_liwen/article/details/68487241

  7. 狗日的rem

    rem这是个低调的css单位,近一两年开始崭露头角,有许多同学对rem的评价不一,有的在尝试使用,有的在使用过程中遇到坑就弃用了.但是我对rem综合评价是用来做web app它绝对是最合适的人选之一. ...

  8. vue2.0中引入UEditor的一些坑。。。。

    开发后台系统的时候,富文本编辑器肯定是必不可少的,然后呢~在天朝当然要属百度编辑器(UEditor)最成熟了,功能全面,文档齐全(相对),ui优美(...,对于程序员来说)等等许多方面(MMP,还不是 ...

  9. 【提醒】使用 iptables 时,特别注意 规则的顺序

    在 centos 上安装 redis 服务器,很快就搞定了,服务器上使用 redis-cl 测试都没有问题了. 但到宿主机上测试,怎么测试都不通过,关键是:关闭了 centos 的 Iptables ...

  10. JACOB的语法

    转自:http://www.bitscn.com/pdb/java/200904/161117.html 如果你想写一个JAVA代码,其中需要调用JACOB提供的功能,而你还是新手,也许篇文章会大大降 ...