【问题描述】:
部分服务器编译Android7.1代码时报错信息如下:
[ 0% 45/71149] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
【解决方案】:
在~/.bashrc最后添加:export LC_ALL=C
然后 source ~/.bashrc
添加export LC_ALL=C是去除本地C化,使得Android的编译工具与本地工具不冲突。