OpenHarmony开发者论坛

标题: 使用 sudo ./build.sh -p rk3568 -t arm64 --ccache--no-prebuilt-sdk 不能编译成功,报错如下: [打印本页]

作者: zyxzyx    时间: 6 天前
标题: 使用 sudo ./build.sh -p rk3568 -t arm64 --ccache--no-prebuilt-sdk 不能编译成功,报错如下:
[md]使用./build.sh -p rk3568 -t arm64 --ccache报错:

[OHOS ERROR] Code: 4000
[OHOS ERROR]
[OHOS ERROR] Reason: COMPILE Failed! Please check error in /home/zhang/Desktop/master\_code/out/sdk/error.log, and for more build information in /home/zhang/Desktop/master\_code/out/sdk/build.log
[OHOS ERROR]
[OHOS ERROR] Error Type: Ninja build error
[OHOS ERROR]
[OHOS ERROR] Description: An unknown error occurred while executing 'ninja -C'.
[OHOS ERROR]
[OHOS ERROR] Solution: no solution
[OHOS ERROR]
[OHOS ERROR] ohos-sdk build failed! You can try to use '--no-prebuilt-sdk' to skip the build of ohos-sdk.

按着提示加入'--no-prebuilt-sdk'后使用 sudo ./build.sh -p rk3568 -t arm64 --ccache--no-prebuilt-sdk 依旧不能编译成功,报错如下:

[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR] return func(\*args, \*\*kwargs)
[OHOS ERROR] ^^^^^^^^^^^^^^^^^^^^^
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/ohos\_build\_module.py", line 70, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/ohos\_build\_module.py", line 67, in run
[OHOS ERROR] super().run()
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/interface/build\_module\_interface.py", line 70, in run
[OHOS ERROR] raise exception
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/interface/build\_module\_interface.py", line 68, in run
[OHOS ERROR] self.\_ninja()
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/util/timer\_util.py", line 30, in inner
[OHOS ERROR] res = func(\*arg, \*\*kwarg)
[OHOS ERROR] ^^^^^^^^^^^^^^^^^^^
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/interface/build\_module\_interface.py", line 125, in \_ninja
[OHOS ERROR] self.\_target\_compilation()
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/modules/ohos\_build\_module.py", line 105, in \_target\_compilation
[OHOS ERROR] self.target\_compiler.run()
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR] self.\_execute\_ninja\_cmd()
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/services/ninja.py", line 69, in \_execute\_ninja\_cmd
[OHOS ERROR] SystemUtil.exec\_command(
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/util/system\_util.py", line 77, in exec\_command
[OHOS ERROR] LogUtil.get\_failed\_log(log\_path)
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/util/log\_util.py", line 192, in get\_failed\_log
[OHOS ERROR] LogUtil.get\_ninja\_failed\_log(log\_path)
[OHOS ERROR] File "/home/zhang/Desktop/master\_code/build/hb/util/log\_util.py", line 157, in get\_ninja\_failed\_log
[OHOS ERROR] raise OHOSException(
[OHOS ERROR] exceptions.ohos\_exception.OHOSException: NINJA Failed! Please check error in /home/zhang/Desktop/master\_code/out/rk3568/error.log, and for more build information in /home/zhang/Desktop/master\_code/out/rk3568/build.log
[OHOS ERROR]

[OHOS ERROR] Code: 4016
[OHOS ERROR]
[OHOS ERROR] Reason: NINJA Failed! Please check error in /home/zhang/Desktop/master\_code/out/rk3568/error.log, and for more build information in /home/zhang/Desktop/master\_code/out/rk3568/build.log
[OHOS ERROR]
[OHOS ERROR] Error Type: ninja build error: missing and no known rule to make it
[OHOS ERROR]
[OHOS ERROR] Description: Ninja build error. The ninja build system cannot find the target.
[OHOS ERROR]
[OHOS ERROR] Solution: Please check the target file is exists.
[OHOS ERROR]
=====build error=====

### 【运行环境】

ubuntu20.04
[/md]
作者: Hazel    时间: 5 天前
sudo ./build.sh -p rk3568 --target-cpu arm64 --ccache --no-prebuilt-sdk 这个试试呢




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5