jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ source build/envsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch
full-eng full_maguro-userdebug full_panda-eng full_tuna-userdebug full_x86-eng vbox_x86-eng
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch
full-eng full_maguro-userdebug full_panda-eng full_tuna-userdebug full_x86-eng vbox_x86-eng
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ lunch full-eng ============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================ jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ make -
- --environment-overrides -k --no-print-directory -S
--always-make -f --keep-going -o --silent
--assume-new --file -l --old-file --stop
--assume-old -h --load-average -p -t
-b --help -m --print-data-base --touch
-B -i --makefile --print-directory -v
-C -I --max-load -q --version
-d --ignore-errors -n --question -w
--debug --include-dir --new-file --quiet -W
--directory -j --no-builtin-rules -r --warn-undefined-variables
--dry-run --jobs --no-builtin-variables -R --what-if
-e --just-print --no-keep-goind --recon
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ cd /usr/bin/
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -al gcc*
lrwxrwxrwx 1 root root 7 8月 5 12:48 gcc -> gcc-4.6
-rwxr-xr-x 1 root root 306200 4月 16 2012 gcc-4.6
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -l g++*
lrwxrwxrwx 1 root root 7 3月 14 2012 g++ -> g++-4.6
-rwxr-xr-x 1 root root 310296 4月 16 2012 g++-4.6
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install gcc-4.4
[sudo] password for jianguoliao:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-pae
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
cpp-4.4 gcc-4.4-base
Suggested packages:
gcc-4.4-locales gcc-4.4-multilib libmudflap0-4.4-dev gcc-4.4-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7
The following NEW packages will be installed:
cpp-4.4 gcc-4.4 gcc-4.4-base
0 upgraded, 3 newly installed, 0 to remove and 21 not upgraded.
Need to get 6,697 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main gcc-4.4-base i386 4.4.7-1ubuntu2 [12.0 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main cpp-4.4 i386 4.4.7-1ubuntu2 [3,606 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu/ precise/main gcc-4.4 i386 4.4.7-1ubuntu2 [3,079 kB]
Fetched 6,697 kB in 24s (276 kB/s)
Selecting previously unselected package gcc-4.4-base.
(Reading database ... 180229 files and directories currently installed.)
Unpacking gcc-4.4-base (from .../gcc-4.4-base_4.4.7-1ubuntu2_i386.deb) ...
Selecting previously unselected package cpp-4.4.
Unpacking cpp-4.4 (from .../cpp-4.4_4.4.7-1ubuntu2_i386.deb) ...
Selecting previously unselected package gcc-4.4.
Unpacking gcc-4.4 (from .../gcc-4.4_4.4.7-1ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up gcc-4.4-base (4.4.7-1ubuntu2) ...
Setting up cpp-4.4 (4.4.7-1ubuntu2) ...
Setting up gcc-4.4 (4.4.7-1ubuntu2) ...
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install g++-
g++-4.4 g++-4.5-multilib g++-arm-linux-gnueabi
g++-4.4-arm-linux-gnueabi g++-4.6 g++-arm-linux-gnueabihf
g++-4.4-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabi g++-mingw-w64
g++-4.4-multilib g++-4.6-arm-linux-gnueabihf g++-mingw-w64-i686
g++-4.5 g++-4.6-multilib g++-mingw-w64-x86-64
g++-4.5-arm-linux-gnueabi g++-4.6-multilib-arm-linux-gnueabi g++-multilib
g++-4.5-arm-linux-gnueabihf g++-4.6-multilib-arm-linux-gnueabihf
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo apt-get install g++-4.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-pae
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libstdc++6-4.4-dev
Suggested packages:
g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg libstdc++6-4.4-doc
The following NEW packages will be installed:
g++-4.4 libstdc++6-4.4-dev
0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
Need to get 6,274 kB of archives.
After this operation, 19.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main libstdc++6-4.4-dev i386 4.4.7-1ubuntu2 [1,494 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main g++-4.4 i386 4.4.7-1ubuntu2 [4,780 kB]
Fetched 6,274 kB in 23s (271 kB/s)
Selecting previously unselected package libstdc++6-4.4-dev.
(Reading database ... 180316 files and directories currently installed.)
Unpacking libstdc++6-4.4-dev (from .../libstdc++6-4.4-dev_4.4.7-1ubuntu2_i386.deb) ...
Selecting previously unselected package g++-4.4.
Unpacking g++-4.4 (from .../g++-4.4_4.4.7-1ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up g++-4.4 (4.4.7-1ubuntu2) ...
Setting up libstdc++6-4.4-dev (4.4.7-1ubuntu2) ...
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$  ls -l gcc*
lrwxrwxrwx 1 root root 7 8月 5 12:48 gcc -> gcc-4.6
-rwxr-xr-x 1 root root 224544 4月 16 2012 gcc-4.4
-rwxr-xr-x 1 root root 306200 4月 16 2012 gcc-4.6
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo mv gcc gcc.bak
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo ln -s gcc-4.4 gcc
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ ls -l g++*
lrwxrwxrwx 1 root root 7 3月 14 2012 g++ -> g++-4.6
-rwxr-xr-x 1 root root 228640 4月 16 2012 g++-4.4
-rwxr-xr-x 1 root root 310296 4月 16 2012 g++-4.6
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo mv g++ g++.bak
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ sudo ln -s g++-4.4 g++
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ g++ --version
g++ (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$ gcc --version
gcc (Ubuntu/Linaro 4.4.7-1ubuntu2) 4.4.7
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:/usr/bin$

为什么要更改位低版本的g++和gcc因为android编译环境需要,不然会在编译过程中出现如下错误:

<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$ make
Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$
jianguoliao@jianguoliao-Lenovo-IdeaPad-Y470:~/WORKING_DIRECTORY$

在次过程中还会遇到如下错误:

ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-ar only run on 64-bit linux
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a] Error 1

android 4.3源码编译的更多相关文章

  1. Android 5.0源码编译问题

    如果是自己通过repo和git直接从google官网上download的源码,请忽略这个问题,但是由于google在国内被限制登录,通过这一种方法不是每个人都能download下来源码,通常的做法就是 ...

  2. Android stdio Apktool源码编译

    Android Apktool源码编译 标签(空格分隔): Android Apktool 源码编译 需求 习惯NetBeans调试smali需要用Apktool反编译apk,需要用-d的参数才能生成 ...

  3. Ubantu16.04进行Android 8.0源码编译

    参考这篇博客 经过测试,8.0源码下载及编译之后,占用100多G的硬盘空间,尽量给ubantu系统多留一些硬盘空间,如果后续需要在编译好的源码上进行开发,需要预留更多的控件,为了防止后续出现文件权限问 ...

  4. Android 4.1源码编译找不到资源文件解决办法

    我们在Android framework中修改资源文件时,在Android 4.0之前,都是直接在sourcecode/frameworks/base/core/res/res下面添加对应的资源文件, ...

  5. 【转】Android 4.3源码的下载和编译环境的安装及编译

    原文网址:http://jingyan.baidu.com/article/c85b7a641200e0003bac95a3.html  告诉windows用户一个不好的消息,windows环境下没法 ...

  6. Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程

    Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程   在新的Ubuntu 64位系统下去编译早期的安卓源码是会出现很多问题的,因为64位系统在安装完成后,很多32位的兼容 ...

  7. android源码编译过程

    1.下载好android源码包. 2.装好vm,ubuntu(如果能在实体机装linux更好). 3.安装所需要的deb包 在终端执行如下命令: sudo apt-get install flex b ...

  8. android后台截屏实现(1)--源码编译

    前段时间接到任务要实现后台截图并上传的功能,在网上查了好久,发现遇到这类问题的人还不少.经过一番对比后发现还是修改并编译源码中的screencap类然后通过JNI来调用这种方法比较可靠,而其他的在ja ...

  9. 有关android源码编译的几个问题

    项目用到编译环境,与源码有些差异不能照搬,关键是连源码都没编译过,下面基本上是行网上照的各种自学成才的分享,病急乱投医了,都记在下面作为参照吧. 1.验证是否编译正确,在终端执行 emulator & ...

随机推荐

  1. 1088-Gnome Sequencing

    描述 In the book All Creatures of Mythology, gnomes are kind, bearded creatures, while goblins tend to ...

  2. ListView 长按拖动会变黑的解决方案

    在ListView的xml文件中添加这个属性: android:cacheColorHint="#00000000"

  3. Web.xml配置详解之context-param(转)

    本文转自:http://blog.csdn.net/liaoxiaohua1981/article/details/6759206 格式定义: <context-param> <pa ...

  4. HLS协议实现

    http://blog.csdn.net/wutong_login/article/details/9673255

  5. javascript小游戏--生命游戏

    昨天参加Code Retreat的活动,"Code Retreat是一个一天的集中练习的活动,专注于软件开发和设计的基础". 要了解更多信息可前往 CodeRetreat官网 通过 ...

  6. Android 自定义title样式

    requestWindowFeature(featrueId),它的功能是启用窗体的扩展特性.参数是Window类中定义的常量.一.枚举常量1.DEFAULT_FEATURES:系统默认状态,一般不需 ...

  7. 使用Sqoop从mysql向hdfs或者hive导入数据时出现的一些错误

    1.原表没有设置主键,出现错误提示: ERROR tool.ImportTool: Error during import: No primary key could be found for tab ...

  8. Yii CDbCriteria

    Yii的Active Recorder包装了很多. 特别是把SQL中 把where,order,limit,IN/not IN,like等常用短句都包含进CDbCriteria这个类中去,这样整个代码 ...

  9. c#使用XSLT将xml文档转换为html文档

    需要引用下面的命名空间: using System.Xml; using System.Xml.Xsl; 方法实现: public static string ConvertXML(XmlDocume ...

  10. 【转】Eclipse提示No java virtual machine(转载)

    原文网址:http://blog.sina.com.cn/s/blog_6cd73dfb01013zkg.html 第一次运行Eclipse,经常会提示下面的问题:... No java virtua ...