[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 193, in get_failed_log
[OHOS ERROR] LogUtil.get_compiler_failed_log(log_path)
[OHOS ERROR] File "/home/zhang/Desktop/master_code/build/hb/util/log_util.py", line 180, in get_compiler_failed_log
[OHOS ERROR] raise OHOSException(
[OHOS ERROR] exceptions.ohos_exception.OHOSException: 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] 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.
[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]作者: Deng_tao2914 时间: 2024-12-20 10:48
为什么要加sudo?作者: zyxzyx 时间: 2024-12-20 14:10
回复 Deng_tao2914: 不加sudo有的没权限 作者: Deng_tao2914 时间: 2024-12-20 16:12
回复 zyxzyx: 不要用root用户去编译 所有操作都是在普通用户下完成作者: zyxzyx 时间: 2024-12-20 17:49
回复 Deng_tao2914: 还是一样的错误,
[OHOS INFO] The OHOS-SDK was not detected, so the SDK compilation will be prioritized automatically. You can also control whether to execute this process by using '--no-prebuilt-sdk' and '--prebuilt-sdk'.
[OHOS INFO] building the latest ohos-sdk...
Traceback (most recent call last):
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 47, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/build/hb/containers/arg.py", line 378, in read_args_file
IoUtil.copy_file(src=default_file_path, dst=args_file_path)
File "/home/zhang/Desktop/master_code/build/hb/util/io_util.py", line 74, in copy_file
return shutil.copy(src, dst)
^^^^^^^^^^^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/prebuilts/python/linux-x86/3.11.4/lib/python3.11/shutil.py", line 419, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/home/zhang/Desktop/master_code/prebuilts/python/linux-x86/3.11.4/lib/python3.11/shutil.py", line 258, in copyfile
with open(dst, 'wb') as fdst:
^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/zhang/Desktop/master_code/out/hb_args/envargs.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 47, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/build/hb/main.py", line 92, in main
'build': main._init_indep_build_module if main._is_indep_build() else main._init_build_module,
^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/build/hb/main.py", line 212, in _is_indep_build
env_args_dict = Arg.read_args_file(ModuleType.ENV)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 65, in wrapper
_print_formatted_tracebak(_code, str(exception), _type, _desc, _solution)
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 87, in _print_formatted_tracebak
LogUtil.write_log(_log_path, traceback.format_exc() + '\n', 'error')
File "/home/zhang/Desktop/master_code/build/hb/util/log_util.py", line 85, in write_log
with open(log_path, 'at', encoding='utf-8') as log_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/zhang/Desktop/master_code/out/sdk/build.log'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zhang/Desktop/master_code/build/hb/main.py", line 296, in <module>
sys.exit(Main.main())
^^^^^^^^^^^
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 65, in wrapper
_print_formatted_tracebak(_code, str(exception), _type, _desc, _solution)
File "/home/zhang/Desktop/master_code/build/hb/containers/status.py", line 87, in _print_formatted_tracebak
LogUtil.write_log(_log_path, traceback.format_exc() + '\n', 'error')
File "/home/zhang/Desktop/master_code/build/hb/util/log_util.py", line 85, in write_log
with open(log_path, 'at', encoding='utf-8') as log_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/zhang/Desktop/master_code/out/sdk/build.log'
[OHOS ERROR] ohos-sdk build failed! You can try to use '--no-prebuilt-sdk' to skip the build of ohos-sdk.