android 4.0編譯錯誤

來源:互聯網
上載者:User

1、
************************************************************
You are attempting to build with the incorrect version
of java.
 
Your version is: java version "1.6.0_24".
The correct version is: Java SE 1.6.
 
Please follow the machine setup instructions at
    http://source.android.com/source/download.html
************************************************************
解決方案:
安裝java 1.6
在envsetup.sh
最後加入設定環境變數export JAVA_HOME=/usr/local/arm/jdk1.6.0_31

2.
錯誤2
(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 ‘,’ 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

解決方案:
把 "#include <stddef.h>" 添加到 linker.cpp 檔案頭部。

3.
external/oprofile/libpp/format_output.h:94:22: error: reference a€?countsa€? cannot be declared a€?mutablea€? [-fpermissive]
In file included from external/oprofile/libpp/arrange_profiles.cpp:24:0:
external/oprofile/libpp/format_output.h:94:22: error: reference a€?countsa€? cannot be declared a€?mutablea€? [-fpermissive]
In file included from external/oprofile/libpp/format_output.cpp:26:0:
external/oprofile/libpp/format_output.h:94:22: error: reference a€?countsa€? cannot be declared a€?mutablea€? [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/op_header.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from external/oprofile/libpp/xml_utils.h:15:0,
                 from external/oprofile/libpp/xml_utils.cpp:14:
external/oprofile/libpp/format_output.h:94:22: error: reference a€?countsa€? cannot be declared a€?mutablea€? [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/xml_utils.o] Error 1
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/arrange_profiles.o] Error 1
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/liboprofile_pp_intermediates/format_output.o] Error 1
解決方案:
需要修改external/oprofile/libpp/format_output.h:94行
mutable counts_t & counts為
counts_t & counts

 4.
 frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable a€?ParamNamea€? set but not used [-Werror=unused-but-set-variable
 解決方案:
 
 Fix/Workaround:
frameworks/compile/slang/Android.mk
-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
5.
external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: a€?ptrdiff_ta€? does not name a typ
解決方案:
$vi external/gtest/src/../include/gtest/internal/gtest-param-util.h
+#include <cstddef>


摘自 堅持到底的Embedded Zone

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.