为旗鱼 (AOSP) 问题构建 android CopperheadOS

Posted

技术标签:

【中文标题】为旗鱼 (AOSP) 问题构建 android CopperheadOS【英文标题】:Build android CopperheadOS for sailfish (AOSP) issue 【发布时间】:2017-06-18 21:23:24 【问题描述】:

我无法构建源代码树

制作目标文件包-j20

结果:

Starting build with ninja
ninja: Entering directory `.'
[  0% 5/42089] build out/target/product/marlin/obj/ETC/file_contexts.bin_intermediates/file_contexts.local.tmp
FAILED: /bin/bash -c "m4 -s system/sepolicy/file_contexts out/target/product/marlin/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl > out/target/product/marlin/obj/ETC/file_contexts.bin_intermediates/file_contexts.local.tmp"
/bin/bash: m4: command not found
[  0% 5/42089] build out/target/product/marlin/obj/ETC/file_contexts.bin_intermediates/file_contexts.device.tmp
FAILED: /bin/bash -c "m4 -s  device/google/marlin/sepolicy/file_contexts out/target/product/marlin/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl > out/target/product/marlin/obj/ETC/file_contexts.bin_intermediates/file_contexts.device.tmp"
/bin/bash: m4: command not found
[  0% 5/42089] Lex: checkpolicy <= external/selinux/libsepol/cil/src/cil_lexer.l
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libsepol_intermediates/cil/src/cil_lexer.c external/selinux/libsepol/cil/src/cil_lexer.l"
flex-2.5.39: fatal internal error, exec of /usr/bin/m4 failed
[  0% 5/42089] host Executable: mkbootfs (out/host/linux-x86/obj/EXECUTABLES/mkbootfs_intermediates/mkbootfs)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

【问题讨论】:

【参考方案1】:

您的系统上似乎没有安装 m4。如果您运行的是 Ubuntu,请执行以下命令:

sudo apt-get install m4

【讨论】:

以上是关于为旗鱼 (AOSP) 问题构建 android CopperheadOS的主要内容,如果未能解决你的问题,请参考以下文章

构建错误索尼 Togari android Aosp

AOSP 使用 jni 库构建应用程序

使用 AOSP 树构建 Android 6 消息传递应用程序

为 Dragonboard(Ubuntu 16.04)构建 Android 开源项目(AOSP)时“构建某些目标失败”

Android AOSP 构建所用的总时间

旗鱼移动Android开发规范