20230318解决编译友善之臂的RK3399的Android7.1.2的ninja_wrapper出错
2023/3/18 9:08
1、刚开始编译就出现ninja_wrapper出错:export LC_ALL=C
including ./vendor/rockchip/common/vpu/Android.mk ...
PRODUCT_COPY_FILES device/rockchip/common/init.rk30board.usb.rc:root/init.rk30board.usb.rc ignored.
PRODUCT_COPY_FILES device/rockchip/common/fstab.rk30board.bootmode.unknown:root/fstab.rk30board.bootmode.unknown ignored.
PRODUCT_COPY_FILES device/rockchip/common/fstab.rk30board.bootmode.emmc:root/fstab.rk30board.bootmode.emmc ignored.
PRODUCT_COPY_FILES vendor/rockchip/common/nand/modules/arm/rk30xxnand_ko.ko.3.10.0:root/rk30xxnand_ko.ko ignored.
PRODUCT_COPY_FILES vendor/rockchip/common/nand/modules/arm/drmboot.ko:root/drmboot.ko ignored.
PRODUCT_COPY_FILES device/rockchip/common/public.libraries.vendor.txt:system/vendor/etc/public.libraries.txt ignored.
No private recovery resources for TARGET_DEVICE rk3399
build/core/base_rules.mk:341: warning: overriding commands for target `out/target/product/rk3399/system/etc/init/bluetoothtbd.rc'
build/core/base_rules.mk:341: warning: ignoring old commands for target `out/target/product/rk3399/system/etc/init/bluetoothtbd.rc'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/rk3399/system/xbin/io'
build/core/base_rules.mk:319: warning: ignoring old commands for target `out/target/product/rk3399/system/xbin/io'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/rk3399/system/lib/libjpeghwenc.so'
build/core/base_rules.mk:319: warning: ignoring old commands for target `out/target/product/rk3399/system/lib/libjpeghwenc.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/rk3399/system/lib/libjpeghwdec.so'
build/core/base_rules.mk:319: warning: ignoring old commands for target `out/target/product/rk3399/system/lib/libjpeghwdec.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/rk3399/system/lib64/libjpeghwenc.so'
build/core/base_rules.mk:319: warning: ignoring old commands for target `out/target/product/rk3399/system/lib64/libjpeghwenc.so'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/rk3399/system/lib64/libjpeghwdec.so'
build/core/base_rules.mk:319: warning: ignoring old commands for target `out/target/product/rk3399/system/lib64/libjpeghwdec.so'
Starting build with ninja
ninja: Entering directory `.'
[ 0% 158/50916] host Java: tagsouplib (out/host/common/obj/JAVA_LIBRARIES/tagsouplib_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 159/50916] 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.
Aborted (core dumped)
[ 0% 159/50916] build out/target/common/obj/all-event-log-tags.txt
system/bt/hci/../EventLogTags.logtags:36: warning: tag "bt_hci_timeout" (1010000) duplicated in system/bt/btif/../EventLogTags.logtags:36
system/bt/hci/../EventLogTags.logtags:37: warning: tag "bt_config_source" (1010001) duplicated in system/bt/btif/../EventLogTags.logtags:37
system/bt/hci/../EventLogTags.logtags:38: warning: tag "bt_hci_unknown_type" (1010002) duplicated in system/bt/btif/../EventLogTags.logtags:38
[ 0% 159/50916] host Java: antlr-runtime (out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 159/50916] target Java: core-all (out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (43 seconds) ####
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$ export LC_ALL=C
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$ make -j36
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=rk3399_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-144-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NHG47K
OUT_DIR=out
============================================
Running kati to generate build-rk3399_64.ninja...
$(shell cd libcore && ls -d */src/test/{java,resources} 2> /dev/null) was changed, regenerating...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=rk3399_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
2、编译2/3之后出错,我这里碰到的是出现了config.properties的权限问题:
把文件$HOME/.jack-server/config.properties的权限由rwx改为rw即可解决问题
Starting build with ninja
ninja: Entering directory `.'
[ 3% 68/1758] target R.java/Manifest.java: LiveTv (out/target/common/obj/APPS/LiveTv_intermediates/src/R.stamp)
warning: string 'title_br_tv_10' has no default translation.
warning: string 'title_br_tv_12' has no default translation.
warning: string 'title_br_tv_14' has no default translation.
warning: string 'title_br_tv_16' has no default translation.
warning: string 'title_br_tv_18' has no default translation.
warning: string 'title_br_tv_l' has no default translation.
warning: string 'title_kr_tv_12' has no default translation.
warning: string 'title_kr_tv_15' has no default translation.
warning: string 'title_kr_tv_19' has no default translation.
warning: string 'title_kr_tv_7' has no default translation.
warning: string 'title_kr_tv_all' has no default translation.
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
[ 3% 68/1758] Ensure Jack server is installed and started
FAILED: /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 2>&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.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.36.CANDIDATE.jar 3.36.CANDIDATE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.7.BETA.jar 4.7.BETA || exit 47 )"
Jack server already installed in "/home/rootroot/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/rootroot/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
#### make failed to build some targets (05:27 (mm:ss)) ####
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$ cd -
/home/rootroot/rk3399-nougat/prebuilts/sdk/tools
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ ll
total 10048
drwxrwxr-x 8 rootroot rootroot 4096 Mar 17 15:43 ./
drwxrwxr-x 35 rootroot rootroot 4096 Mar 17 15:43 ../
-rw-rw-r-- 1 rootroot rootroot 9363 Mar 17 15:43 Android.mk
-rw-rw-r-- 1 rootroot rootroot 4329 Mar 17 15:43 README-jack-code-coverage.md
-rw-rw-r-- 1 rootroot rootroot 6876 Mar 17 15:43 README-jack-server.md
drwxrwxr-x 5 rootroot rootroot 4096 Mar 17 15:43 darwin/
-rwxrwxr-x 1 rootroot rootroot 2577 Mar 17 15:43 dx*
-rwxrwxr-x 1 rootroot rootroot 4864 Mar 17 15:43 jack*
-rwxrwxr-x 1 rootroot rootroot 18068 Mar 17 15:43 jack-admin*
-rw-rw-r-- 1 rootroot rootroot 3764 Mar 17 15:43 jack-annotations.jar
-rw-rw-r-- 1 rootroot rootroot 47162 Mar 17 15:43 jack-coverage-plugin.jar
-rwxrwxrwx 1 rootroot rootroot 4159 Mar 17 15:43 jack-diagnose*
-rw-rw-r-- 1 rootroot rootroot 968018 Mar 17 15:43 jack-jacoco-reporter.jar
-rw-rw-r-- 1 rootroot rootroot 4378061 Mar 17 15:43 jack-launcher.jar
-rw-rw-r-- 1 rootroot rootroot 4758810 Mar 17 15:43 jack-server-4.8.ALPHA.jar
-rw-rw-r-- 1 rootroot rootroot 804 Mar 17 15:43 jack_for_module.mk
-rw-rw-r-- 1 rootroot rootroot 2476 Mar 17 15:43 jack_server_setup.mk
-rw-rw-r-- 1 rootroot rootroot 1278 Mar 17 15:43 jack_versions.mk
drwxrwxr-x 2 rootroot rootroot 4096 Mar 17 15:43 jacks/
drwxrwxr-x 2 rootroot rootroot 4096 Mar 17 15:43 jills/
drwxrwxr-x 2 rootroot rootroot 4096 Mar 17 15:43 lib/
drwxrwxr-x 5 rootroot rootroot 4096 Mar 17 15:43 linux/
-rwxrwxr-x 1 rootroot rootroot 4144 Mar 17 15:43 mainDexClasses*
-rw-rw-r-- 1 rootroot rootroot 885 Mar 17 15:43 mainDexClasses.rules
drwxrwxr-x 3 rootroot rootroot 4096 Mar 17 15:43 windows/
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ ./jack-admin start-server
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/rootroot/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ curl -v
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ curl -V
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ ./jack-admin start-server
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/rootroot/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ ./jack-admin start-server
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/rootroot/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat/prebuilts/sdk/tools$ cd ../../..
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$
rootroot@rootroot-X99-Turbo:~/rk3399-nougat$ make -j36
./jack-admin start-server
参开资料:
http://www.atmcu.com/2313.html
jack-server导致 Android 编译 出现异常
删除/etc/java-8-openjdk/security/java.security 文件里jdk.tls.disabledAlgorithms 的 TLSv1, TLSv1.1
https://blog.csdn.net/m0_58241002/article/details/125912231
build/core/ninja.mk:148: recipe for target ‘ninja_wrapper‘ failed
方法:权限由rwx改为rw即可解决问题
https://blog.csdn.net/lizekun2010/article/details/52535591
Android7.0 JACK编译器不支持多用户同时编译的问题的解决
通过查看文件 $HOME/.jack-server/logs/jack-server-0-0.log:
https://www.bbsmax.com/A/WpdKGMv1dV/
Android:JACK编译错误汇总及解决
解决方案:通过查看文件 $HOME/.jack-server/logs/jack-server-0-0.log:
发现是配置文件的权限不对造成的,把文件$HOME/.jack-server/config.properties的权限由rwx改为rw即可解决问题。
【更改端口号】
https://blog.csdn.net/yanqing114/article/details/116354922
Android7.1编译时jack-server不工作
https://blog.csdn.net/Obj9527/article/details/83542577
编译Android 7.1.1源码错误:make: *** [ninja_wrapper] Error 1
3、查看端口是否被占用
可以通过运行 netstat -apnt | grep 80命令查看 TCP 80端口占用情况
https://blog.csdn.net/rookie_wei/article/details/87428820
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
https://www.jianshu.com/p/c3bb9d86fd22
Ubuntu 18.04 编译 AOSP 问题总结
export LC_ALL=C
【可能无关】
https://blog.csdn.net/touxiong/article/details/86233805
编译错误-build stopped: subcommand failed. 解决方法
https://blog.csdn.net/qq_21445563/article/details/92579599
Ubuntu 编译报错 ninja: build stopped: subcommand failed.
https://blog.csdn.net/phu0712/article/details/78655427
启动 jack server 出现 Could not find or load main class com.android.jack.launcher.ServerLauncher的问题
https://blog.csdn.net/linpuliang/article/details/123667437
make -j20 出现以下报错: Ensure Jack server is installed and started
https://blog.csdn.net/yetaibing1990/article/details/84941124
JACK报错(Ensure Jack server is installed and started)&多用户编译
【可能无关】
https://blog.csdn.net/zjy764219923/article/details/105612760
编译报错:build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed