请问小熊派micro编译到toybox失败怎么解决? - HarmonyOS技术社区 - 电子技术william hill官网 - 广受欢迎的专业电子william hill官网 - 威廉希尔官方网站
分享 收藏 返回

LZMHH 关注 私信

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

拉取版本: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,请多多指教。

回帖(1)

LZMHH

2022-11-30 09:56:43
答案在[华为开发者william hill官网 ](https://developer.huawei.com/con ... 0103702273237500027)发布了。
本来想在这里发布文本模式的,机器监测到文本有敏感字样(无语)。

更多回帖

×
发帖