Shantha Kumara
Shantha Kumara

Reputation: 3421

Argument list too long - Android 2.2.3_r1 build failed

I have downloaded the android 2.2.3_r1 and set up build environement.

I have made a special change to build the output in the USB drive by adding following line to buildspec.mk file and placing it in the source directory (the file has only that line as I want only to change the out directory).

OUT_DIR:=/media/SHANTHA/ANDROID

The build process is done issuing following commands in order:

  1. source build/envsetup.sh
  2. lunch full-eng
  3. make -j4

When I run make -j4 it ends after fairly long time with following lines at the end of trace.

...
...
target Prelink: libthread_db (/media/SHANTHA/ANDROID/target/product/generic/symbols/system/lib/libthread_db.so)
target StaticLib: libwebcore (/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a)
make: execvp: /bin/bash: Argument list too long
make: *** [/media/SHANTHA/ANDROID/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/libwebcore.a] Error 127
make: *** Waiting for unfinished jobs....
shantha@shantha:~/ANDROID_S$ 

The trace indicates the error as make: execvp: /bin/bash: Argument list too long

It is a great help if someone can help me to solve this.

Upvotes: 0

Views: 1352

Answers (1)

holzgeist
holzgeist

Reputation: 36

I had this problem too while building WebKit.

My solution was to download the kernel-sources, change line 14 in include/linux/binfmts.h from

#define MAX_ARG_STRLEN (PAGE_SIZE * 32)

to

#define MAX_ARG_STRLEN (PAGE_SIZE * 64)

compile and install the kernel and reboot.

However, the problem of this solution is that every running process needs more memory. But you could boot this kernel for building android only.

Upvotes: 2

Related Questions