• Lv0
    粉丝0

积分0 / 贡献0

提问1答案被采纳0文章0

作者动态

    编译master报OHOSException('ninja phase failed', '4000')

    yidianliuyun 显示全部楼层 发表于 2023-12-1 11:25:43
    【问题描述】
    master分支编译报错,OHOSException('ninja phase failed', '4000')
    编译命令:
    ./build/prebuilts_download.sh./build.sh --product-name rk3568 --ccache
    相关的代码,截图,日志信息

    FAILED: load BTF from vmlinux: Unknown error -22make[2]: *** [/home/maliang/oh-master/out/kernel/src_tmp/linux-5.10/Makefile:1236: vmlinux] Error 255
    make[1]: *** [arch/arm64/Makefile:208: rk3568-toybrick-x0-linux.img] Error 2
    make[1]: Leaving directory '/home/maliang/oh-master/out/kernel/OBJ/linux-5.10'
    make: *** [Makefile:192: __sub-make] Error 2
    ninja: build stopped: subcommand failed.
    [OHOS ERROR] Traceback (most recent call last):
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/services/ninja.py", line 70, in _execute_ninja_cmd
    [OHOS ERROR]     SystemUtil.exec_command(
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/util/system_util.py", line 64, in exec_command
    [OHOS ERROR]     raise OHOSException(
    [OHOS ERROR] exceptions.ohos_exception.OHOSException: Please check build log in /home/maliang/oh-master/out/rk3568/build.log
    [OHOS ERROR]
    [OHOS ERROR] During handling of the above exception, another exception occurred:
    [OHOS ERROR]
    [OHOS ERROR] Traceback (most recent call last):
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/containers/status.py", line 47, in wrapper
    [OHOS ERROR]     return func(*args, **kwargs)
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/modules/ohos_build_module.py", line 67, in run
    [OHOS ERROR]     raise exception
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/modules/ohos_build_module.py", line 65, in run
    [OHOS ERROR]     super().run()
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/modules/interface/build_module_interface.py", line 72, in run
    [OHOS ERROR]     raise exception
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/modules/interface/build_module_interface.py", line 70, in run
    [OHOS ERROR]     self._target_compilation()
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation
    [OHOS ERROR]     self.target_compiler.run()
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/services/ninja.py", line 38, in run
    [OHOS ERROR]     self._execute_ninja_cmd()
    [OHOS ERROR]   File "/home/maliang/oh-master/build/hb/services/ninja.py", line 77, in _execute_ninja_cmd
    [OHOS ERROR]     raise OHOSException('ninja phase failed', '4000')
    [OHOS ERROR] exceptions.ohos_exception.OHOSException: ninja phase failed
    [OHOS ERROR]
    [OHOS ERROR] Code:      4000
    [OHOS ERROR]
    [OHOS ERROR] Reason:    ninja phase failed


    我尝试过的解决方法和结果
    (1)补充了各个博客和文章提到的依赖,没有解决问题。

    我想要达到的结果
    编译通过

    【运行环境】
    硬件:Windows 10, WSL2(Ubuntu 20.04)

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论1

    dragon

    沙发 发表于 2023-12-1 11:52:01

    编译master报OHOSException('ninja phase failed', '4000')

    master分支不要轻易编译,我给你看一个官方 每日构建 失败的issue单:




    编译master分支,先看官方今天能否编译成功。




    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部