在Mac OSX中构建AOSP主分支失败

时间:2014-10-30 16:29:25

标签: android makefile android-source

我正在尝试构建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

有人对此有任何想法吗?在哪里&#34;新&#34;文件应该出现?我该如何解决这个问题?任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

我认为是一个铿锵的错误。 clang不需要.h标题扩展名。我不打赌我的生活,但我会建议你更新你的主机clang到最新或更新的版本。这绝对是一个主机问题。我以前见过它,但不记得所有,加上我在Ubuntu上并且没有建立AOSP。我确实看到最近的更改已添加-Werror现在进入系统/核心,因此尝试执行主机clang更新...即使您已经拥有该文件,更新也可以修复HOST包含路径。

还有一个想法。尝试:echo $(HOST_TOOLCHAIN_ROOT) 如果你没有获得一个位置,你可能会有一个太新的铿锵...我的理由/参考:

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

# 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)
相关问题