====== Compiling Android Ics A10 On Ubuntu 12.04 ====== //__About this Article__// * **Author**: benn --- benn@cubietech.com --- 2013/10/14 15:59 * **Copyrights**: [[http://creativecommons.org/licenses/by-sa/3.0/|CC Attribution-Share Alike 3.0 Unported]] * **Contributors**: [[http://cubieboard.org/|Cubieboard Community]] : ... ===== Abstract ===== Allwinner's FAE suggests us to use Ubuntu 10.04(x86_64) host enviroment when compiling Android ICS(A10). If you want to use Ubuntu 12.04 or later. ===== Setup ===== ==== Get build essentials ==== sudo apt-get install uboot-mkimage sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev \ lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev g++-multilib \ mingw32 tofrodos python-markdown libxml2-utils sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so ==== Install Java JDK 1.6 ==== sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java6-installer ===== Troubleshooting ===== * 1 Error: :0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] :0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1 Fix: build/core/combo/HOST_linux-x86.mk : 56 #HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 *2 Error: In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0: external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive] make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1 Fix: external/oprofile/libpp/format_output.h : 94 #mutable counts_t & counts; counts_t & counts; *3 Error: frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable] Fix ( see [1], [2] ) : frameworks/compile/slang/Android.mk : 23 #local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter *4 Error: external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: ‘ptrdiff_t’ does not name a type Fix: external/gtest/include/gtest/internal/gtest-param-util.h add: #include *5 Error: external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock' collect2: ld returned 1 exit status Fix: external/llvm/llvm-host-build.mk add: LOCAL_LDLIBS := -lpthread -ldl *6 Error 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 ‘,’ token external/mesa3d/src/glsl/linker.cpp:1394:50: error: ‘varyings’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1394:58: error: ‘offsetof’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1395:48: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1412:47: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1412:48: error: ‘position’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1414:47: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1414:48: error: ‘pointSize’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1424:47: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1424:48: error: ‘position’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1428:47: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1428:48: error: ‘frontFacingPointCoord’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1431:47: error: expected primary-expression before ‘,’ token external/mesa3d/src/glsl/linker.cpp:1431:48: error: ‘frontFacingPointCoord’ was not declared in this scope external/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 ‘,’ token external/mesa3d/src/glsl/linker.cpp:1734:50: error: ‘fragColor’ was not declared in this scope external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1 Fix: external/mesa3d/src/glsl/linker.cpp add: #include {{tag>Cubieboard Cubietruck}}