Error in building ICS

5,903 views
Skip to first unread message

Mickey MK

unread,
Nov 26, 2011, 2:26:01 PM11/26/11
to Android Building
any body can help me solve this error in building ICS 4.0.1_r1
here are the errors:


target Dex: services
Copying: out/target/common/obj/APPS/Bluetooth_intermediates/
noproguard.classes.dex
Copying: out/target/common/obj/APPS/Development_intermediates/
noproguard.classes.dex
target Java: FrameworksCoreSystemPropertiesTests (out/target/common/
obj/APPS/FrameworksCoreSystemPropertiesTests_intermediates/classes)
target Java: FrameworksCoreTests (out/target/common/obj/APPS/
FrameworksCoreTests_intermediates/classes)
target Java: KeyChainTests (out/target/common/obj/APPS/
KeyChainTests_intermediates/classes)
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field
1 error
1 error
1 error
make: *** [out/target/common/obj/APPS/
FrameworksCoreTests_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/obj/APPS/
FrameworksCoreSystemPropertiesTests_intermediates/classes-full-
debug.jar] Error 41
make: *** [out/target/common/obj/APPS/KeyChainTests_intermediates/
classes-full-debug.jar] Error 41


Mick,

Conley Owens

unread,
Nov 28, 2011, 5:45:11 PM11/28/11
to android-...@googlegroups.com
Hi. Could you please tell us a little more about the environment you
are attempting to build in?

Are you using Ubuntu (which version and architecture)? Did you follow
the steps in <http://source.android.com/source/initializing.html> to
install the jdk or did you use a different method?

~cco3

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

Mickey MK

unread,
Nov 29, 2011, 1:20:35 AM11/29/11
to Android Building

Thanks Conley Owens for your reply...
I tried to delete my last sync and resync again from repo...
Now I build the source with command : make -j4 without any error.

I'm using Ubuntu 10.04 and JDK in my machine is version 6.29.

Yes, I do follow this address:
http://source.android.com/source/initializing.html


here are my last build:
--------------------------------
target Package: android.core.tests.libcore.package.tests.no-core-tests-
res (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.tests.no-core-tests-
res_intermediates/package.apk)
'out/target/common/obj/APPS/
android.core.tests.libcore.package.tests.no-core-tests-
res_intermediates//classes.dex' as 'classes.dex'...
Install: out/target/product/generic/system/app/Browser.apk
Add resources to package (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.tests_intermediates/package.apk)
# javalib.jar should only contain .dex files, but the harmony tests
also include
# some .class files, so get rid of them
Copying: out/target/common/obj/APPS/SystemUI_intermediates/
noproguard.classes.dex
target Package: SystemUI (out/target/product/generic/obj/APPS/
SystemUI_intermediates/package.apk)
'out/target/common/obj/APPS/SystemUI_intermediates//classes.dex' as
'classes.dex'...
Processing target/product/generic/obj/APPS/SystemUI_intermediates/
package.apk
Done!
Install: out/target/product/generic/system/app/SystemUI.odex
Install: out/target/product/generic/system/app/SystemUI.apk
Finding NOTICE files: out/target/product/generic/obj/NOTICE_FILES/hash-
timestamp
Combining NOTICE files: out/target/product/generic/obj/NOTICE.html
Installed file list: out/target/product/generic/installed-files.txt
Target system fs image: out/target/product/generic/obj/PACKAGING/
systemimage_intermediates/system.img
Copying: out/target/common/obj/APPS/
android.core.tests.libcore.package.dalvik.no-core-tests-
res_intermediates/noproguard.classes.dex
target Package: android.core.tests.libcore.package.dalvik.no-core-
tests-res (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.dalvik.no-core-tests-
res_intermediates/package.apk)
Copying: out/target/common/obj/APPS/
android.core.tests.libcore.package.sun.no-core-tests-res_intermediates/
noproguard.classes.dex
target Package: android.core.tests.libcore.package.sun.no-core-tests-
res (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.sun.no-core-tests-res_intermediates/
package.apk)
'out/target/common/obj/APPS/android.core.tests.libcore.package.sun.no-
core-tests-res_intermediates//classes.dex' as 'classes.dex'...
'out/target/common/obj/APPS/
android.core.tests.libcore.package.dalvik.no-core-tests-
res_intermediates//classes.dex' as 'classes.dex'...
Install system fs image: out/target/product/generic/system.img
Add resources to package (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.dalvik_intermediates/package.apk)
Add resources to package (out/target/product/generic/obj/APPS/
android.core.tests.libcore.package.sun_intermediates/package.apk)
# javalib.jar should only contain .dex files, but the harmony tests
also include
# javalib.jar should only contain .dex files, but the harmony tests
also include
# some .class files, so get rid of them
# some .class files, so get rid of them


Mick,

Amit Pundir

unread,
Nov 29, 2011, 7:28:15 AM11/29/11
to android-...@googlegroups.com
On 26 November 2011 19:56, Mickey MK <ly.cha...@gmail.com> wrote:
any body can help me solve this error in building ICS 4.0.1_r1
here are the errors:


target Dex: services
Copying: out/target/common/obj/APPS/Bluetooth_intermediates/
noproguard.classes.dex
Copying: out/target/common/obj/APPS/Development_intermediates/
noproguard.classes.dex
target Java: FrameworksCoreSystemPropertiesTests (out/target/common/
obj/APPS/FrameworksCoreSystemPropertiesTests_intermediates/classes)
target Java: FrameworksCoreTests (out/target/common/obj/APPS/
FrameworksCoreTests_intermediates/classes)
target Java: KeyChainTests (out/target/common/obj/APPS/
KeyChainTests_intermediates/classes)
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field
error: error reading out/target/common/obj/JAVA_LIBRARIES/core-
tests_intermediates/javalib.jar; invalid header field

I saw this corrupt Java header/zip errors when OpenJDK is set to default Java in the HOST machine. Make sure you are using Sun-6-JDK instead of OpenJDK by running the following command.

$ sudo update-alternatives --config jar

Regards,
Amit Pundir
 
1 error
1 error
1 error
make: *** [out/target/common/obj/APPS/
FrameworksCoreTests_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/obj/APPS/
FrameworksCoreSystemPropertiesTests_intermediates/classes-full-
debug.jar] Error 41
make: *** [out/target/common/obj/APPS/KeyChainTests_intermediates/
classes-full-debug.jar] Error 41


Mick,

Mickey MK

unread,
Nov 30, 2011, 3:39:15 AM11/30/11
to Android Building

after I try to build the source again, I have the following problem
what can I do with this?

make: *** [out/target/common/obj/APPS/
android.core.tests.libcore.package.dalvik.no-core-tests-
res_intermediates/noproguard.classes-with-local.dex] Killed


make: *** Waiting for unfinished jobs....

$ adb reboot bootloader
No command 'adb' found, did you mean: Command 'cdb' from package
'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'dab'
from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-
fuse' (universe) Command 'mdb' from package 'mono-
debugger' (universe) Command 'kdb' from package 'elektra-
bin' (universe) Command 'tdb' from package 'tads2-
dev' (multiverse) Command 'pdb' from package 'python' (main) Command
'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package
'apache2-utils' (main) Command 'ad' from package
'netatalk' (universe)adb: command not found

Mick,

On Nov 29, 2:28 pm, Amit Pundir <amit.pun...@linaro.org> wrote:

Conley Owens

unread,
Nov 30, 2011, 4:16:14 PM11/30/11
to android-...@googlegroups.com
Could you show a little bit more of your make error? Try running a
single-threaded make (no -j argument) and paste the output.

Jean-Baptiste Queru

unread,
Nov 30, 2011, 4:19:57 PM11/30/11
to android-...@googlegroups.com
My best guess that an earlier process (for which the error isn't
shown) got killed for taking too much RAM.

How much RAM and swap do you have in your system?

JBQ

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, 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.

Mickey MK

unread,
Dec 1, 2011, 12:47:58 AM12/1/11
to Android Building

Conley Owens,

I tried your suggestion, the following is output I had.

$ 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
============================================
make: Nothing to be done for `droid'.


Mick,

Mickey MK

unread,
Dec 1, 2011, 12:53:35 AM12/1/11
to Android Building
JBQ,
My machine have 4GB ram, CPU intel core i3 with Ubuntu 10.04
32bit.Currently, I just upgraded to 8GB.
Mick,

On Nov 30, 11:19 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> My best guess that an earlier process (for which the error isn't
> shown) got killed for taking too much RAM.
>
> How much RAM and swap do you have in your system?
>
> JBQ
>
>
>
>
>
>
>
>
>
> On Wed, Nov 30, 2011 at 8:16 AM, Conley Owens <c...@android.com> wrote:
> > Could you show a little bit more of your make error?  Try running a
> > single-threaded make (no -j argument) and paste the output.
>

Jean-Baptiste Queru

unread,
Dec 1, 2011, 12:55:06 AM12/1/11
to android-...@googlegroups.com
My best guess is that you hit a memory peak, crashed a process out of
memory, but succeeded in a subsequent build.

JBQ

Mickey MK

unread,
Dec 1, 2011, 1:07:24 AM12/1/11
to Android Building

JBQ,


I just upgraded to 8GB, hope that I can work well with the sources.
but my OS version is 32bit, so it is not affected by the new size.
Now I'm downloading Ubuntu 64bit version to haven it more Ram.


Mick,

Jean-Baptiste Queru

unread,
Dec 1, 2011, 1:16:58 AM12/1/11
to android-...@googlegroups.com
A 32-bit OS can still use more than 4GB of RAM (though I'm not sure if
any does). It's just limited to 4GB per process, but that's not
believed to be an explicit issue for Android yet.

JBQ

Gaurav

unread,
Dec 22, 2011, 7:11:51 AM12/22/11
to Android Building
Hi,

We are trying to build the android 4.0.1_r1 also getting the smiliar
error mentioned in the thread:

make: *** [out/target/common/obj/APPS/
android.core.tests.libcore.package.dalvik.no-core-tests-
res_intermediates/noproguard.classes-with-local.dex] Killed
make: *** Waiting for unfinished jobs....


Here are our machine configuration:
Machine 1: Dual Core Intel Xeon (1.86GHz for each core)
OS : Ubuntu 10.04 LTS server
RAM: 2.5 GB
Swap Space: 1 GB

Machine 2: QuadCore Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
OS : Ubuntu 11.04
RAM: 4 GB
Swap Space: 500 MB

I have the following questions and any help will be truly appreciated:

1) Is the cofiguration fine for the build machine fine? As i have seen
in one of the thread where JBQ mentioned 16 GB of RAM for android 4.0
build, is that manadatory to have?

2) Is the 'Linux Swap' make any difference during build? What is the
minimum Linux Swap spcace recommendation?


Thanks & Regards,
Gaurav Jain
> warning.- Hide quoted text -
>
> - Show quoted text -

Jean-Baptiste Queru

unread,
Dec 22, 2011, 4:16:10 PM12/22/11
to android-...@googlegroups.com
The total RAM + swap needs to be much higher than what you have. I
have 24GB of RAM in my workstation and still use a bit of swap. Make
your swap at least 25GB. Your builds are going to take a very long
time.

JBQ

Magnus Bäck

unread,
Dec 22, 2011, 6:29:24 PM12/22/11
to Android Building
On Thursday, December 22, 2011 at 08:11 CET,
Gaurav <jainga...@gmail.com> wrote:

> We are trying to build the android 4.0.1_r1 also getting the smiliar
> error mentioned in the thread:
>
> make: *** [out/target/common/obj/APPS/
> android.core.tests.libcore.package.dalvik.no-core-tests-
> res_intermediates/noproguard.classes-with-local.dex] Killed
> make: *** Waiting for unfinished jobs....

I'm pretty sure this is because the process was killed because you
ran out of memory, but until next time post the full error message.
What you posted above is just make reporting the symptom.

> Here are our machine configuration:
> Machine 1: Dual Core Intel Xeon (1.86GHz for each core)
> OS : Ubuntu 10.04 LTS server
> RAM: 2.5 GB
> Swap Space: 1 GB
>
> Machine 2: QuadCore Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
> OS : Ubuntu 11.04
> RAM: 4 GB
> Swap Space: 500 MB
>
> I have the following questions and any help will be truly appreciated:
>
> 1) Is the cofiguration fine for the build machine fine? As i have seen
> in one of the thread where JBQ mentioned 16 GB of RAM for android 4.0
> build, is that manadatory to have?

No, but anything less than 8 GB is going to be painful. Going from
4 to 8 GB makes a huge difference (I wouldn't even try with 2.5 GB),
but unless you run *many* parallel jobs taking it to 16 GB or more
won't make a dramatic difference.

Even on Gingerbread, the time for building an SDK from scratch on
a reasonably modern four-core machine was cut in half (or more) when
going from 4 to 8 GB. Javadoc is memory-hungry, and if you get 2-3
parallel instances each eating 1.5-2 GB RAM your computer will thrash
to a halt.

Your RAM needs will obviously vary depending on whether it's a
workstation that you expect to use while you're building or if
it's a headless node in a data center.

> 2) Is the 'Linux Swap' make any difference during build? What is the
> minimum Linux Swap spcace recommendation?

That depends on how much RAM you have. Linux will use little or no swap
if you have ample RAM. Just make sure RAM + swap cover your memory usage
profile.

--
Magnus B�ck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Gaurav

unread,
Dec 23, 2011, 1:51:30 PM12/23/11
to Android Building
Hi,

Thanks Jean and Magnus for your replies!!!

I will definetly that. Meanwhile i was able to build the Android
master branch which got build on one of the machine without giving
earlier error (process killed) which i got (I was getting that with
Android 4.0.1 and Android 4.0.3 branches).

But now i struck into another problem.

Everytiome i am launch an emulator its gives me "Blank Screen."

Any help will be deeply appreciated.


Regards,
Gauarav Jain

On Dec 22, 11:29 pm, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Thursday, December 22, 2011 at 08:11 CET,
> Sony Ericsson- Hide quoted text -

calvin zhou

unread,
Feb 13, 2012, 8:54:14 AM2/13/12
to Android Building
Dear Gaurav:

Sorry for not replying your new question.
I just wanna ask your last question that It's the memory issue?
then it's must be not less 16G of RAM as what JBQ mentioned?
I'm trying to config a workstation for ICS.

Any reply will be appriciated.

thanks.
> >workstationthat you expect to use while you're building or if
> > it's a headless node in a data center.
>
> > > 2) Is the 'Linux Swap' make any difference during build? What is the
> > > minimum Linux Swap spcace recommendation?
>
> > That depends on how much RAM you have. Linux will use little or no swap
> > if you have ample RAM. Just make sure RAM + swap cover your memory usage
> > profile.
>
> > --
> > Magnus B ck                   Opinions are my own and do not necessarily
> > SWConfigurationManager      represent the ones of my employer, etc.
> > Sony Ericsson- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Gaurav

unread,
Mar 30, 2012, 8:18:25 AM3/30/12
to Android Building
Hi,

No i guess it wasn't related to memory issue. May be some other issue.
The "process killed" error went away when i tried to build the same
with master branch. As far as RAM is concerned i was able to build
2.5GB and 4GB.

Higher RAM will definitely help in building the OS image faster. I
would also recommend the Quad core system to get is done faster.

The blank screen issue was related to running the emulator with the
wrong kernel image. The kernel image should be the arm-7 one.


Regards,
Gaurav

s.rawat

unread,
Nov 9, 2012, 5:46:22 PM11/9/12
to android-...@googlegroups.com
try making by doing only make and no -jX thing!!!! Build it now and see teh resutl on monday !! Happy weekend !!
"..pain is temporary.....quitting lasts forever....."


On Fri, Nov 9, 2012 at 7:10 PM, Tunc Ikikardes <tunc.ik...@gmail.com> wrote:
When I tried to make 4.0.3 build with Smartcard API from SEEK-for-Android, I had the same 2 problems as Mickey MK had, namely
1)
....
error: error reading out/target/common/obj/JAVA_

LIBRARIES/core-tests_intermediates/javalib.jar; invalid header field 1 error
make: *** [out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates//classes-full-debug.jar] Error 41

2)
...
make: *** [out/target/common/obj/APPS/
android.core.tests.libcore.

package.dalvik.no-core-tests-
res_intermediates/noproguard.classes-with-local.dex] Killed

My build setup (on a 64bit Ubuntu 11.10 VM) was following:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3

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=IML74K
============================================

I managed to solve the problems with the following fixes_
The first problem:
// For me the reason was the wrong JDK (OpenJDK-java6) that was installed before.
// First get the JDK from Sun with the fallowing commands
sudo apt-get purge openjdk*   // in case openjdk-java6-jdk was installed beforehand
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin

// Then get rid off the created jars with openjdk and choose the correct jar path
cd out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/
rm javalib.jar classes-full-debug.jar

Second problem:
// It was a problem of the RAM capacity as a metter of fact. I am building from a W7 quadcore local machine
// with 8GB RAM. I had before 4 GB RAM and only 1 core reserved for VM.
// After going upto 5.5 GB and 4 cores. I could build the FW with the fllowing command
make -j4

Hope this post will help others facing similar problems.

Tunc






On Thursday, July 5, 2012 7:14:24 AM UTC+2, rtindru wrote:
So any idea what caused the error?
Did the repo re-sync work? Was it a RAM problem?
Thanks & Regards

--
330.gif
Reply all
Reply to author
Forward
0 new messages