android 4.3源码编译
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源码编译的更多相关文章
- Android 5.0源码编译问题
如果是自己通过repo和git直接从google官网上download的源码,请忽略这个问题,但是由于google在国内被限制登录,通过这一种方法不是每个人都能download下来源码,通常的做法就是 ...
- Android stdio Apktool源码编译
Android Apktool源码编译 标签(空格分隔): Android Apktool 源码编译 需求 习惯NetBeans调试smali需要用Apktool反编译apk,需要用-d的参数才能生成 ...
- Ubantu16.04进行Android 8.0源码编译
参考这篇博客 经过测试,8.0源码下载及编译之后,占用100多G的硬盘空间,尽量给ubantu系统多留一些硬盘空间,如果后续需要在编译好的源码上进行开发,需要预留更多的控件,为了防止后续出现文件权限问 ...
- Android 4.1源码编译找不到资源文件解决办法
我们在Android framework中修改资源文件时,在Android 4.0之前,都是直接在sourcecode/frameworks/base/core/res/res下面添加对应的资源文件, ...
- 【转】Android 4.3源码的下载和编译环境的安装及编译
原文网址:http://jingyan.baidu.com/article/c85b7a641200e0003bac95a3.html 告诉windows用户一个不好的消息,windows环境下没法 ...
- Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程
Ubuntu 14.04 LTS 下 android 2.3.5 源码编译过程 在新的Ubuntu 64位系统下去编译早期的安卓源码是会出现很多问题的,因为64位系统在安装完成后,很多32位的兼容 ...
- android源码编译过程
1.下载好android源码包. 2.装好vm,ubuntu(如果能在实体机装linux更好). 3.安装所需要的deb包 在终端执行如下命令: sudo apt-get install flex b ...
- android后台截屏实现(1)--源码编译
前段时间接到任务要实现后台截图并上传的功能,在网上查了好久,发现遇到这类问题的人还不少.经过一番对比后发现还是修改并编译源码中的screencap类然后通过JNI来调用这种方法比较可靠,而其他的在ja ...
- 有关android源码编译的几个问题
项目用到编译环境,与源码有些差异不能照搬,关键是连源码都没编译过,下面基本上是行网上照的各种自学成才的分享,病急乱投医了,都记在下面作为参照吧. 1.验证是否编译正确,在终端执行 emulator & ...
随机推荐
- PHP reset() 函数
定义和用法 reset()函数把数组的内部指针指向第一个元素,并返回这个元素的值.若失败,则返回 FALSE. reset()函数用来将数组指针设置回数组的开始位置.如果需要在一个脚本中多次查看或处理 ...
- jQuery 插件模板
1.为每一个DOM对象创建一个插件对象 模板定义: (function($) { $.pluginName = function(element, options) { var defaults = ...
- 【HDOJ】1756 Cupid's Arrow
图论,点在多边形内部的判定. /* 1756 */ #include <iostream> #include <string> #include <map> #in ...
- usaco4.12Fence Rails(迭代加深)
为了这题还去学了下迭代加深 回来还是不会写 只好参考各大神的代码及题解了 二分枚举最大可以切的块数 然后就是各种分析及优化 USACO题解里写了7个优化.. 问题分析 抽象一下就可以发现,算法的本质是 ...
- Hadoop中的各种排序
本篇博客是金子在学习hadoop过程中的笔记的整理,不论看别人写的怎么好,还是自己边学边做笔记最好了. 1:shuffle阶段的排序(部分排序) shuffle阶段的排序可以理解成两部分,一个是对sp ...
- Class org.apache.struts2.json.JSONWriter can not access a member of
异常形式: Class org.apache.struts2.json.JSONWriter can not access a member of * 或是 Class com.googlecode. ...
- BZOJ_1007_ [HNOI2008]_水平可见直线_(单调栈+凸包)
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1007 给出一些直线,沿着y轴从上往下看,能看到多少条直线. 分析 由于直线相交,会遮挡住一些直 ...
- servlet读取cookie问题
String sessionid = request.getSession().getId(); // 取得当前的session id ckSessionid = new Cookie("s ...
- python导入模块时的路径疑惑
有一个事儿,以前没注意,今天发现了,记录一下. 假设一个python文件a.py中,有一段代码,是打印当前路径的.当单独执行a.py文件的时候,打印的是a.py的位置. 但是当a.py文件被其他pyt ...
- 使--no-ri --no-rdoc成为gem安装的默认选项
在使用gem install命令的时候,希望加上--no-ri --no-rdoc选项,但是不希望每一次都手动加上这个选项. 其实可以通过编辑配置文件,改变gem install的默认选项. 在win ...