移植OpenHarmony,每次编译都要删除 out/AX650N_Demo,不然报ERROR at //third_party/toybox/BUILD.gn:451:5: Script returned non-zero exit code.请问如何解决

xuxiyang 显示全部楼层 发表于 2024-3-28 15:58:11

[OHOS INFO] histreamer plugin: std_video_surface_sink = false [OHOS INFO] histreamer plugin: std_video_capture = false [OHOS INFO] histreamer plugin: file_fd_sink = false [OHOS INFO] histreamer plugin: codec_adapter = false [OHOS INFO] openssl detecting os now... [OHOS INFO] current_cpu = arm64 [OHOS INFO] current_os = ohos [OHOS INFO] host_os = linux [OHOS INFO] is_mingw = false [OHOS INFO] openssl selected linux-aarch64 [OHOS INFO] openssl detecting os done. openssl_selected_platform = linux-aarch64 [OHOS INFO] hks_config_small.h [OHOS INFO] ERROR at //third_party/toybox/BUILD.gn:451:5: Script returned non-zero exit code. [OHOS INFO] exec_script("install.py", [OHOS INFO] ^---------- [OHOS INFO] Current dir: /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/ [OHOS INFO] Command: /home/young/harmony_ax650/prebuilts/python/linux-x86/current//bin/python3 /home/young/harmony_ax650/third_party/toybox/install.py --long_path bin/chmod --out_dir /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo [OHOS INFO] Returned 1. [OHOS INFO] stderr: [OHOS INFO] [OHOS INFO] Traceback (most recent call last): [OHOS INFO] File "/home/young/harmony_ax650/third_party/toybox/install.py", line 52, in <module> [OHOS INFO] sys.exit(main()) [OHOS INFO] File "/home/young/harmony_ax650/third_party/toybox/install.py", line 46, in main [OHOS INFO] os.symlink("toybox", target_link) [OHOS INFO] FileExistsError: [Errno 17] File exists: 'toybox' -> 'bin/chmod' [OHOS INFO] [OHOS INFO] See //base/startup/init/services/init/lite/BUILD.gn:96:7: which caused the file to be included. [OHOS INFO] "//third_party/toybox", [OHOS INFO] ^--------------------- [OHOS INFO] histreamer audio encoder plugin only supports standard system [OHOS INFO] histreamer audio encoder plugin only supports standard system [OHOS INFO] histreamer video decoder plugin only supports standard system [OHOS INFO] histreamer video encoder plugin only supports standard system [OHOS INFO] histreamer ffmpeg muxer plugin only supports standard system [OHOS INFO] Install OpenEuler Curl [OHOS INFO] /home/young/harmony_ax650/third_party/curl/install.py [OHOS INFO] ["--gen-dir", "/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/gen/third_party/curl"] [OHOS INFO] hks_config_small.h [OHOS INFO] hks_config_small.h [OHOS INFO] 2024-03-28 15:53:13 | WARN | OpenEulerCurl | script path is /home/young/harmony_ax650/third_party/curl, log path is /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/gen/third_party/curl [OHOS INFO] 2024-03-28 15:53:13 | WARN | OpenEulerCurl | only me to install OpenEuler Curl [OHOS INFO] 2024-03-28 15:53:13 | WARN | OpenEulerCurl | OpenEuler Curl has been install [OHOS INFO] [OHOS INFO] cmd ['/home/young/harmony_ax650/third_party/openssl/make_openssl_build_all_generated.sh', '/home/young/harmony_ax650/third_party/openssl', '/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/obj/third_party/openssl/build_all_generated', 'linux-aarch64'] start [OHOS INFO] result.returncode = 0 [OHOS INFO] result.stdout = /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo [OHOS INFO] ~/harmony_ax650/out/AX650N_Demo/AX650N_Demo/obj/third_party/openssl/build_all_generated/linux-aarch64 ~/harmony_ax650/out/AX650N_Demo/AX650N_Demo [OHOS INFO] /home/young/harmony_ax650/third_party/openssl/Configure linux-aarch64 no-shared no-module [OHOS INFO] Configuring OpenSSL version 3.0.7 for target linux-aarch64 [OHOS INFO] Using os-specific seed configuration [OHOS INFO] Created configdata.pm [OHOS INFO] Running configdata.pm [OHOS INFO] Created Makefile.in [OHOS INFO] Created Makefile [OHOS INFO] Created include/openssl/configuration.h [OHOS INFO] [OHOS INFO] ** [OHOS INFO] [OHOS INFO] OpenSSL has been successfully configured [OHOS INFO] [OHOS INFO] If you encounter a problem while building, please open an [OHOS INFO] issue on GitHub https://github.com/openssl/openssl/issues [OHOS INFO] and include the output from the following command: [OHOS INFO] [OHOS INFO] perl configdata.pm --dump [OHOS INFO] [OHOS INFO] (If you are new to OpenSSL, you might want to consult the [OHOS INFO] 'Troubleshooting' section in the INSTALL.md file first) [OHOS INFO] [OHOS INFO] ** [OHOS INFO] ~/harmony_ax650/out/AX650N_Demo/AX650N_Demo [OHOS INFO] [OHOS INFO] cmd ['/home/young/harmony_ax650/third_party/openssl/make_openssl_build_all_generated.sh', '/home/young/harmony_ax650/third_party/openssl', '/home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/obj/third_party/openssl/build_all_generated', 'linux-aarch64'] ok [OHOS INFO] [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/young/harmony_ax650/build/hb/services/gn.py", line 176, in _execute_gn_gen_cmd [OHOS ERROR] SystemUtil.exec_command(gn_gen_cmd, self.config.log_path) [OHOS ERROR] File "/home/young/harmony_ax650/build/hb/util/system_util.py", line 63, in exec_command [OHOS ERROR] raise OHOSException( [OHOS ERROR] exceptions.ohos_exception.OHOSException: Please check build log in /home/young/harmony_ax650/out/AX650N_Demo/AX650N_Demo/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/young/harmony_ax650/build/hb/containers/status.py", line 47, in wrapper [OHOS ERROR] return func(*args, *kwargs) [OHOS ERROR] File "/home/young/harmony_ax650/build/hb/services/gn.py", line 178, in _execute_gn_gen_cmd [OHOS ERROR] raise OHOSException('GN phase failed', '3000') [OHOS ERROR] exceptions.ohos_exception.OHOSException: GN phase failed [OHOS ERROR] [OHOS ERROR] Code: 3000 [OHOS ERROR] [OHOS ERROR] Reason: GN phase failed [OHOS ERROR] [OHOS ERROR] Solution: Please check the compile log at out/{compiling product}/build.log, If you could analyze build logs. [OHOS ERROR] Or you can try the following steps to solve this problem: [OHOS ERROR] 1. cd to OHOS root path [OHOS ERROR] 2. run 'hb clean --all' or 'rm -rf out build/resources/args/.json'. [OHOS ERROR] 3. repo sync [OHOS ERROR] 4. repo forall -c 'git lfs pull' [OHOS ERROR] 5. bash build/prebuilts_download.sh [OHOS ERROR] 6. rebuild your product or component [OHOS ERROR] [OHOS ERROR] If you still cannot solve this problem, you could post this problem on: [OHOS ERROR] https://gitee.com/openharmony/build/issues [OHOS ERROR] =====build error=====

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

精彩评论1

s_hao

沙发 发表于 2024-4-2 18:35:59

移植OpenHarmony,每次编译都要删除 out/AX650N_Demo,不然报ERROR at //third_party/toybox/BUILD.gn:451:5: Script returned non-zero exit code.请问如何解决


fakename.png
三方库toybox下的install.py会去创建软连接,如果文件已经存在的话,创建软连接会报错。建议修改install.py,判断如果文件存在,先把文件删除,再做软连接。

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

返回顶部