Android Training Course (85) upgraded to version 4.0

Source: Internet
Author: User
ICS has finally been released and upgraded from 2.3.7 to 4.0.3. The upgrade command is as follows:
$ mkdir ~/bin$ PATH=~/bin:$PATH

Create the bin directory to store the downloaded software repo.

  • $ Mkdir working directory $ CD working directory

Create a working directory to save the download source code.

$ repo init -u https://android.googlesource.com/platform/manifest

This line gets the code in the main branch. If your system is Ubuntu 11.10, you need to use the main distribution code for compilation. If it is a previous Android version, it will not be compiled.

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

This line uses the branch method. For example, you can add a branch to download the code of a specific version.

$ repo sync

This line is actually downloaded from the code.

The download code is between 5 GB and 6 GB, so it takes a long time. I downloaded it for one night. To speed up, you can also use the repo sync-j10 parameter.

After compilation, the occupied space is about 2 GB.

Use the following command line for compilation:

rm -rf out/
source build/envsetup.sh
lunch full-eng
make
 

To speed up compilation, you can also use the make-J8 method. In this way, 8 threads are used for compilation, but sometimes errors may occur because the threads are not synchronized, you can enter it several more times.

During compilation, a bug is found as follows:

external/mesa3d/src/glsl/linker.cpp:623:33: warning:   by ‘virtual ir_visitor_status remap_variables(ir_instruction*, gl_shader*, hash_table*)::remap_visitor::visit(ir_dereference_variable*)’ [-Woverloaded-virtual]external/mesa3d/src/glsl/linker.cpp: In function ‘void assign_varying_locations(gl_shader_program*, gl_shader*, gl_shader*)’:external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1394:50: error: ‘varyings’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1394:58: error: ‘offsetof’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1395:48: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1412:47: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1412:48: error: ‘position’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1414:47: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1414:48: error: ‘pointSize’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1424:47: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1424:48: error: ‘position’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1428:47: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1428:48: error: ‘frontFacingPointCoord’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1431:47: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1431:48: error: ‘frontFacingPointCoord’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp: In function ‘void link_shaders(const gl_context*, gl_shader_program*)’:external/mesa3d/src/glsl/linker.cpp:1734:49: error: expected primary-expression before ‘,’ tokenexternal/mesa3d/src/glsl/linker.cpp:1734:50: error: ‘fragColor’ was not declared in this scopeexternal/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scopemake: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1

To solve this problem, modify the file as follows:

Add "# include <stddef. h>" to the header of the linker. cpp file.
 
This completes compilation.

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.