How to compile andriod in Ubuntu 64 bit System

Source: Internet
Author: User

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:

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

Step 2: 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

Step 3:
After solved above problem, the system start check the compile environment, and report another error:
Ost C: ACP <= build/tools/ACP. c
In file encoded ded from/usr/include/features. h: 378,
From/usr/include/stdlib. h: 25,
From build/tools/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 32 bits libc.

Step 4:
Error:
Host C: ACP <= build/tools/ACP. c
Host C ++: libhost <= build/libs/host/pseudo dolocalize. cpp
/Bin/Bash: G ++: Command not found
Make: *** [out/host/linux-x86/obj/static_libraries/libhost_intermediates/pseudo localize. 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 32 bits lib still needed

Step 8:

Apt-Get install lib32readline-dev

Step 9:

Sudo dpkg-reconfigure dash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.