How to compile Andriod in Ubuntu 64 bit system

Step 0:

Install below package, there are all needed in later:
apt-get install zlib1g-dev
apt-get install flex
apt-get install libncurses-dev
apt-get install libx11-dev
apt-get install gperf

Step 1:

When I tried to the Andriod system on my Ubuntu 10-0-04 LTS system.Just meet a problem which stop me for a long time, the error message as below:

/bin/bash: prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc: No such file or directory


But in fact the arm-eabi-gcc do existed in the directory, and even I put the  arm-eabi-gcc under GDB to debug it, it also will report "No such file or directory"

After several hours of google, finally I found a link as below:
http://blog.jayway.com/2009/10/2 ... rking-on-ubuntu-64/


Although in the above article, it doesn't mentioned how to solved my problem, but I think, maybe what we meet problem is the same root cause, hence after install the tool "getlib" and run it, this problem disappeared.


conclusion:

Ubuntut 64 bits need download some 32 bit development lib and to enable running the andriod precompile compiled tools which is compiled under 32bit system.

Step2:   Jave 1.5 is needed
Cause I want compile android 2.2 froya. It needs the jave 1.5. but the default 10.04 source is java 1.6.
The solution as below:
http://zebardast.ir/en/installin ... ntu-9-10-and-10-04/
1- Open /etc/apt/sources.list with a text editor like gedit:
sudo gedit /etc/apt/sources.list
2- Add the following lines to the end of the file then save it and close:
## For sun-java5-jdk deb http://ir.archive.ubuntu.com/ubuntu jaunty-updates main multiverse
3- Update the packages lists and install sun-java5-jdk:
sudo aptitude update sudo aptitude install sun-java5-jdk

Step3:
After solved above problem, the system start check the compile environment, and report another error:
  ost C: acp <= build/tools/acp/acp.c
In file included from /usr/include/features.h:378,
                 from /usr/include/stdlib.h:25,
                 from build/tools/acp/acp.c:11:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1

solution:
apt-get install libc6-dev-i386
conclusion:
The compiler system based on 32bit, it need the 32bits libc.

Step 4:
Error:
host C: acp <= build/tools/acp/acp.c
host C++: libhost <= build/libs/host/pseudolocalize.cpp
/bin/bash: g++: command not found
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 127


Solution:
apt-get install build-essential

Conclusion:
Need the C++ compile and Lib

Step 5:
Error:
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] Error 1


Solution:
apt-get install g++-multilib


Conclusion:
Miss a C++ Lib

Step 6:
Error:
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1


Solution:
apt-get install  lib32z1-dev

Conclusion:
Missing compress lib.

Step 7:
Error:

/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status


Solution:
apt-get install lib32ncurses5-dev

Conclusion:

The 64 bit lib has been installed, but the 32bits lib still needed


step 8:

apt-get install lib32readline-dev


step9:

sudo dpkg-reconfigure dash


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值