user1865027
user1865027

Reputation: 3657

failed to build aosp. says subcommand failed

I've been struggling, googleing and recreating the entire virtual machine for 2 weeks still but can't figure out...

I don't think I missed any part from the instruction provided by aosp. Can someone please help me to solve the issue I got below? I was running make -j8 then got this

Starting build with ninja
ninja: Entering directory `.'
[  0% 1/34696] Yacc: aidl <= system/tools/aidl/aidl_language_y.yy
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d  --defines=out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h -o out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy"
/bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

Thank you so much!!!

Upvotes: 4

Views: 7473

Answers (2)

Ingtellect
Ingtellect

Reputation: 453

I had the same error. The file was there as you mentioned in comment. The reason was bison is a 32-bit binary and my ubuntu is 64bit. I had to install libc6:i386,libncurses5:i386,libstdc++6:i386.

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

You can find more detailed info in here.

Upvotes: 11

Sanyam Jain
Sanyam Jain

Reputation: 1194

 sudo apt-get install bison

Try this. It will fix your issue.

Upvotes: 1

Related Questions