[ 3% 2279/59686] yacc out/soong/.inte.../system/tools/aidl/aidl_language_y.cpp
FAILED: out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x8664static/gen/yacc/system/tools/aidl/aidl_language_y.cpp out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x8664static/gen/yacc/system/tools/aidl/aidl_language_y.h
BISON_PKGDATADIR=external/bison/data prebuilts/misc/darwin-x86/bison/bison -d --defines=out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x8664static/gen/yacc/system/tools/aidl/aidl_language_y.h -o out/soong/.intermediates/system/tools/aidl/libaidl-common/darwin_x8664static/gen/yacc/system/tools/aidl/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy
[ 3% 2282/59686] lex out/soong/.inter.../system/tools/aidl/aidl_language_l.cpp
ninja: build stopped: subcommand failed.
14:03:54 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
There is the log when I built android-8.0.0_r17 on high sierra:
There is the log when I built android-8.0.0_r17 on high sierra:
I have tried building but failed too. I get stuck because there is an issue with libcxx cstdlib.h and other header files clashing with xcode build tools header files.
The fix is available on AOSP gerrit. see https://android-review.googlesource.com/c/platform/external/bison/+/517740
On Sunday, October 15, 2017 at 8:52:24 PM UTC-4, Hunter Aaron wrote:
Patch bison fix for High Sierra and build bison:
cd /Volumes/AOSP/external/bison
git cherry-pick c0c852bd6fe462b148475476d9124fd740eba160
mm
Replace prebuilt bison binary with patched binary
cp /Volumes/AOSP/out/host/darwin-x86/bin/bison /Volumes/AOSP/prebuilts/misc/darwin-x86/bison/
Patch bison fix for High Sierra and build bison:
cd /Volumes/AOSP/external/bison
git cherry-pick c0c852bd6fe462b148475476d9124fd740eba160
make bison
Replace prebuilt bison binary with patched binary
cp /Volumes/AOSP/out/host/darwin-x86/bin/bison /Volumes/AOSP/prebuilts/misc/darwin-x86/bison/
AOSP $ head -4876 /Volumes/REPO/AOSP/external/bison/lib/vasnprintf.c | tail -4
# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';
FAILED: out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h
BISON_PKGDATADIR=external/bison/data prebuilts/misc/darwin-x86/bison/bison -d --defines=out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h -o out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp frameworks/compile/mclinker/lib/Script/ScriptParser.yy
[ 0% 553/67107] //external/protobuf:libprotobuf-cpp-lite clang++ src/google/protobuf/extension_set.cc [darwin]
ninja: build stopped: subcommand failed.
11:11:13 ninja failed with: exit status 1
#### failed to build some targets (31 seconds) ###