linux驱动学习(兼容安卓)|android编译报错(1)

错误日志1

[ 14% 4275/30484] Ensuring Jack server is installed and started FAILED: setup-jack-server /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )" Installing jack server in "/home/thundersoft/.jack-server"

【linux驱动学习(兼容安卓)|android编译报错(1)】方法一:
网上的方法是因为多人改变而导致,需要修改端口号:
vi ~/.jack-settings

linux驱动学习(兼容安卓)|android编译报错(1)
文章图片

vi ~/.jack-server/config.properties

linux驱动学习(兼容安卓)|android编译报错(1)
文章图片

把这两个端口改为一样的,但是我这里没有用,
方法二:
sudo vi /etc/java-8-openjdk/security/java.security

jdk.certpath.disabledAlgorithms=MD2, TLSv1, TLSv1.1, MD5, SHA1 jdkCA & usage TLSServer, \ RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \ include jdk.disabled.namedCurves

删除 TLSv1, TLSv1.1
然后重启服务:
./prebuilts/sdk/tools/jack-admin kill-server ./prebuilts/sdk/tools/jack-admin start-server

错误日志2
[2/2] bootstrap out/soong/.minibootstrap/build.ninja.in [1/1] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja [1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja No need to regenerate ninja file [100% 2/2] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja [ 50% 1/2] glob art [0% 13/7088] //system/tools/aidl:libaidl-common lex aidl_language_l.ll [linux] FAILED: out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_x86_64_static/gen/lex/system/tools/aidl/aidl_language_l.cpp prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/soong/.intermediates/system/tools/aidl/libaidl-common/linux_x86_64_static/gen/lex/system/tools/aidl/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll 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) [0% 30/7088] build out/target/product/wearableX/obj/kernel/msm-4.9/usr make: 进入目录“/home/thundersoft/HDD/project/Wear/LINUX/android/kernel/msm-4.9” make[1]: 进入目录“/home/thundersoft/HDD/project/Wear/LINUX/android/out/target/product/wearableX/obj/kernel/msm-4.9” GEN./Makefile # # configuration written to .config # make[1]: 离开目录“/home/thundersoft/HDD/project/Wear/LINUX/android/out/target/product/wearableX/obj/kernel/msm-4.9” make: 离开目录“/home/thundersoft/HDD/project/Wear/LINUX/android/kernel/msm-4.9” make: 进入目录“/home/thundersoft/HDD/project/Wear/LINUX/android/kernel/msm-4.9” make[1]: 进入目录“/home/thundersoft/HDD/project/Wear/LINUX/android/out/target/product/wearableX/obj/kernel/msm-4.9” CHKinclude/generated/uapi/linux/version.h make[1]: 离开目录“/home/thundersoft/HDD/project/Wear/LINUX/android/out/target/product/wearableX/obj/kernel/msm-4.9” make: 离开目录“/home/thundersoft/HDD/project/Wear/LINUX/android/kernel/msm-4.9” ninja: build stopped: subcommand failed. 10:54:54 ninja failed with: exit status 1#### failed to build some targets (26 seconds) ####

他的报错点:
FAILED: out/soong/.intermediates/system/tools/aidl/libaidl-common/linux_x86_64_static/gen/lex/system/tools/aidl/aidl_language_l.cpp

实际上主要的问题在:
[0% 13/7088] //system/tools/aidl:libaidl-common lex aidl_language_l.ll [linux]

百度后
修复方法:
执行下面的命令后再编译
export LC_ALL=C

    推荐阅读