这两天搭建android8.1编译环境,起build发现的编译问题及解决方法:
报错如下
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? 'cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' ???
Aborted (core dumped)
[ 4% 4832/99272] target C++: libapplypatch <= bootable/recovery/applypatch/bspatch.cpp
解决方法:
在~/.bashrc最后添加export LC_ALL=C
如下
108 # enable programmable completion features (you don't need to enable
109 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
110 # sources /etc/bash.bashrc).
111 if ! shopt -oq posix; then
112 if [ -f /usr/share/bash-completion/bash_completion ]; then
113 . /usr/share/bash-completion/bash_completion
114 elif [ -f /etc/bash_completion ]; then
115 . /etc/bash_completion
116 fi
117 fi
118
119 export LC_ALL=C
然后执行source ~/.bashrc
重新编译即可。