在Ubuntu14.04上编译Android4.0.1出现的几个问题
一. 工具
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
二.JDK
oracle 官网下载JDk6_29(bin文件,注意安装方法,环境变量,update-alternative等) http://www.oracle.com/technetwork/java/javase/archive-139210.html
三.gcc/g++的版本
默认的gcc g++版本为4.6.3, 将其改为4.4.步骤:
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
cd /usr/bin
ls -l gcc*
sudo mv gcc gcc.bak
sudo ln -s gcc-4.4 gcc
ls -l g++*
sudo mv g++ g++.bak
sudo ln -s g++-4.4 g++
gcc -v
g++ -v
四.源的问题
另外。init的时候用这个:
repo init -u git://git.omapzoom.org/platform/manifest -b android-4.0.1_r1
- Import includes file: out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/import_includes
- target Generated: libwebcore <= external/webkit/Source/WebCore/css/tokenizer.flex
- <span style="rgb(255, 255, 51);">Can't locate Switch.pm in @INC (you may need to install the Switch module)</span> (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- BEGIN failed--compilation aborted at external/webkit/Source/WebCore/make-hash-tools.pl line 23.
- make: *** [out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp] Error 2
- make: *** Waiting for unfinished jobs....
- make: *** [out/target/product/mx3/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/platform/ColorData.cpp] Error 2
- target Generated: libwebcore <= external/webkit/Source/WebCore/html/parser/HTMLEntityNames.in
解决方法是安装perl的switch库:
- sudo apt-get install libswitch-perl
2.dalvik/vm/native/dalvik_system_Zygote.cpp:216:43: error: ‘setrlimit’ was not declared in this scope
err = setrlimit(contents[0], &rlim);
^
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
dalvik/vm/native/java_lang_Float.cpp:1:0: note: this is the location of the previous definition
/*
^
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....
解决办法
添加头文件#include <sys/resource.h>到以下文件
dalvik/vm/native/dalvik_system_Zygote.cpp
3.host Executable: emulator_renderer (out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer)
/usr/bin/ld:
out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/main.o:
undefined reference to symbol 'XInitThreads'
//usr/lib/i386-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
make: *** Waiting for unfinished jobs....
解决办法:
修改development/tools/emulator/opengl/host/renderer/Android.mk文件
root@ubuntu:/home/dzt/android/WORKING_DIRECTORY# ls
abi cts docs frameworks Makefile prebuilt
bionic dalvik download.sh hardware ndk sdk
bootable development download.sh~ hs_err_pid6190.log out system
build device external libcore packages v8.log
root@ubuntu:/home/dzt/android/WORKING_DIRECTORY# gedit development/tools/emulator/opengl/host/renderer/Android.mk
添加一行:LOCAL_LDLIBS += -lX11 注意最好是复制过去,右边的容易写错
在Ubuntu14.04上编译Android4.0.1出现的几个问题的更多相关文章
- 【转】Linux(ubuntu14.04)上编译Android4.4源码的环境搭建及编译全过程
原文网址:http://jileniao.net/linux-android-building.html sublime text让我伤心.本来很信任sublime text的自动保存功能,之前使用一 ...
- 在ubuntu14.04上编译android4.2.2系统
原创作品,转载请注明出处,严禁非法转载 copyright:weishusheng 2015.8.1 时下android系统非常流行,下面就来说一下,下载编译一个andro ...
- 在Ubuntu Server14.04上编译Android6.0源码
此前编译过Android4.4的源码,但是现在Android都到了7.0的版本,不禁让我感叹Google的步伐真心难跟上,趁这周周末时间比较充裕,于是在过去的24小时里,毅然花了9个小时编译了一把An ...
- ubuntu14.04上编译安装python3.7.3
首先先去python官网www.python.org下载python3.7.3的官方压缩包Python-3.7.3.tgz 一.先安装需要的包zlib1g,libffi apt-get update ...
- Ubuntu14.04 Chromium 编译
1.下载depot_tools: 首先安装 git-core: sudo apt-get install git-core 执行命令: git clone https://chromium.googl ...
- ubuntu14.04下编译安装ambari-2.4.2.0
ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...
- [译]How to Install Node.js on Ubuntu 14.04 如何在ubuntu14.04上安装node.js
原文链接为 http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/ 由作者Jacob Nicholson 发表于October ...
- 【转】基于Ubuntu 14.04 LTS编译Android4.4.2源代码
原文网址:http://blog.csdn.net/gobitan/article/details/24367439 基于Ubuntu 14.04 LTS编译Android4.4.2源代码 ...
- Ubuntu14.04+eclipse下cocos2d-x3.0正式版环境的搭建
环境: ubuntu14.04 adt-bundle-linux-x86_64 android-ndk-r9d-linux-x86_64 cocos2d-x-3.0正式版 apache-ant 1.9 ...
随机推荐
- django rest_framework入门
1.rest_framework的作用 1)可以对orm和非orm资源序列化 2)支持restful风格编程(POST,PUT,PATCH) 3)使用类视图编写API的view,而不是函数视图,类视图 ...
- linux命令(36):vimdiff文件对比
启动方法 首先保证系统中的diff命令是可用的.Vim的diff模式是依赖于diff命令的.Vimdiff的基本用法就是: # vimdiff FILE_LEFT FILE_RIGHT 或者 # vi ...
- 【delphi】delphi操作sqlite3
SQLite SQLite是一个老牌的轻量级别的本地文件数据库,完全免费且开源,不需要安装,无须任何配置,当然,这样管理功能就不是很强大了,但是它的主要应用也是在本地数据库,可以说是最简单好用的嵌入式 ...
- 【Acm】八皇后问题
八皇后问题,是一个古老而著名的问题,是回溯算法的典型例题. 其解决办法和我以前发过的[算法之美—Fire Net:www.cnblogs.com/lcw/p/3159414.html]类似 题目:在8 ...
- User-Defined-Literal自定义字面量
c++支持多种内置类型的字面量,比如: 123u // unsigned int 1.0 // double 1.6f // float 'a' // char 4ULL // unsigned lo ...
- TNS-12518,TNS-12536,TNS-00506,Linux Error: 11: Resource temporarily unavailable
TNS-12518: TNS:listener could not hand off client connection TNS-12536: TNS:operation would block T ...
- C#中遍历Hashtable的4种方法
static void Main(string[] args) { Hashtable ht=new Hashtable(); ht.Add("); ht.Add("); ht.A ...
- WPF 异步执行
private void Operate_OnClick(object sender, RoutedEventArgs e) { AsyncFindBox(); RadWindow.Alert(&qu ...
- Eigen教程(2)
整理下Eigen库的教程,参考:http://eigen.tuxfamily.org/dox/index.html Matrix类 在Eigen,所有的矩阵和向量都是Matrix模板类的对象,Vect ...
- How Not to Crash #6: Properties and Accessors(属性,存储器方法使问题)
How Not to Crash #6: Properties and Accessorshtml, body {overflow-x: initial !important;}html { font ...