gpt4 book ai didi

android - AOSP 构建错误 : EXECUTABLES/iw_intermediates/version. c

转载 作者:太空宇宙 更新时间:2023-11-03 13:46:29 24 4
gpt4 key购买 nike

我几天前制作了一个 AOSP build 7.1.1,它运行良好。今天我决定做一个干净的构建 (make clean) 并开始工作。之后,当我在一段时间后尝试通过 make otapackage 进行编译时,出现以下错误。

[ 44% 7552/17136] build out/target/product/hikari/gen/EXECUTABLES/iw_intermediates/version.c
FAILED: /bin/bash -c "external/iw/version.sh out/target/product/hikari/gen/EXECUTABLES/iw_intermediates/version.c"
fatal: No names found, cannot describe anything.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (01:39:34 (hh:mm:ss)) ####

每次都是一样的。有什么解决办法吗?

最佳答案

它在尝试检查 git 版本号时失败了。在 external/iw/version.sh 中,它在到达以下位置时失败:

descr=$(git describe --match=v*):

if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
git update-index --refresh --unmerged > /dev/null
descr=$(git describe --match=v*)
# on git builds check that the version number above
# is correct...
[ "${descr%%-*}" = "v$VERSION" ] || exit 2

v="${descr#v}"
if git diff-index --name-only HEAD | read dummy ; then
v="$v"-dirty
fi
else
v="$VERSION"
fi
echo '#include "iw.h"' > "$OUT"
echo "const char iw_version[] = \"$v\";" >> "$OUT"

我遇到了同样的问题,有两种方法可以解决:

  1. You can comment out everything except v="$VERSION" and the last two echo lines.But this is a temporary fix.

  2. Another way to solve this is by doing a repo sync before you execute make. I fixed it by simply doing a repo sync and that updated and fixed everything for me.

关于android - AOSP 构建错误 : EXECUTABLES/iw_intermediates/version. c,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41343267/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com