This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Andriod ics comilation issue

Dear all,

I am compiling Andriod ICS on local pc. i am getting following error . can any one help me how to resolve this issue.

 

frameworks/base/include/utils/KeyedVector.h:193:31: error: âindexOfKeyâ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

regards,

sreedhar

 

 

  • Which ubuntu version are you using?

    The ICS sources are targeted to be compiled on Ubuntu 10.04. Later versions may cause issues with host GCC. You can refer to 'android-building' forum in google groups for more details:

    e.g: https://groups.google.com/d/topic/android-building/2EwtWQTqjdI/discussion

  • currently i am using ubuntu version 12.0 and  gcc version 4.7.? can i build ics on ubuntu lower version are like 10.4 and gcc version 4.4? please help me how to fix this issue?

    regards,

    sreedhar

  • Ubuntu 10.04 is the recommended version for compiling ICS sources.

    You may also try changing the default GCC to 4.4 from 4.7 in case you wish to continue using ubuntu 12.04. I have not personally verified this.

    I found some webpages documenting this. e.g. http://xlcwu.wordpress.com/2012/07/24/ubuntu-12-04-gcc-4-4/

  • Dear Vishveshwar,

    As per your suggestion i was sucessfully changed gcc version to 4.4 but i got some more compilation issues. please see below issues and suggest me how to fix.

    host C++: aidl <= frameworks/base/tools/aidl/aidl.cpp
    host C++: aidl <= frameworks/base/tools/aidl/aidl_language.cpp
    host C++: aidl <= frameworks/base/tools/aidl/options.cpp
    host C++: aidl <= frameworks/base/tools/aidl/search_path.cpp
    host C++: aidl <= frameworks/base/tools/aidl/AST.cpp
    host C++: aidl <= frameworks/base/tools/aidl/Type.cpp
    host C++: aidl <= frameworks/base/tools/aidl/generate_java.cpp
    host C++: aidl <= out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp
    out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function âint yyparse()â:
    out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1872: warning: deprecated conversion from string constant to âchar*â
    out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:2014: warning: deprecated conversion from string constant to âchar*â
    Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
    /bin/bash: flex: command not found
    make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
    make: *** Waiting for unfinished jobs....

    regards,

    sreedhar

  • Please ensure that you have installed all host dependencies.

    Refer to the AOSP documentation: http://s.android.com/source/initializing.html

  • Dear Vishveswar,

    I am getting following errors. how to fix those issues?

    host Executable: etc1tool (out/host/linux-x86/obj/EXECUTABLES/etc1tool_intermediates/etc1tool)
    true
    Install: out/host/linux-x86/bin/eventanalyzer
    Install: out/host/linux-x86/bin/exc_dump
    Install: out/host/linux-x86/bin/fastboot
    true
    Install: out/host/linux-x86/bin/fs_config
    Install: out/host/linux-x86/bin/fs_get_stats
    Install: out/host/linux-x86/bin/genext2fs
    host C: gpttool <= system/core/gpttool/gpttool.c
    Install: out/host/linux-x86/bin/hierarchyviewer
    Install: out/host/linux-x86/bin/hierarchyviewer1
    system/core/gpttool/gpttool.c: In function âmainâ:
    system/core/gpttool/gpttool.c:296: warning: implicit declaration of function âioctlâ
    system/core/gpttool/gpttool.c:356: warning: implicit declaration of function âcrc32â
    system/core/gpttool/gpttool.c:356: error: âZ_NULLâ undeclared (first use in this function)
    system/core/gpttool/gpttool.c:356: error: (Each undeclared identifier is reported only once
    system/core/gpttool/gpttool.c:356: error: for each function it appears in.)
    make: *** [out/host/linux-x86/obj/EXECUTABLES/gpttool_intermediates/gpttool.o] Error 1
    make: *** Waiting for unfinished jobs....
    libpng warning: Ignoring attempt to set cHRM RGB triangle with zero area
    libpng warning: Ignoring attempt to set cHRM RGB triangle with zero area

    regards,

    sreedhar

  • sreedhar donelli said:

    system/core/gpttool/gpttool.c: In function âmainâ:
    system/core/gpttool/gpttool.c:296: warning: implicit declaration of function âioctlâ
    system/core/gpttool/gpttool.c:356: warning: implicit declaration of function âcrc32â
    system/core/gpttool/gpttool.c:356: error: âZ_NULLâ undeclared (first use in this function)
    system/core/gpttool/gpttool.c:356: error: (Each undeclared identifier is reported only once
    system/core/gpttool/gpttool.c:356: error: for each function it appears in.)

    I feel that your host setup is still incomplete. Did you install all the recommended packages I pointed out in the link above?