Build Android failed(Ubuntu 18.04)


I followed the instruction step by step ,built the u-boot succesfully,but finally i met this problem :

[ 0% 76/48894] Lex: checkpolicy <= ex…l/selinux/libsepol/cil/src/cil_lexer.l
FAILED: /bin/bash -c “prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/STATIC_LIBRARIES/libsepol_intermediates/cil/src/cil_lexer.c external/selinux/libsepol/cil/src/cil_lexer.l”
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. Aborted (core dumped) [ 0% 76/48894] Lex: checkpolicy <= ex...rnal/selinux/checkpolicy/policy_scan.l FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/host/linux-x86/obj/EXECUTABLES/checkpolicy_intermediates/policy_scan.c external/selinux/checkpolicy/policy_scan.l" flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertioncnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))’ failed.
Aborted (core dumped)
[ 0% 76/48894] build out/target/produ…ETC/sepolicy_intermediates/policy.conf
m4: device/khadas/common/sepolicy/accelerateboot.te: 9: deprecated: unix_socket_connect(accelerateboot, property, init) Please use set_prop(accelerateboot, ) instead.
m4: device/khadas/common/sepolicy/bootvideo.te: 5: deprecated: unix_socket_connect(bootvideo, property, init) Please use set_prop(bootvideo, ) instead.
m4: device/khadas/common/sepolicy/system_control.te: 23: deprecated: unix_socket_connect(system_control, property, init) Please use set_prop(system_control, ) instead.

Actually I have already installed libsepol1.Does someone meet this problem before ,just give me some help



Can you provide the all compile informations for me?



Thanks .Finally , i solved this problem by changing the Ubuntu version, i used 18.04 before,but i switch to 16.04 as instruction suggested and the problem is gone.