我正在尝试使用MacOS SDK版本10.11在OSX El Capitan上构建AOSP的Lollipop-cts-dev分支。我遇到了不同设置的不同构建问题。目前我收到以下错误:
system/core/include/log/log.h:35:20: error: stdarg.h: No such file or directory
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Keyboard.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/InputDevice.o] Error 1
make: *** [out/host/darwin-x86/obj32/STATIC_LIBRARIES/libinput_intermediates/Input.o] Error 1
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
#### make failed to build some targets (03:58 (mm:ss)) ####
我的猜测是,这是因为AOSP代码库的OSX SDK版本不兼容。更具体地说,如要求中所述 https://source.android.com/source/requirements.html Android 5.x(Lollipop)需要Mac OS v10.8(Mountain Lion)。
有人可以证实吗?有没有直接的方法在El Capitan上建造Lollipop?
答案 0 :(得分:1)
我不确定这是否有帮助,但您可以在build/core/combo/HOST_darwin-x86.mk
中找到以下代码:
ifeq ($(mac_sdk_version),10.8)
host_toolchain_header := $(HOST_TOOLCHAIN_ROOT)/lib/gcc/i686-apple-darwin$(gcc_darwin_version)/4.2.1/include
HOST_GLOBAL_CFLAGS += -isystem $(host_toolchain_header)
endif
else
将10.8
修改为10.11
可能会解决问题。
解决方案来源(以简体中文编写):
http://www.liball.me/mac-10-10-build-android-4-4-4-for-nexus/