Re: [android-building] Android Ics Building on Fedora 17

10,852 views
Skip to first unread message

Jean-Baptiste Queru

unread,
Jun 18, 2012, 3:33:52 PM6/18/12
to android-...@googlegroups.com
ICS can't be built with a gcc 4.7 host compiler. Maybe not even with
4.6, in fact.

JBQ

On Mon, Jun 18, 2012 at 12:30 PM, Nandan <natesan...@gmail.com> wrote:
> I am trying to build Android ics on my fedora17  system, i am getting the
> follwing errors
>
> gcc version 4.7.0
> java version "1.6.0_33
> . uname -a
> linux local 3.4.0-1.fc17.x86_64 #1 SMP Sun Jun 3 06:35:17 UTC 2012 x86_64
> x86_64 x86_64 GNU/Linux
>
>
> could someone help me to resolve this?
>
> host Java: doclava
> (out/host/common/obj/JAVA_LIBRARIES/doclava_intermediates/classes)
> Note: external/doclava/src/com/google/doclava/Stubs.java uses unchecked or
> unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> Install: out/host/linux-x86/framework/doclava.jar
> host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
> In file included from frameworks/base/include/utils/AssetManager.h:25:0,
>                  from frameworks/base/tools/aapt/AaptAssets.h:10,
>                  from frameworks/base/tools/aapt/AaptAssets.cpp:5:
> frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const
> VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const
> [with KEY = android::String8; VALUE = android::sp<AaptSymbols>]’:
> frameworks/base/tools/aapt/AaptAssets.h:446:59:   required from here
> 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]
> frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in
> dependent base ‘android::KeyedVector<android::String8,
> android::sp<AaptSymbols> >’ are not found by unqualified lookup
> frameworks/base/include/utils/KeyedVector.h:193:31: note: use
> ‘this->indexOfKey’ instead
> frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const
> VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const
> [with KEY = android::String8; VALUE = android::sp<AaptGroup>]’:
> frameworks/base/tools/aapt/AaptAssets.cpp:1636:41:   required from here
> 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]
> frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in
> dependent base ‘android::KeyedVector<android::String8,
> android::sp<AaptGroup> >’ are not found by unqualified lookup
> frameworks/base/include/utils/KeyedVector.h:193:31: note: use
> ‘this->indexOfKey’ instead
> frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const
> VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const
> [with KEY = android::String8; VALUE = android::sp<AaptDir>]’:
> frameworks/base/tools/aapt/AaptAssets.cpp:1700:53:   required from here
> 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]
> frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in
> dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir>
>>’ are not found by unqualified lookup
> frameworks/base/include/utils/KeyedVector.h:193:31: note: use
> ‘this->indexOfKey’ instead
> make: ***
> [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] E
>
> Regards,
> Nandan
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en



--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Jean-Baptiste Queru

unread,
Jun 25, 2012, 10:33:32 AM6/25/12
to android-...@googlegroups.com
4.4.3

JBQ

On Sun, Jun 24, 2012 at 6:55 AM, Sonny Gulanes
<sonny....@wideout.com> wrote:
> What version of gcc is needed to compile it in Fedora 17?

Jean-Baptiste Queru

unread,
Jan 4, 2013, 10:31:16 AM1/4/13
to android-...@googlegroups.com
That'll probably take care of most of the issues.

JBQ

On Fri, Jan 4, 2013 at 3:07 AM, XiangCheng He <schos...@gmail.com> wrote:
> I am also working on Ubuntu 12.04.
> If I downgrade gcc to 4.4.3, then could I build successfully?
>
> Jean-Baptiste Queru於 2012年6月25日星期一UTC+8下午10時33分32秒寫道:

Eric Nelson

unread,
Jul 19, 2013, 12:33:27 PM7/19/13
to android-...@googlegroups.com
On Wednesday, July 4, 2012 2:13:04 AM UTC-7, rh wrote:

Error:
development/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp:345:65:   required from here

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]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, ShaderData*>’ are not found by unqualified lookup

frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libOpenglCodecCommon_intermediates/GLSharedGroup.o] Error 1


With later GCC versions, this doesn't appear to work, but this patch to KeyedVector.h does:

diff --git a/include/utils/KeyedVector.h b/include/utils/KeyedVector.h
index 6bcdea4..5e62755 100644
--- a/include/utils/KeyedVector.h
+++ b/include/utils/KeyedVector.h
@@ -190,7 +190,7 @@ DefaultKeyedVector<KEY,VALUE>::DefaultKeyedVector(const VALUE& defValue)
 
 template<typename KEY, typename VALUE> inline
 const VALUE& DefaultKeyedVector<KEY,VALUE>::valueFor(const KEY& key) const {
-    ssize_t i = indexOfKey(key);
+    ssize_t i = this->indexOfKey(key);
     return i >= 0 ? KeyedVector<KEY,VALUE>::valueAt(i) : mDefault;
 

cheney...@gmail.com

unread,
Oct 17, 2013, 11:02:57 PM10/17/13
to android-...@googlegroups.com

I am also working on Ubuntu 12.10.
If I downgrade gcc to 4.4.3, then could I  build error:

frameworks/base/libs/rs/rsFont.cpp:224:76:   required from here

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]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<unsigned int, android::renderscript::Font::CachedGlyphInfo*>’ are not found by unqualified lookup

frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libRS_intermediates/rsFont.o] Error 1

 I modify frameworks/base/libs/rs/Android.mk

Add '-fpermissive' to line 183
LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -fpermissive

but the same problem

吳倉志

unread,
Mar 13, 2014, 10:25:22 PM3/13/14
to android-...@googlegroups.com
downgrade your gcc version to gcc 4.4

-sudo apt-get install gcc-4.4
-sudo apt-get install g++-4.4
-sudo rm /usr/bin/gcc
-sudo rm /usr/bin/g++
-sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
-sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
-sudo apt-get install g++-4.4-multilib


cheney...@gmail.com於 2013年10月18日星期五UTC+8上午11時02分57秒寫道:

changz...@newskysecurity.com

unread,
Oct 20, 2016, 3:59:06 PM10/20/16
to Android Building, j...@android.com
gcc --version to check the gcc version, it must dowgrade to gcc 4.4.
Reply all
Reply to author
Forward
0 new messages