[问答]请问小熊派micro编译到toybox失败怎么解决?

阅读量0
0
0

拉取版本:OHOS beta3.2。

hb set选择bearpi_hm_micro

执行hb build -t notest --tee -f

编译到toybox时失败:

generated/flags.h scripts/make.sh: line 197: arm_none_eabi-ccache: command not found

这个工具是不存在的,应该是交叉编译参数和CC传入错误,但是目前不晓得怎么改。

具体log如下:

[OHOS INFO] [2506/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sinf.o
[OHOS INFO] [2507/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sinh.o
[OHOS INFO] [2508/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sinhf.o
[OHOS INFO] [2509/3905] ACTION //kernel/liteos_a/apps/toybox:build_toybox(//build/lite/toolchain:linux_x86_64_ohos_clang)
[OHOS INFO] [2510/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sincos.o
[OHOS INFO] [2511/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sinhl.o
[OHOS INFO] [2512/3905] clang obj/third_party/musl/porting/liteos_a/kernel/src/math/musl.sinl.o
[OHOS INFO] [2513/3905] ACTION //kernel/liteos_a/apps/mksh:build_mksh(//build/lite/toolchain:linux_x86_64_ohos_clang)
[OHOS INFO] [2514/3905] ACTION //kernel/liteos_a:make(//build/lite/toolchain:linux_x86_64_ohos_clang)
[OHOS ERROR] [2509/3905] ACTION //kernel/liteos_a/apps/toybox:build_toybox(//build/lite/toolchain:linux_x86_64_ohos_clang)
[OHOS ERROR] FAILED: obj/kernel/liteos_a/apps/toybox/build_toybox_build_ext_components.txt unstripped/bin/toybox bin/toybox
[OHOS ERROR] /home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/prebuilts/python/linux-x86/3.9.2/bin/python3 ../../../build/lite/build_ext_components.py --path=/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/obj/kernel/liteos_a/apps/toybox/toybox_build --command=rm\ -rf\ .git\ \&\&\ cp\ -rfp\ porting/liteos_a/.\ .\ \&\&\ env\ CC=\"ccache\ /home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang\"\ STRIP=\"ccache\ /home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-strip\ --strip-unneeded\"\ OUTNAME=toybox\ CFLAGS=\"-fstack-protector-strong\ -D_FORTIFY_SOURCE=2\ -mfloat-abi=softfp\ -mfpu=neon-vfpv4\ -mcpu=cortex-a7\ --target=arm-liteos-ohos\ --sysroot=/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/sysroot\"\ make\ toybox\ \&\&\ install\ -D\ toybox\ ../../../../../../bin/toybox\ \&\&\ install\ -D\ generated/unstripped/toybox\ ../../../../../../unstripped/bin/toybox --target_dir=/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/obj/kernel/liteos_a/apps/toybox/build.log --out_dir=/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/error.log
[OHOS ERROR] scripts/genconfig.sh
[OHOS ERROR] make[1]: Entering directory '/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/obj/kernel/liteos_a/apps/toybox/toybox_build'
[OHOS ERROR] cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
[OHOS ERROR]    -DPROJECT_NAME=\"ToyBox\"
[OHOS ERROR] In file included from kconfig/zconf.tab.c:2340:
[OHOS ERROR] kconfig/confdata.c: In function ‘conf_write’:
[OHOS ERROR] kconfig/confdata.c:435:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 128 [-Wformat-overflow=]
[OHOS ERROR]   435 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
[OHOS ERROR]       |                    ^~~~~~~~~~~~~~~~~
[OHOS ERROR] kconfig/confdata.c:435:3: note: ‘sprintf’ output between 13 and 150 bytes into a destination of size 128
[OHOS ERROR]   435 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
[OHOS ERROR]       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[OHOS ERROR] kconfig/conf -D /home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/obj/kernel/liteos_a/apps/toybox/toybox_build/../liteos_a_custom.config Config.in > /dev/null
[OHOS ERROR] make[1]: Leaving directory '/home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/obj/kernel/liteos_a/apps/toybox/toybox_build'
[OHOS ERROR] scripts/make.sh
[OHOS ERROR] Generate headers from toys/*/*.c...
[OHOS ERROR] Library probe...........
[OHOS ERROR] Make generated/config.h from .config.
[OHOS ERROR] generated/flags.h scripts/make.sh: line 197: arm_none_eabi-ccache: command not found
[OHOS ERROR] scripts/make.sh: line 197: arm_none_eabi-ccache: command not found
[OHOS ERROR] make: *** [Makefile:19: toybox] Error 1
[OHOS ERROR] cmd:rm -rf .git
[OHOS ERROR] cost time:0:00:00
[OHOS ERROR] cmd: cp -rfp porting/liteos_a/. .
[OHOS ERROR] cost time:0:00:00
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct)  : 4410
[OHOS INFO] cache hit (preprocessed)  : 33
[OHOS INFO] cache miss  : 9
[OHOS INFO] hit rate:  99.80%
[OHOS INFO] mis rate: 0.20%
[OHOS INFO] ---------------------------------------------
[OHOS INFO] c targets overlap rate statistics
[OHOS INFO] subsystem           files NO.       percentage      builds NO.      percentage      overlap rate
[OHOS INFO] aafwk                     67        2.2%          67        2.2%    1.00
[OHOS INFO] ability                   67        2.2%          67        2.2%    1.00
[OHOS INFO] ai                        39        1.3%          39        1.3%    1.00
[OHOS INFO] arkui                    108        3.5%         108        3.5%    1.00
[OHOS INFO] bundlemanager             38        1.2%          38        1.2%    1.00
[OHOS INFO] commonlibrary              8        0.3%           8        0.3%    1.00
[OHOS INFO] communication            125        4.1%         125        4.1%    1.00
[OHOS INFO] distributeddatamgr         2        0.1%           2        0.1%    1.00
[OHOS INFO] global                    27        0.9%          27        0.9%    1.00
[OHOS INFO] graphic                  288        9.4%         288        9.4%    1.00
[OHOS INFO] hdf                      286        9.3%         286        9.3%    1.00
[OHOS INFO] hiviewdfx                 13        0.4%          13        0.4%    1.00
[OHOS INFO] kernel                  1308        42.5%       1308        42.5%   1.00
[OHOS INFO] multimedia                19        0.6%          19        0.6%    1.00
[OHOS INFO] powermgr                  25        0.8%          25        0.8%    1.00
[OHOS INFO] security                 233        7.6%         233        7.6%    1.00
[OHOS INFO] startup                   73        2.4%          73        2.4%    1.00
[OHOS INFO] systemabilitymgr          25        0.8%          25        0.8%    1.00
[OHOS INFO] third_party              355        11.5%        355        11.5%   1.00
[OHOS INFO] thirdparty               355        11.5%        355        11.5%   1.00
[OHOS INFO]
[OHOS INFO] c overall build overlap rate: 1.00
[OHOS INFO]
[OHOS INFO]
[OHOS ERROR] Please check build log in /home/jamie/work/openharmony/code-v3.2-Beta3/OpenHarmony/out/bearpi_hm_micro/bearpi_hm_micro/build.log
jamie@lzm-vm-linux:~/work/openharmony/code-v3.2-Beta3/OpenHarmony$

小弟刚接触OHOS,请多多指教。

回帖

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容图片侵权或者其他问题,请联系本站作侵删。 侵权投诉
链接复制成功,分享给好友