Android 4.0.3 compilation Summary

Source: Internet
Author: User

I wanted to go to Xidan for Christmas. I still stayed in the dormitory to compile the 4.0 source code. Currently, the hardware LINUX partition is 80g + 4G swap, memory is 4g, and I5 is 2430.

The environment configuration is available here. The official description is.

I have written all the compilation problems.

First error encountered

Make: *** [out/host/linux-x86/obj/executables/obbtool_intermediates/Main. O] Error 1

The compilation error here is caused by the use of gcc4.6.1 in Ubuntu 11.10.

Solution:

Modify the/build/CORE/Combo/HOST_linux-x86.mk file in the source code directory:

Run the following statement:

Host_global_cflags + =-d_fortify_source = 0

Change

Host_global_cflags + =-u_fortify_source-d_fortify_source = 0

It will not end like this. Next you will find that you must change GCC to 4.4.

 


The second error is reported.
Make: *** [out/host/linux-x86/obj/executables/llvm-rs-cc_intermediates/slang_rs_export_foreach

Open the following MAKEFILE file in the project root directory:
Source code directory frameworks/compile/slang/Android. mk

In the open MAKEFILE file, follow the following changes:
# Local_cflags_for_slang: =-wno-sign-promo-wall-wno-unused-parameter-werror

Local_cflags_for_slang: =-wno-sign-promo-wall-wno-unused-Parameter

The reason is that the warning is treated as an error.

========================================================== ======

Continue compilation. The error is forgotten and no record is recorded. Modify CPP as follows. For details, see groups. The error should have a linker or something. Just read the code prompt.

Http://groups.google.com/group/android-building/browse_thread/thread/52b96e5407514e45/f384d6df98f6f76b? Lnk = raot

# Include <stddef. h>
To external/mesa3d/src/glsl/linker. cpp

========================================================== =====

Continue Compilation

Make: *** [out/host/linux-x86/obj/executables/opannotate_intermediates/opannotate] Error 1

Solution: have_libbfd: = false in external/oprofile/Common. MK ifeq ($ (host_ OS)-$ (host_arch), linux-x86) # onelong have_libbfd: = true to: have_libbfd: = false

==========================================
Finally, you may find that the-lstdc ++ tragedy is not found. This is in G ++ mutillib

Lib64stdc ++ 6-4.4-dbg gcc-4.6-doc libstdc ++ 6-4.6-dbg lib64stdc ++ 6-4.6-dbg

Lib64mudflap0 libstdc ++ 6-4.6-doc

G ++-4.4-multilib g ++-4.6g ++-4.6-multilib g ++-multilib gcc-4.4-multilib

Gcc-4.6-multilib gcc-multilib lib64gcclib64gomp1 lib64quadmath0

Lib64stdc ++ 6 libc6-amd64 libc6-dev-amd64 libstdc ++ 6-4.6-dev

But just change GCC g ++ to 4.4. Otherwise, you have to change the code sooner or later. The key is to find the correct place and handle various dependent packages.

Okay, now we see the result. The compilation is complete.

Installed file list: Out/target/product/generic/installed-files.txt
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
Thinkinbunny @ thinkinbunny-360buy :~ /Desktop/droid4.03/droid $

Related Article

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.