AOSP building instructions are valid?

1,024 views
Skip to first unread message

roy.be...@gmail.com

unread,
Aug 13, 2014, 3:30:49 PM8/13/14
to android-...@googlegroups.com
Hi,
in the last week I tried several times to build AOSP as instructed in https://source.android.com/source/building-running.html

while the instructions are straightforward, the build (running "make -j4") always aborts with some build error.

so far tried to build the following AOSP source trees (using repo init):
  1. master
  2. android-4.4.4_r2
  3. android-4.0.1_r1
in each, compilation fails at some point. see below a full log showing failed attempt to build android-4.0.1_r1.

any advice would be much appreciated! link to tested instructions would be great!

thanks!


royb@royb-ThinkPad-X61:~/AOSP$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_maguro-userdebug
     5. full_tuna-userdebug
     6. full_panda-eng

Which would you like? [full-eng] 1

==============================
==============
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================

royb@royb-ThinkPad-X61:~/AOSP$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
Install: out/host/linux-x86/bin/acp
Install: out/host/linux-x86/framework/guavalib.jar
host Java: jsilver (out/host/common/obj/JAVA_LIBRARIES/jsilver_intermediates/classes)
Note: external/jsilver/src/org/clearsilver/FactoryLoader.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Install: out/host/linux-x86/framework/jsilver.jar
Install: out/host/linux-x86/framework/antlr.jar
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
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/emma_out/lib/classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes.jar
Install: out/host/linux-x86/framework/dx.jar
Copy: dx (out/host/linux-x86/obj/EXECUTABLES/dx_intermediates/dx)
Install: out/host/linux-x86/bin/dx
target Dex: core
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes.dex
host C++: aapt <= frameworks/base/tools/aapt/AaptAssets.cpp
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
frameworks/base/tools/aapt/AaptAssets.cpp:1:0: note: this is the location of the previous definition
 //
 ^
frameworks/base/tools/aapt/AaptAssets.cpp:2161:1: warning: unused parameter ‘bundle’ [-Wunused-parameter]
 AaptAssets::slurpResourceZip(Bundle* bundle, const char* filename)
 ^
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]
     ssize_t i = indexOfKey(key);
                               ^
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] Error 1

Conley Owens

unread,
Aug 13, 2014, 5:24:43 PM8/13/14
to android-...@googlegroups.com
Do you still have the build logs for master? Is it the same issue?
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jean-Baptiste Queru

unread,
Aug 13, 2014, 5:52:12 PM8/13/14
to android-...@googlegroups.com
You're building an old version of Android (2011) with a host that is too recent. You need to build on Ubuntu 10.04, or at least with the exact version of gcc that was used in Ubuntu 10.04.

JBQ
 
--

Jean-Baptiste M. "JBQ" Quéru
Architect, Mobile, Yahoo


Install: out/host/linux-x86/bin/acp
Install: out/host/linux-x86/framework/ guavalib.jar
host Java: jsilver (out/host/common/obj/JAVA_ LIBRARIES/jsilver_ intermediates/classes)
Note: external/jsilver/src/org/ clearsilver/FactoryLoader.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.
Install: out/host/linux-x86/framework/ jsilver.jar
Install: out/host/linux-x86/framework/ antlr.jar
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
Copying: out/target/common/obj/JAVA_ LIBRARIES/core_intermediates/ classes-jarjar.jar
Copying: out/target/common/obj/JAVA_ LIBRARIES/core_intermediates/ emma_out/lib/classes-jarjar. jar
Copying: out/target/common/obj/JAVA_ LIBRARIES/core_intermediates/ classes.jar
Copying: out/target/common/obj/JAVA_ LIBRARIES/core_intermediates/ noproguard.classes.jar
Install: out/host/linux-x86/framework/ dx.jar
Copy: dx (out/host/linux-x86/obj/ EXECUTABLES/dx_intermediates/ dx)

Install: out/host/linux-x86/bin/dx
target Dex: core
Copying: out/target/common/obj/JAVA_ LIBRARIES/core_intermediates/ noproguard.classes.dex
host C++: aapt <= frameworks/base/tools/aapt/ AaptAssets.cpp
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
frameworks/base/tools/aapt/ AaptAssets.cpp:1:0: note: this is the location of the previous definition
 //
 ^
frameworks/base/tools/aapt/ AaptAssets.cpp:2161:1: warning: unused parameter ‘bundle’ [-Wunused-parameter]
 AaptAssets::slurpResourceZip( Bundle* bundle, const char* filename)

 ^
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]

     ssize_t i = indexOfKey(key);
                               ^
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] Error 1

roy.be...@gmail.com

unread,
Aug 14, 2014, 2:14:37 PM8/14/14
to android-...@googlegroups.com
Hi Conley,
yes, trying to build master all day today. it does not abort with an error but when running "make" it hangs on this line in the build log:

host C++: libjavacore_32 <= libcore/luni/src/main/native/android_system_OsConstants.cpp

for few hours and CPU is showing very little activity.

any idea?

thanks!

roy.be...@gmail.com

unread,
Aug 15, 2014, 1:28:39 AM8/15/14
to android-...@googlegroups.com
Hi again Conley,
I started another build, with "make -j4" (previous was just "make") and got up to this error:

Install: out/target/product/generic/system/framework/webview/paks/zh-TW.pak
target Dex: core-libart
target Dex: conscrypt
target Dex: okhttp
target Dex: core-junit
target Dex: bouncycastle
target Dex: ext
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000007dd180000, 44564480, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 44564480 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/royb/android-master/hs_err_pid17090.log
make: *** [out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/with-local/classes.dex] Error 1
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (05:27:44 (hh:mm:ss)) ####

the VM hs_err_pid17090.log says:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 44564480 bytes for committing reserved memory.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_linux.cpp:2769), pid=17090, tid=47875341944576
#
# JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
Reply all
Reply to author
Forward
0 new messages