AOSP在ssfilter.c上构建失败

时间:2017-10-19 11:35:10

标签: android linux ubuntu build android-source

我正在尝试在Ubuntu 17.04上构建AOSP。我正在阅读嵌入式Android手册中的教程。到目前为止一切都是正确的:

root@mh2-K55VD:/bin/repo_work_directory# make -j16
============================================
PLATFORM_VERSION_CODENAME=P
PLATFORM_VERSION=P
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-37-generic-x86_64-Ubuntu-17.04
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OC
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
[  0% 1/60175] Yacc: ss <= external/iproute2/misc/ssfilter.y
FAILED: out/target/product/generic/obj/EXECUTABLES/ss_intermediates/ssfilter.c 
/bin/bash -c "prebuilts/misc/linux-x86/bison/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: 31 conflitti shift/riduzione
prebuilts/misc/linux-x86/bison/bison: Sotto-processo m4 non riuscito: File o directory non esistente
[  0% 16/60175] target thumb C++: libvkjson <= external/vulkan-validation-layers/libs/vkjson/vkjson.cc
ninja: build stopped: subcommand failed.
13:24:39 ninja failed with: exit status 1

#### failed to build some targets (20 seconds) ####

我做错了什么?我该如何解决这个问题?请帮忙。提前谢谢。

1 个答案:

答案 0 :(得分:2)

不要编译master分支,因为它们经常破坏构建。切换到您要构建的AOSP的最新官方分支,例如oreo-release,然后重试。