Monday, October 1, 2018

Android source code compile: failed to build some targets (03:03 (mm:ss))

Leave a Comment

These days, I am compiling the Android source code, but I have one problem, after running the make -j8, it shows me failed to build some targets (03:03 (mm:ss)).

Below is the detail informations:

PLATFORM_VERSION_CODENAME=Q

PLATFORM_VERSION=Q

TARGET_PRODUCT=aosp_arm

TARGET_BUILD_VARIANT=eng

TARGET_BUILD_TYPE=release

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

TARGET_CPU_VARIANT=generic

HOST_ARCH=x86_64

HOST_2ND_ARCH=x86

HOST_OS=linux

HOST_OS_EXTRA=Linux-4.15.0-34-generic-x86_64-Ubuntu-18.04.1-LTS

HOST_CROSS_OS=windows

HOST_CROSS_ARCH=x86

HOST_CROSS_2ND_ARCH=x86_64

HOST_BUILD_TYPE=release

BUILD_ID=PI

OUT_DIR=out

============================================

[ 0% 1/83585] Yacc: ss <= external/iproute2/misc/ssfilter.y FAILED: out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.c /bin/bash -c "prebuilts/build-tools/linux-x86/bin/bison -d --defines=out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.h -o out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.c external/iproute2/misc/ssfilter.y" external/iproute2/misc/ssfilter.y: conflicts: 35 shift/reduce prebuilts/build-tools/linux-x86/bin/bison: m4 subprocess failed: No such file or directory 18:47:21 ninja failed with: exit status 1

failed to build some targets (03:03 (mm:ss))

I hope someone can help me out, thanks in advance.

2 Answers

Answers 1

the error message reads:

m4 subprocess failed: No such file or directory

m4 is a macro-processor - and the build fails as 0% already...

which makes me suspect, that m4 isn't below the PATH - and no macros can be processed.

on Ubuntu apt-get install m4 should install the package - or download m4 from launchpad.

GNU m4 is an implementation of the traditional UNIX macro processor. It is mostly SVR4 compatible, although it has some extensions (for example, handling more than 9 positional parameters to macros).

it's difficult to refer to "credible and/or official sources"; except the manpages & source of the package.

Answers 2

Try this command and wait.

source build/envsetup.sh; lunch aosp_arm-eng; make -j8 ; source build/envsetup.sh; lunch sdk-eng; make sdk 
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment