在Mac OSX中生成AOSP主分支失败



我正在尝试构建AOSP的主分支,但它失败了,并出现以下错误:

host C++: validatekeymaps <= frameworks/base/tools/validatekeymaps/Main.cpp
In file included from frameworks/base/tools/validatekeymaps/Main.cpp:17:
In file included from frameworks/native/include/input/KeyCharacterMap.h:26:
In file included from frameworks/native/include/input/Input.h:25:
system/core/include/utils/Vector.h:20:10: fatal error: 'new' file not found
#include <new>
         ^
1 error generated.
make: *** [out/host/darwin-x86/obj/EXECUTABLES/validatekeymaps_intermediates/Main.o] Error 1

有人知道这件事吗?"新"文件应该出现在哪里?我该如何解决这个问题?如有任何帮助,我们将不胜感激。

我认为这是一个clang错误。clang不需要.h头扩展。我不会把我的生命押在它上,但我建议将你的主机clang更新到最新或更新的版本。这绝对是主机的问题。我以前看过,但不记得了,加上我在Ubuntu上,不构建AOSP。我确实看到最近的一个更改将-Werror添加到系统/核心中,所以请尝试进行主机clang更新。。。即使您已经拥有该文件,更新也可能修复HOST包含路径。

再想想。尝试:echo$(HOST_TOOLCHAIN_ROOT)如果你没有找到一个位置,你可能会有一个太新的叮当声。。。我的理由/参考:

https://android.googlesource.com/platform/build/+/master/core/combo/HOST_darwin-x86_64mk:

# gcc location for clang; to be updated when clang is updated
# HOST_TOOLCHAIN_ROOT is a Darwin-specific define
HOST_TOOLCHAIN_FOR_CLANG := $(HOST_TOOLCHAIN_ROOT)

最新更新