Linux Mint 17 compiled android 2.3.1 Error Record

Source: Internet
Author: User

There are also reproduced here are added.

################# Fix 1 ##########################

Error:

Frameworks/base/include/utils/keyedvector.h:193:31:note:declarations in dependent base ' android::keyedvector< Android::string8, android::sp<aaptdir> > ' is not found by unqualified lookup

Frameworks/base/include/utils/keyedvector.h:193:31:note:use ' This->indexofkey ' insteadmake: * * * [out/host/ LINUX-X86/OBJ/EXECUTABLES/AAPT_INTERMEDIATES/AAPTASSETS.O] Error 1

Fix:
VI frameworks/base/tools/aapt/android.mk

Add '-fpermissive ' to line 31:
Local_cflags + =-wno-format-y2k-fpermissive

################## Fix 2 ##########################

Error:frameworks/base/include/utils/keyedvector.h:193:31:error: ' Indexofkey ' is not declared in this scope, and no decl Arations were found by Argument-dependent lookup at the point of instantiation [-fpermissive]frameworks/base/include/util S/keyedvector.h:193:31:note:declarations in dependent base ' Android::keyedvector<android::string8, ANDROID::WP <android::AssetManager::SharedZip> > ' is not found by unqualified lookup
Frameworks/base/include/utils/keyedvector.h:193:31:note:use ' This->indexofkey ' insteadmake: * * * [out/host/ LINUX-X86/OBJ/STATIC_LIBRARIES/LIBUTILS_INTERMEDIATES/ASSETMANAGER.O] Error 1

Fix:
VI frameworks/base/libs/utils/android.mk

Add '-fpermissive ' to line 64:
Local_cflags + =-dlibutils_native=1 $ (tool_cflags)-fpermissive

################## Fix 3 ##########################

Error:
External/srec/tools/thirdparty/openfst/fst/lib/cache.h:136:11:note:use ' This->setstate ' instead
Make: * * * [OUT/HOST/LINUX-X86/OBJ/EXECUTABLES/GRXMLCOMPILE_INTERMEDIATES/GRXMLCOMPILE.O] Error 1

Fix:
CD External/srec
Wget "Https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff "
Patch-p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
Rm-f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
Cd.. /..

################## Fix 3.1 ##########################

Error:
Host C + +: Obbtool <= frameworks/base/tools/obbtool/main.cpp
Host C:parsestringtest <= external/srec/tools/parsestringtest/parsestringtest.c
< command line >:0:0: Error: "_fortify_source" redefinition [-werror]
frameworks/base/tools/obbtool/main.cpp:1:0: Note: This is the previously defined location
Make: * * [OUT/HOST/LINUX-X86/OBJ/EXECUTABLES/OBBTOOL_INTERMEDIATES/MAIN.O] Error 1

Fix:vi build/core/combo/host_linux-x86.mk line56
Add-u_fortify_sourcehost_global_cflags + =-u_fortify_source-d_fortify_source=0
################## Fix 4 ##########################

Error:
Development/tools/emulator/opengl/host/tools/emugen/main.cpp:79:9: Error: ' Optind ' is not declared in this scope
Development/tools/emulator/opengl/host/tools/emugen/main.cpp:92:45:error: ' Optind ' is not declared in this scope
Make: * * * [OUT/HOST/LINUX-X86/OBJ/EXECUTABLES/EMUGEN_INTERMEDIATES/MAIN.O] Error 1

Fix:
VI development/tools/emulator/opengl/host/tools/emugen/main.cpp

Add ' #include <getopt.h> ' to List of includes:
#include <getopt.h>

################## Fix 5 ##########################

Error:
Host C + +: liboprofile_pp <= external/oprofile/libpp/arrange_profiles.cpp
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:
VI external/oprofile/libpp/format_output.h

Remove ' mutable ' from ' mutable counts_t & Counts, ' on line 94:
Counts_t & counts;

################## Fix 6 ##########################

Error:
Development/tools/emulator/opengl/shared/openglcodeccommon/glsharedgroup.cpp:345:65:required from here
Frameworks/base/include/utils/keyedvector.h:193:31:error: ' Indexofkey ' is not declared in this scope, and no declaratio NS were found by Argument-dependent lookup at the point of instantiation [-fpermissive]frameworks/base/include/utils/keye Dvector.h:193:31:note:declarations in dependent base ' android::keyedvector<unsigned int, shaderdata*> ' is not fo und by unqualified Lookup
Frameworks/base/include/utils/keyedvector.h:193:31:note:use ' This->indexofkey ' insteadmake: * * * [out/host/ LINUX-X86/OBJ/STATIC_LIBRARIES/LIBOPENGLCODECCOMMON_INTERMEDIATES/GLSHAREDGROUP.O] Error 1

Fix:
VI development/tools/emulator/opengl/android.mk

Add '-fpermissive ' to line 25:
Emugl_common_cflags: =-dwith_gles2-fpermissive

################## Fix 7 ##########################

Error:
/usr/bin/ld:note: ' xinitthreads ' is defined in dso/lib/libx11.so.6 so try adding it to the linker command line
/lib/libx11.so.6:could not read Symbols:invalid operation
Collect2:error:ld returned 1 exit status
Make: * * * [out/host/linux-x86/obj/executables/emulator_renderer_intermediates/emulator_renderer] Error 1

Fix:
VI development/tools/emulator/opengl/host/renderer/android.mk

ADD new entry ' local_ldlibs + =-lx11 ' after line 6 as shown:
Local_src_files: = main.cpp
Local_cflags + =-o0-g
Local_ldlibs + =-lx11

#ifeq ($ (host_os), Windows)
#LOCAL_LDLIBS + =-lws2_32

################## Fix 8 ##########################

Error:
External/llvm/include/llvm/adt/pointerunion.h:56:10:error:enumeral mismatch in conditional expression: ' LLVM:: POINTERLIKETYPETRAITS&LT;LLVM::P ointerunion<clang::stmt*, const clang::type*> >::<anonymous enum> ' Vs ' LLVM::P ointerliketypetraits<clang::objcinterfacedecl*>::<anonymous enum> ' [-Werror]
Cc1plus:all warnings being treated as errors
Make: * * * [OUT/HOST/LINUX-X86/OBJ/EXECUTABLES/LLVM-RS-CC_INTERMEDIATES/SLANG_RS.O] Error 1

Fix:
VI frameworks/compile/slang/android.mk

Remove '-werror ' from line 22:
Local_cflags_for_slang: =-wno-sign-promo-wall-wno-unused-parameter

################## Fix 9 ##########################

Error:
Frameworks/base/libs/rs/rsfont.cpp:224:76:required from here
Frameworks/base/include/utils/keyedvector.h:193:31:error: ' Indexofkey ' is not declared in this scope, and no declaratio NS were found by Argument-dependent lookup at the point of instantiation [-fpermissive]frameworks/base/include/utils/keye Dvector.h:193:31:note:declarations in dependent base ' android::keyedvector<unsigned int, android::renderscript:: Font::cachedglyphinfo*> ' is not found by unqualified lookup
Frameworks/base/include/utils/keyedvector.h:193:31:note:use ' This->indexofkey ' insteadmake: * * * [out/host/ LINUX-X86/OBJ/STATIC_LIBRARIES/LIBRS_INTERMEDIATES/RSFONT.O] Error 1

Fix:
VI frameworks/base/libs/rs/android.mk

Add '-fpermissive ' to line 183
Local_cflags + =-werror-wall-wno-unused-parameter-wno-unused-variable-fpermissive

################## Fix 10 #########################

Error:
External/mesa3d/src/glsl/linker.cpp:1394:49:error:expected primary-expression before ', ' token
......
External/mesa3d/src/glsl/linker.cpp:1734:59:error: ' Offsetof ' is not declared in this scope
Make: * * * [OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBMESA_INTERMEDIATES/SRC/GLSL/LINKER.O] Error 1

Fix:
VI external/mesa3d/src/glsl/linker.cpp

Add ' #include <stddef.h> ' to list of includes as shown:
#include <climits>
#include <stddef.h>
#include <pixelflinger2/pixelflinger2_interface.h>

################## Fix 11 #########################

Error:
external/gtest/src/. /include/gtest/gtest-param-test.h:287:58:note: ' Template<class container> testing::internal::P aramgenerator <typename container::value_type> testing::valuesin (const container&) ' declared here, later in the translation Unit
Make: * * * [OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBGTEST_HOST_INTERMEDIATES/GTEST-ALL.O] Error 1

Fixes required:
1)
VI external/gtest/src/android.mk

Add '-fpermissive ' to lines (both lines contain same info)
Local_cflags + =-o0-fpermissive

2)
VI external/gtest/include/gtest/internal/gtest-param-util.h

Add ' #include <stddef.h> ' to list of includes as shown:
#include <vector>
#include <cstddef>
#include <gtest/internal/gtest-port.h> ################## Fix ######################## #Error:

Host Executable:test-librsloader (out/host/linux-x86/obj/executables/test-librsloader_intermediates/ Test-librsloader)
OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBLLVMSUPPORT_INTERMEDIATES/LIBLLVMSUPPORT.A (SIGNALS.O): in function ' Printstacktrace ' in:
/home/crow/works/android_src/external/llvm/lib/support/unix/signals.inc:219: References not defined for ' dladdr '
/home/crow/works/android_src/external/llvm/lib/support/unix/signals.inc:231: References not defined for ' dladdr '
OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBLLVMSUPPORT_INTERMEDIATES/LIBLLVMSUPPORT.A (THREADING.O): In function ' LLVM:: Llvm_execute_on_thread (void (*) (void*), void*, unsigned int) ':
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/THREADING.CPP:96: References not defined for ' pthread_create '
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/THREADING.CPP:100: References not defined for ' pthread_join '
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/THREADING.CPP:91: References not defined for ' pthread_attr_setstacksize '
OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBLLVMSUPPORT_INTERMEDIATES/LIBLLVMSUPPORT.A (MUTEX.O): In function ' Llvm::sys:: Muteximpl::muteximpl (BOOL) ' in:
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/MUTEX.CPP:69: References not defined for ' pthread_mutexattr_init '
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/MUTEX.CPP:75: References not defined for ' Pthread_mutexattr_settype '
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/MUTEX.CPP:80: References not defined for ' pthread_mutexattr_setpshared '
/HOME/CROW/WORKS/ANDROID_SRC/EXTERNAL/LLVM/LIB/SUPPORT/MUTEX.CPP:89: References not defined for ' Pthread_mutexattr_destroy '
OUT/HOST/LINUX-X86/OBJ/STATIC_LIBRARIES/LIBLLVMSUPPORT_INTERMEDIATES/LIBLLVMSUPPORT.A (MUTEX.O): In function ' Llvm::sys:: Muteximpl::tryacquire () ' in:
/home/crow/works/android_src/external/llvm/lib/support/mutex.cpp:143: References not defined for ' Pthread_mutex_trylock '
COLLECT2: Error: LD returns 1
Make: * * [Out/host/linux-x86/obj/executables/test-librsloader_intermediates/test-librsloader] Error 1

Fix:

$vi External/llvm/llvm-host-build.mk +
Local_ldlibs: =-LPTHREAD-LDL

The above content from: http://blog.csdn.net/kangear/article/details/9565889

Thanks to the author for sharing.

Out/host/linux-x86/obj/shared_libraries/libdvm_intermediates/native/dalvik_system_zygote.o

Fix:

Add a header file to the DALVIK/VM/NATIVE/DALVIK_SYSTEM_ZYGOTE.CPP definition of # include <sys/resource.h>

--------------------------------------------------------------------------------------------------------------- --------------

<command-line>:0:0: Error: "_fortify_source" redefined [-werror]
Frameworks/base/tools/obbtool/main.cpp:1: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:

Modify the source directory under the/build/core/combo/host_linux-x86.mk file:

The following statement

Host_global_cflags + =-d_fortify_source=0

Revision changed to

Host_global_cflags + =-u_fortify_source-d_fortify_source=0

  

Linux Mint 17 compiled android 2.3.1 Error Record

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.