issues when building android 2.3 dalvikvm on ubuntu 12.04 32bit

来源:互联网 发布:网络交往新空间 编辑:程序博客网 时间:2024/05/16 23:48
http://git.linaro.org/gitweb?p=android/platform/frameworks/base.git;a=commitdiff;h=c4fbbe06a53de3951c258978ffce1b1f185f8828
http://www.oschina.net/code/explore/android-4.0.1/libs/utils/RefBase.cpp
  frameworks/base/libs/utils/RefBase.cpp: In member function
    ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
  frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing
    ‘const android::RefBase::weakref_impl’ as ‘this’ argument of
    ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’
    discards qualifiers [-fpermissive]


trackMe is not a const function, so don't use const in the static_cast
to a weakref_impl pointer.


-    static_cast<const weakref_impl*>(this)->trackMe(enable, retain);
+    static_cast<weakref_impl*>(this)->trackMe(enable, retain);




host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: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 
https://android.googlesource.com/platform/build/+/android-cts-4.2_r2/core/combo/HOST_linux-x86.mk
build/core/combo/HOST_linux-x86.mk
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
change to:
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0




external/icu4c / android-cts-4.2_r2 / common / unicode / unistr.h
external/icu4c/public/common/unicode/unistr.h: In member function ‘icu_46::UnicodeString& icu_46::UnicodeString::replace(int32_t, int32_t, UChar32)’:
external/icu4c/public/common/unicode/unistr.h:4023:9: error: variable ‘isError’ set but not used [-Werror=unused-but-set-variable]
external/icu4c/public/common/unicode/unistr.h: In member function ‘icu_46::UnicodeString& icu_46::UnicodeString::append(UChar32)’:
external/icu4c/public/common/unicode/unistr.h:4326:9: error: variable ‘isError’ set but not used [-Werror=unused-but-set-variable]
  UBool isError = FALSE;
  U16_APPEND(buffer, count, U16_MAX_LENGTH, srcChar, isError);
  (void)isError;
  
  
libcore / luni / src / main / native / NativeCrypto.cpp
  converting to non-pointer type 'int' from NULL: in line 622, 627, 634, 1795, 1864, 1871
libcore / luni / src / main / native /org_apache_harmony_xml_ExpatParser.cpp: in line 1280
https://android.googlesource.com/platform/libcore/+/android-4.1.1_r6.1/luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp  
return NULL;
change to:
return 0;