I have resolved the problem by downloading bison 2.7 source codes from 
bision website, compiling it and replace 
prebuilds/misc/darwin-x86/bison/bison by the output.

在 2018年1月7日星期日 UTC+8上午9:06:24,ilias koletsis写道:
>
> Hi, I am newbie in AOSP and I am trying to follow *the book of Roger Ye 
> "Android System Programming"*.
>
> *I use a MacBook pro with 2,5GHz Intel Core i7, 16GB RAM, 500GB hard 
> disk. *
> *Recently I've upgraded to macOS High Sierra and XCode 9  *
>
> Following the book's instructions, I've downloaded android-7.1.1_r4 using 
> repo and synced it successfully. 
> When it's time to build I fail with message"
>
> *FAILED:* /bin/bash -c "prebuilts/misc/darwin-x86/bison/bison -d  
> --defines=out/host/darwin-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h
>  
> -o 
> out/host/darwin-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp
>  
> system/tools/aidl/aidl_language_y.yy"
>
> /bin/bash: prebuilts/misc/darwin-x86/bison/bison: No such file or directory
>
> [  0% 19/33193] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
>
> ninja: build stopped: subcommand failed.
>
> make: *** [ninja_wrapper] Error 1
>
>
> #### make failed to build some targets (36 seconds) ####
>
>
> I tried to follow the instructions of other threads in Google Groups about 
> the same issue. 
>
> For example some guys suggested to *"export USE_NINJA=false"* then I 
> encounter several errors like:
>
>
> *external/libcxx/include/cmath error **declaration conflicts with target 
> of using declaration already in scope*
>
> *fatal error: *too many errors emitted, stopping now [-ferror-limit=]
>
> 20 errors generated.
>
> ninja: build stopped: subcommand failed.
>
> make: *** [ninja_wrapper] Error 1
>
>
> #### make failed to build some targets (35 seconds) ####
>
> Other people suggest this steps:
>
>
> Patch bison fix 
> <https://android-review.googlesource.com/c/platform/external/bison/+/517740> 
> 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/
>
>
> then I tried to build and I get the 1st error mentioned above. 
>
> Any suggestions? do I miss something in the precess?
>  
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to