Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 587
user1865027 Avatar asked Dec 19 '22 09:12

user1865027


2 Answers

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.

like image 119
Ingtellect Avatar answered Jan 09 '23 07:01

Ingtellect


 sudo apt-get install bison

Try this. It will fix your issue.

like image 29
Sanyam Jain Avatar answered Jan 09 '23 08:01

Sanyam Jain