Problem solving during android2.3 source code compilation under ubuntu11.0.4

Source: Internet
Author: User
Tags gnupg

How to compile the android2.3 source code in ubuntu11.0.4

Modifying the Android system source code in recent days has encountered many crashing problems. Write it down based on your memory.

JDK 2.3 and Linux use 64-bit, so many tools have to be installed again.

The following are the problems encountered during the first compilation:

1. Insufficient Permissions
/Bin/Bash: prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ARM-Eabi-GCC: insufficient Permissions
/Bin/Bash: prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ARM-Eabi-GCC: insufficient Permissions
/Bin/Bash: build/CORE/find-jdk-tools-jar.sh: insufficient Permissions
/Bin/Bash: build/tools/findleaves. py: insufficient Permissions
/Bin/Bash: build/tools/findleaves. py: insufficient Permissions
Checking API: checkapi-last
/Bin/Bash: Out/host/linux-x86/bin/apicheck: insufficient Permissions

Solution:
Chmod A + x prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/ARM-Eabi-gcc
Add executable permissions to all files without Permissions

2. Make: *** [out/host/linux-x86/obj/executables/acp_intermediates/ACP. O] Error 1
Compile in 32 bits and make it directly.
Compiling in 64-Bit mode may cause some errors. You need to install some additional packages:
A, there is no GNU/stubs-32.h file:
/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:
Make sure your system is x86_64 GNU/Linux
# Uname-
Linux mm-desktop 2.6.27-9-generic #1 SMP Thu Nov 20 22:15:32 UTC 2008 x86_64 GNU/Linux
Install libc6-dev-i386
Sudo apt-Get install libc6-dev-i386

B. -Lstdc ++ not found
/Usr/bin/ld: cannot find-lstdc ++
Solution:
Install g ++-multilib, lib32z1-dev and lib32ncurses5-dev
Apt-Get install g ++-4.2-multilib lib32z1-dev lib32ncurses5-dev


3. Make: *** [out/host/linux-x86/obj/executables/acp_intermediates/ACP] Error 1
Install g ++-4.5-multilib
$ Sudo aptitude install Git-core GnuPG flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Sudo apt-Get install Git-core GnuPG flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g ++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev Java-common unixodbc

4. Arm-Eabi-GCC: Error trying to Exec 'cc1': execvp: no such file or directory

My colleagues always report the following errors when compiling the kernel ~~ Finally, we found that the permission issue of the Cross-compilation tool was solved, and chmod-r 777 * was enough.
Arm-Eabi-GCC: Error trying to Exec 'cc1': execvp: no such file or directory
Summary:
1. Check that the cross-compile directory is in path.
2. confirm the existence
3. Confirm the permissions of the Cross-compilation tool.

4. reinstall g ++ and modify the default g ++ to connect to your installed version.

Excerpt:

Error Handling
When ubuntu10.10 (64-bit) is used to compile the android2.3 source code, various problems are encountered. Either missing or missing. These problems and solutions are listed for your reference.

Error:
/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:
Sudo apt-Get install libc6-dev-i386

Error:
Make: *** [out/host/linux-x86/obj/executables/acp_intermediates/ACP] Error 1

Solution:
Sudo apt-Get install g ++-multilib

Error:
External/clearsilver/cgi. C: 22: Fatal error: zlib. h: no such file or directory
Compilation terminated.
Make: *** [out/host/linux-x86/obj/shared_libraries/libneo_cgi_intermediates/cgi. O] Error 1

Solution:
Sudo apt-Get install zlib1g-dev

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:
Sudo apt-Get install lib32z1-dev

Error:
Bison-D-O out/host/linux-x86/obj/executables/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
/Bin/Bash: bison: Command not found
Make: *** [out/host/linux-x86/obj/executables/aidl_intermediates/aidl_language_y.cpp] Error 127

Solution:
Sudo apt-Get install bison

Error:
LEX: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/Bin/Bash: Flex: Command not found
Make: *** [out/host/linux-x86/obj/executables/aidl_intermediates/aidl_language_l.cpp] Error 127

Solution:
Sudo apt-Get install flex

Error:
/Usr/bin/ld: cannot find-lncurses
Collect2: LD returned 1 exit status
Make: *** [out/host/linux-x86/obj/executables/adb_intermediates/ADB] Error 1

Solution:
Sudo apt-Get install lib32ncurses5-dev

Error:
Prebuilt/linux-x86/SDL/include/SDL/sdl_syswm.h: 55: Fatal error: X11/xlib. h: no such file or directory
Compilation terminated.
Make: *** [out/host/linux-x86/obj/executables/emulator_intermediates/Android/main-common.o] Error 1

Solution:
Sudo apt-Get install libx11-dev

Error:
SH: gperf: not found
Calling gperf failed: 32512 at./makeprop. pl line 96.
Make: *** [out/target/product/generic/obj/static_libraries/libwebcore_intermediates/WebCore/CSS/csspropertynames. H] Error 25
Make: *** deleting file 'out/target/product/generic/obj/static_libraries/libwebcore_intermediates/WebCore/CSS/csspropertynames. H'

Solution:
Sudo apt-Get install gperf

Error:
Build/CORE/Java. mk: 9: *** bin: Target Java module does not define any source or resource files. Stop.

Solution:
Delete the bin folder under the root directory of the source code. This folder is created when eclipse is imported.

Cannot find-LXXX
All errors similar to this encountered during compilation are missing libraries such as libxxx. The solution is:
First, use the command: APT-cache search XXX for database search
Then, find the libraries such as libxxx-Dev for installation. The command is sudo apt-Get install libxxx-Dev.
Finally, execute make.

 

Address: http://hi.baidu.com/panda_heroes/blog/item/5075c9ec6acbaf20b90e2d31.html

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.