HarmonyOS鸿蒙Next中rk3568-OpenHarmony-4.0-Beta2编译出错

HarmonyOS鸿蒙Next中rk3568-OpenHarmony-4.0-Beta2编译出错

rpdzkj@lsc:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2$ ./build.sh
+ set -e
+ set +e
+ echo ++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++
+ MAKE_PATH=kernel/linux/linux-5.10/make-ohos.sh
++ grep -o 'export TARGET_BOARD=[^ ]*' set_env.sh
++ cut -d = -f 2
+ TARGET_BOARD=PRO-RK3568
++ echo PRO-RK3568
++ tr '[:upper:]' '[:lower:]'
+ TARGET_BOARDS=pro-rk3568
+ TARGET_SYSTEM=OpenHarmony-4.0-Beta2
+ DTS_DIR=kernel/linux/linux-5.10/arch/arm64/boot/dts/rockchip/pro-rk3568.dts
+ '[' -a set_env.sh ']'
+ source set_env.sh
++ export TARGET_BOARD=PRO-RK3568
++ TARGET_BOARD=PRO-RK3568
++ export TARGET_ENV_DEVICE=rk3568
++ TARGET_ENV_DEVICE=rk3568
+ :
++ cat set_env.sh
++ awk '{print tolower($0)}'
++ ls -F vendor/hihope
++ grep '/$'
++ sed 's/\///'
+ BUILD_ARGS='--product-name=rk3568 --ccache'
+ '[' -a out/kernel ']'
+ OPTIONS=
+ for option in ${OPTIONS:-all}
+ echo 'processing option: all'
processing option: all
+ case $option in
+ check_shell_environment
+ case $(uname -s) in
++ uname -s
++ /bin/sh -c 'echo ${BASH_VERSION}'
+ shell_result=
+ '[' -n '' ']'
+ echo -e '\033[33m Your system shell isn'\''t bash, we recommend you to use bash, because some commands may not be supported in other shells, such as pushd and shopt are not supported in dash. \n You can follow these tips to modify the system shell to bash on Ubuntu: \033[0m'
 Your system shell isn't bash, we recommend you to use bash, because some commands may not be supported in other shells, such as pushd and shopt are not supported in dash.
 You can follow these tips to modify the system shell to bash on Ubuntu:
+ echo -e '\033[33m [1]:Open the Terminal tool and execute the following command: sudo dpkg-reconfigure dash \n [2]:Enter the password and select <no>  \033[0m'
 [1]:Open the Terminal tool and execute the following command: sudo dpkg-reconfigure dash
 [2]:Enter the password and select <no>
+ echo ++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++
+ date '+%F %H:%M:%S'
2026-05-08 05:52:07
+ echo
+++ dirname ./build.sh
++ cd .
++ pwd
+ export SOURCE_ROOT_DIR=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2
+ SOURCE_ROOT_DIR=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2
+ [[ ! -f /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/.gn ]]
+ [[ /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2x == \x ]]
+ case $(uname -s) in
++ uname -s
+ HOST_DIR=linux-x86
+ HOST_OS=linux
+ NODE_PLATFORM=linux-x64
+ PYTHON3_DIR=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current/
+ PYTHON3=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python3
+ PYTHON=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python
+ [[ ! -f /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python3 ]]
+ [[ ! -f /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python ]]
+ export PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ EXPECTED_NODE_VERSION=14.21.1
+ export PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export NODE_HOME=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64
+ NODE_HOME=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64
+ export PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ PATH=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ node -v
+ echo 'Current Node.js version is v14.21.1'
Current Node.js version is v14.21.1
++ node -v
+ NODE_VERSION=v14.21.1
+ '[' v14.21.1 '!=' v14.21.1 ']'
+ echo 'Node.js version check passed'
Node.js version check passed
+ npm config set registry [https://repo.huaweicloud.com/repository/npm/](https://repo.huaweicloud.com/repository/npm/)
+ npm config set @ohos:registry [https://repo.harmonyos.com/npm/](https://repo.harmonyos.com/npm/)
+ npm config set strict-ssl false
+ npm config set package-lock false
+ [[ '' != *ohos-sdk* ]]
+ echo 'start set ohpm'
start set ohpm
+ init_ohpm
+ TOOLS_INSTALL_DIR=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common
+ cd /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common
+ commandlineVersion=2.0.1.0
+ [[ ! -f /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm/bin/ohpm ]]
+ OHPM_HOME=/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm
+ chmod +x /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm/bin/init
+ echo 'init ohpm'
init ohpm
+ /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/common/oh-command-line-tools/ohpm/bin/init
npm WARN @ohos/ohpm@1.1.2 No description
npm WARN @ohos/ohpm@1.1.2 No repository field.
up to date in 0.552s
10 packages are looking for funding
  run `npm fund` for details
++ ohpm -v
+ echo 'ohpm version is 1.1.2'
ohpm version is 1.1.2
+ ohpm config set registry [https://repo.harmonyos.com/ohpm/](https://repo.harmonyos.com/ohpm/)
+ ohpm config set strict_ssl false
+ cd /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2
+ [[ -d ~/.hvigor ]]
+ [[ 0 -ne 0 ]]
+ [[ ! -d /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/packages/ohos-sdk/linux ]]
+ /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python3 /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/scripts/tools_checker.py
+ flag=true
+ args_list=
+ [[ true == \t\r\u\e ]]
+ /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/python/linux-x86/current//bin/python3 /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/main.py build
[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS INFO] generated build prop info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/build.prop
[OHOS INFO] generated build config info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/build_config.json
[OHOS INFO] generated product parts info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/parts.json
[OHOS INFO] generated parts config info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/parts_config.json
[OHOS INFO] generated build gnargs prop info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/build_gnargs.prop
[OHOS INFO] generated features info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/features.json
[OHOS INFO] generated syscap info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/syscap.json
[OHOS INFO] generated exclusion modules info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/exclusion_modules.json
[OHOS INFO] generated platforms build info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/platforms.build
[OHOS INFO] generated subsystem config info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/subsystem_config.json
[OHOS INFO] generated system capability info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/systemcapability.json
[OHOS INFO] generated compile_standard_whitelist info to /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/compile_standard_whitelist.json
[OHOS INFO] Checking all build args...
[OHOS INFO] subsytem config scan completed
[OHOS INFO] subsytem config scan completed
[OHOS INFO] generate all parts of platforms info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/platforms_info/all_parts.json'
[OHOS INFO] generate toolchain to variant of platforms info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/platforms_info/toolchain_to_variant.json'
warning: subsystem name config incorrect in '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/flutter/glfw/bundle.json', build file subsystem name is ,configured subsystem name is thirdparty.
warning: subsystem name config incorrect in '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/bundle.json', build file subsystem name is wpa_supplicant-2.9,configured subsystem name is thirdparty.
warning: subsystem name config incorrect in '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/qrcodegen/bundle.json', build file subsystem name is ,configured subsystem name is thirdparty.
warning: subsystem name config incorrect in '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/wayland_standard/bundle.json', build file subsystem name is ,configured subsystem name is thirdparty.
warning: subsystem name config incorrect in '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/pixman/bundle.json', build file subsystem name is ,configured subsystem name is thirdparty.
[OHOS INFO] generate all parts build gn file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2//out/sdk/build_configs'
[OHOS INFO] generate parts info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_info.json'
[OHOS INFO] generate part-subsystem of parts-info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/part_subsystem.json'
[OHOS INFO] generate ubsystem-parts of parts-info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/subsystem_parts.json'
[OHOS INFO] generate mini adapter info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/mini_adapter/'
[OHOS INFO] generate parts variants info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_variants.json'
[OHOS INFO] generate parts inner kits info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/inner_kits_info.json'
[OHOS INFO] generate parts targets info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_targets.json'
[OHOS INFO] generate phony targets info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/phony_target.json'
[OHOS INFO] generate parts path info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_path_info.json'
[OHOS INFO] generate path to parts to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/path_to_parts.json'
[OHOS INFO] generate hisysevent info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/hisysevent_configs.json'
[OHOS INFO] generate parts modules info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_modules_info.json'
[OHOS INFO] generate parts deps info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_info/parts_deps.json'
[OHOS INFO] all parts scan completed
[OHOS INFO] Loading configuration file...
[OHOS INFO] loader args:['platforms_config_file="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/platforms.build"', 'subsystem_config_file="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/subsystem_config.json"', 'example_subsystem_file=""', 'exclusion_modules_config_file="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/exclusion_modules.json"', 'source_root_dir="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/"', 'gn_root_out_dir="out/sdk"', 'build_platform_name=phone', 'build_xts=False', 'load_test_config=True', 'target_os=ohos', 'target_cpu=arm64', 'os_level=standard', "ignore_api_check=['xts', 'common', 'developertest']", 'scalable_build=False']
[OHOS INFO] Checking parts config...
[OHOS INFO] generated subsystem build config to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/subsystem_info/subsystem_build_config.json'
[OHOS INFO] generated src subsystem info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/subsystem_info/src_subsystem_info.json'
[OHOS INFO] generated no src subsystem info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/subsystem_info/no_src_subsystem_info.json'
[OHOS INFO] generate target platform parts to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/target_platforms_parts.json'
[OHOS INFO] generated system capabilities to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/phone_system_capabilities.json'
[OHOS INFO] generated platform zframework stub to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/subsystem_info/phone-stub/zframework_stub_exists.gni'
[OHOS INFO] generated platforms parts by src to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/platforms_parts_by_src.json'
[OHOS INFO] generate part list gni file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_list.gni'
[OHOS INFO] generate inner kits gni file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/inner_kits_list.gni'
[OHOS INFO] generate system list gni file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/system_kits_list.gni'
[OHOS INFO] generate parts test gni file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_test_list.gni'
[OHOS INFO] generate build gn file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/BUILD.gn'
[OHOS INFO] generate phony target build file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/phony_targets/BUILD.gn'
[OHOS INFO] generate required parts targets to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/required_parts_targets.json'
[OHOS INFO] generate build targets list file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/required_parts_targets_list.json'
[OHOS INFO] generated parts src flag to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/subsystem_info/parts_src_flag.json'
[OHOS INFO] generate auto install part to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/auto_install_parts.json'
[OHOS INFO] generate platforms list to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/platforms_list.gni'
[OHOS INFO] generate part different info to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/parts_different_info.json'
[OHOS INFO] generate infos for testfwk to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/build_configs/infos_for_testfwk.json'
[OHOS INFO] Checking all product features...
[OHOS INFO] generate syscap info file to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/system/etc/SystemCapability.json'
[OHOS INFO] generate syscap info with part name list to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/system/etc/syscap.json'
[OHOS INFO] generate target syscap for init list to '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/preloader/ohos-sdk/system/etc/param/syscap.para'
[OHOS INFO] Excuting gn command: /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin/gn gen --args="product_name=\"ohos-sdk\" product_path=\"/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/productdefine/common/products\" product_config_path=\"/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/productdefine/common/products\" device_name=\"sdk\" device_path=\"/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/device/board/ohos/sdk\" device_company=\"ohos\" device_config_path=\"/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/device/board/ohos/sdk\" target_cpu=\"arm64\" is_standard_system=true ohos_build_compiler_specified=\"\" ohos_build_time=1778219530842 ohos_build_datetime=\"2026-05-08 05:52:10\" ohos_build_enable_ccache=true ohos_build_type=\"debug\" device_type=\"default\" build_variant=\"root\"" /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] root_out_dir=//out/sdk
[OHOS INFO] root_build_dir=//out/sdk
[OHOS INFO] root_gen_dir=//out/sdk/gen
[OHOS INFO] current_toolchain=//build/toolchain/ohos:ohos_clang_arm64
[OHOS INFO] host_toolchain=//build/toolchain/linux:clang_x64
[OHOS INFO] bundle_framework_power_mgr_enable = true
[OHOS INFO] bundle_framework_graphics = true
[OHOS INFO] bundle_framework_free_install = false
[OHOS INFO] bundle_framework_default_app = true
[OHOS INFO] bundle_framework_launcher = true
[OHOS INFO] bundle_framework_sandbox_app = true
[OHOS INFO] bundle_framework_quick_fix = true
[OHOS INFO] bundle_framework_app_control = true
[OHOS INFO] distributed_bundle_framework = true
[OHOS INFO] ability_runtime_enable = true
[OHOS INFO] account_enable = true
[OHOS INFO] configpolicy_enable = false
[OHOS INFO] global_resmgr_enable = true
[OHOS INFO] hicollie_enable = true
[OHOS INFO] support_jsapi = true
[OHOS INFO] hisysevent_enable = false
[OHOS INFO] bundle_framework_overlay_install = true
[OHOS INFO] ["--haptobin", "../../developtools/packing_tool/adapter/ohos", "--haptobinOutput", "mingw_x86_64/obj/developtools/packing_tool/jar/haptobin_tool.jar", "--unpackOutput", "mingw_x86_64/obj/developtools/packing_tool/jar/app_unpacking_tool.jar", "--packOutput", "mingw_x86_64/obj/developtools/packing_tool/jar/app_packing_tool.jar", "--outpath", "mingw_x86_64/obj/developtools/packing_tool/jar", "--toolchain", "//build/toolchain/mingw:mingw_x86_64", "--compileTarget", "image"]
[OHOS INFO] ["--haptobin", "../../developtools/packing_tool/adapter/ohos", "--haptobinOutput", "clang_x64/obj/developtools/packing_tool/jar/haptobin_tool.jar", "--unpackOutput", "clang_x64/obj/developtools/packing_tool/jar/app_unpacking_tool.jar", "--packOutput", "clang_x64/obj/developtools/packing_tool/jar/app_packing_tool.jar", "--outpath", "clang_x64/obj/developtools/packing_tool/jar", "--toolchain", "//build/toolchain/linux:clang_x64", "--compileTarget", "image"]
[OHOS INFO] window_manager_feature_subscribe_motion = false
[OHOS INFO] window_manager_feature_subscribe_motion = 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] Install OpenEuler Curl
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/curl/install.py
[OHOS INFO] ["--gen-dir", "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/mingw_x86_64/gen/third_party/curl"]
[OHOS INFO] { }
[OHOS INFO] { }
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | script path is /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/curl, log path is /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/mingw_x86_64/gen/third_party/curl
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | only me to install OpenEuler Curl
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | OpenEuler Curl has been install
[OHOS INFO]
[OHOS INFO] Install OpenEuler Curl
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/curl/install.py
[OHOS INFO] ["--gen-dir", "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/clang_x64/gen/third_party/curl"]
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | script path is /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/curl, log path is /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/clang_x64/gen/third_party/curl
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | only me to install OpenEuler Curl
[OHOS INFO] 2026-05-08 05:52:17 | WARN | OpenEulerCurl | reuse the soruce path curl-7.79.1
[OHOS INFO]
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/obj/third_party/openssl/build_all_generated', 'linux-aarch64'] start
[OHOS INFO] result.returncode = 0
[OHOS INFO] result.stdout = /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/obj/third_party/openssl/build_all_generated/linux-aarch64 /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/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](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] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO]
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/obj/third_party/openssl/build_all_generated', 'linux-aarch64'] ok
[OHOS INFO]
[OHOS INFO] openssl detecting os now...
[OHOS INFO] current_cpu = x86_64
[OHOS INFO] current_os = mingw
[OHOS INFO] host_os = linux
[OHOS INFO] is_mingw = true
[OHOS INFO] openssl selected mingw64
[OHOS INFO] openssl detecting os done. openssl_selected_platform = mingw64
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/mingw_x86_64/obj/third_party/openssl/build_all_generated', 'mingw64'] start
[OHOS INFO] result.returncode = 0
[OHOS INFO] result.stdout = /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/mingw_x86_64/obj/third_party/openssl/build_all_generated/mingw64 /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/Configure mingw64 no-shared no-module
[OHOS INFO] Configuring OpenSSL version 3.0.7 for target mingw64
[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](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] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO]
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/mingw_x86_64/obj/third_party/openssl/build_all_generated', 'mingw64'] ok
[OHOS INFO]
[OHOS INFO] openssl detecting os now...
[OHOS INFO] current_cpu = x64
[OHOS INFO] current_os = linux
[OHOS INFO] host_os = linux
[OHOS INFO] is_mingw = false
[OHOS INFO] openssl selected linux-x86_64
[OHOS INFO] openssl detecting os done. openssl_selected_platform = linux-x86_64
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/clang_x64/obj/third_party/openssl/build_all_generated', 'linux-x86_64'] start
[OHOS INFO] result.returncode = 0
[OHOS INFO] result.stdout = /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/clang_x64/obj/third_party/openssl/build_all_generated/linux-x86_64 /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/Configure linux-x86_64 no-shared no-module
[OHOS INFO] Configuring OpenSSL version 3.0.7 for target linux-x86_64
[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](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] /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk
[OHOS INFO]
[OHOS INFO] cmd ['/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl/make_openssl_build_all_generated.sh', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/third_party/openssl', '/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/clang_x64/obj/third_party/openssl/build_all_generated', 'linux-x86_64'] ok
[OHOS INFO]
[OHOS INFO] WARNING at the command-line "--args":1:320: Build argument has no effect.
[OHOS INFO] product_name="ohos-sdk" product_path="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/productdefine/common/products" product_config_path="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/productdefine/common/products" device_name="sdk" device_path="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/device/board/ohos/sdk" device_company="ohos" device_config_path="/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/device/board/ohos/sdk" target_cpu="arm64" is_standard_system=true ohos_build_compiler_specified="" ohos_build_time=1778219530842 ohos_build_datetime="2026-05-08 05:52:10" ohos_build_enable_ccache=true ohos_build_type="debug" device_type="default" build_variant="root"
[OHOS INFO]                                                                                                                                    ^-----
[OHOS INFO] The variable "device_company" was set as a build argument
[OHOS INFO] but never appeared in a declare_args() block in any buildfile.
[OHOS INFO]
[OHOS INFO] To view all possible args, run "gn args --list <out_dir>"
[OHOS INFO]
[OHOS INFO] The build continued as if that argument was unspecified.
[OHOS INFO]
[OHOS INFO] Done. Made 16206 targets from 1504 files in 29797ms
[OHOS INFO] Excuting ninja command: /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/prebuilts/build-tools/linux-x86/bin/ninja -w dupbuild=warn -C /home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk images
[OHOS ERROR] ninja: error: unknown target 'images', did you mean 'times'?
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/services/ninja.py", line 49, in _execute_ninja_cmd
[OHOS ERROR]     SystemUtil.exec_command(
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/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/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/out/sdk/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/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR]     return func(*args, **kwargs)
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/modules/ohos_build_module.py", line 67, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR]     super().run()
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/modules/interface/build_module_interface.py", line 72, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/modules/interface/build_module_interface.py", line 70, in run
[OHOS ERROR]     self._target_compilation()
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation
[OHOS ERROR]     self.target_compiler.run()
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR]     self._execute_ninja_cmd()
[OHOS ERROR]   File "/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2/build/hb/services/ninja.py", line 52, 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
[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](https://gitee.com/openharmony/build/issues)
[OHOS ERROR]
+ [[ 255 -ne 0 ]]
+ echo -e '\033[31m=====build  error=====\033[0m'
=====build  error=====
+ exit 1
rpdzkj@lsc:/home/SDK_DIR/rk3568-OpenHarmony-4.0-Beta2$

更多关于HarmonyOS鸿蒙Next中rk3568-OpenHarmony-4.0-Beta2编译出错的实战教程也可以访问 https://www.itying.com/category-93-b0.html

4 回复
  1. 把终端换成bash,你用的dash,有些命令不支持。

cke_9785.png

  1. ninja编译这个先考虑是依赖库出问题了。按下步骤执行试了吗,把build里全删了吧。

cke_445.png

  1. 解决不了问题,可以把 out/{compiling product}/build.log 这个贴出来看看,找下错误真因。

更多关于HarmonyOS鸿蒙Next中rk3568-OpenHarmony-4.0-Beta2编译出错的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


你编译的是ohos-sdk产品,不是rk3568整机镜像

方案1:

hb set -p rk3568
hb build --ccache

方案2:

改为rk3568,不要用 ohos-sdk,再

export PRODUCT_NAME=rk3568
./build.sh

rk3568-OpenHarmony-4.0-Beta2编译出错常见于:

  • 环境依赖(如Python/node/ninja版本)与OH要求不符。
  • 内核或驱动代码未同步至对应tag。
  • 编译参数(如--target-cpu)配置错误。
  • 并行编译时资源冲突或磁盘空间不足。
    请核对具体报错日志定位根因。,

编译失败的根因是 hb build 未指定产品参数,导致构建了默认的 ohos-sdk 目标,该目标不生成 images 构建产物,因此 ninja 报错 unknown target 'images'。观察日志中生成配置均指向 out/preloader/ohos-sdk,确认构建初衷已偏离 rk3568。

解决步骤

  1. 在源码根目录执行 hb set,选择产品 rk3568(对应开发板型号)。
  2. 若仍失败,先清理构建缓存:hb clean 或删除 out 目录,再重新执行编译。
  3. 建议将系统默认 shell 切换为 bash(执行 sudo dpkg-reconfigure dash<no>),避免部分命令兼容性问题。

完成上述操作后,重新运行 ./build.sh 即可正常构建 rk3568 版本的 OpenHarmony 4.0 Beta2 镜像。

回到顶部