openHarmony编译rk3568报错求解

img


[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS INFO] root_out_dir=//out/rk3568
[OHOS INFO] root_build_dir=//out/rk3568
[OHOS INFO] root_gen_dir=//out/rk3568/gen
[OHOS INFO] current_toolchain=//build/toolchain/ohos:ohos_clang_arm
[OHOS INFO] host_toolchain=//build/toolchain/linux:clang_x64
[OHOS INFO] 
[OHOS INFO] args: Namespace(platforms_config_file='/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/preloader/rk3568/platforms.build', subsystem_config_file='/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/preloader/rk3568/subsystem_config.json', example_subsystem_file=None, exclusion_modules_config_file='/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/preloader/rk3568/exclusion_modules.json', source_root_dir='/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/', gn_root_out_dir='/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/rk3568', build_platform_name='phone', build_xts=False, load_test_config=True, target_os='ohos', target_cpu='arm', os_level='standard', ignore_api_check=['xts', 'common', 'developertest'], scalable_build=False)
[OHOS INFO] 
[OHOS INFO] build configs generation is complete.
[OHOS INFO] [{
[OHOS INFO]   config = {
[OHOS INFO]   accessibility_support = true
[OHOS INFO]   ace_enable_gpu = true
[OHOS INFO]   ace_engine_feature_enable_accessibility = true
[OHOS INFO]   ace_engine_feature_enable_web = true
[OHOS INFO]   advance_components_support = false
[OHOS INFO]   ark_engine = {
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }
[OHOS INFO]   build_container_scope_lib = true
[OHOS INFO]   cflags_cc = ["-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis"]
[OHOS INFO]   check_graphic_ext_file_args = ["--filename", "/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/foundation/graphic/graphic_2d_ext/ohcore/build/config.gni"]
[OHOS INFO]   check_graphic_ext_file_script = "//build/ohos/file_exists.py"
[OHOS INFO]   connect_server_support = true
[OHOS INFO]   defines = ["OHOS_PLATFORM", "OHOS_STANDARD_SYSTEM", "IMAGE_SUPPORTED", "VIDEO_SUPPORTED", "WEB_SUPPORTED", "ABILITY_COMPONENT_SUPPORTED", "GPU_DISABLED", "FORM_SUPPORTED", "REMOTE_WINDOW_SUPPORTED", "XCOMPONENT_SUPPORTED", "PLUGIN_COMPONENT_SUPPORTED", "PIXEL_MAP_SUPPORTED", "ENABLE_ROSEN_BACKEND", "ENABLE_STANDARD_INPUT", "MULTIPLE_WINDOW_SUPPORTED", "HIDDEN_SYMBOL"]
[OHOS INFO]   disable_gpu = false
[OHOS INFO]   enable_ability_component = true
[OHOS INFO]   enable_image_compression = true
[OHOS INFO]   enable_rosen_backend = true
[OHOS INFO]   enable_standard_input = true
[OHOS INFO]   enable_system_clipboard = true
[OHOS INFO]   form_components_support = true
[OHOS INFO]   gpu_defines = ["ACE_ENABLE_GL", "RS_ENABLE_GL", "RS_DISABLE_EGLIMAGE"]
[OHOS INFO]   graphic_2d_ext_configs = { }
[OHOS INFO]   graphic_2d_root = "//foundation/graphic/graphic_2d"
[OHOS INFO]   graphic_standard_feature_ace_enable_gpu = true
[OHOS INFO]   graphic_standard_feature_bootanimation_enable = true
[OHOS INFO]   graphic_standard_feature_color_gamut_enable = false
[OHOS INFO]   graphic_standard_feature_enable_afbc = false
[OHOS INFO]   graphic_standard_feature_freemem_enable = false
[OHOS INFO]   graphic_standard_feature_rs_enable_eglimage = false
[OHOS INFO]   graphic_standard_feature_rs_enable_uni_render = false
[OHOS INFO]   graphic_standard_feature_wuji_enable = false
[OHOS INFO]   hdc_register_support = true
[OHOS INFO]   image_components_support = true
[OHOS INFO]   is_experiment_build = false
[OHOS INFO]   js_engines = [{
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }]
[OHOS INFO]   js_pa_support = true
[OHOS INFO]   libace_target = "//foundation/arkui/ace_engine/build:libace"
[OHOS INFO]   libgl = ["//foundation/graphic/graphic_2d/frameworks/opengl_wrapper:EGL", "//foundation/graphic/graphic_2d/frameworks/opengl_wrapper:GLESv3"]
[OHOS INFO]   multiple_window_support = true
[OHOS INFO]   ohos_standard_fontmgr = true
[OHOS INFO]   pa_engine_path = "adapter/ohos/entrance/pa_engine"
[OHOS INFO]   pixel_map_support = true
[OHOS INFO]   platform_deps = ["//foundation/arkui/ace_engine/adapter/ohos/entrance:ace_ohos_standard_entrance", "//foundation/arkui/ace_engine/adapter/ohos/osal:ace_osal_ohos"]
[OHOS INFO]   plugin_components_support = true
[OHOS INFO]   preview_support = false
[OHOS INFO]   remote_window_support = true
[OHOS INFO]   rich_components_support = true
[OHOS INFO]   rs_enable_eglimage = false
[OHOS INFO]   rs_enable_gpu = true
[OHOS INFO]   sk_use_hilog = true
[OHOS INFO]   surface_enable_gpu = true
[OHOS INFO]   use_build_in_js_engine = true
[OHOS INFO]   use_curl_download = true
[OHOS INFO]   use_external_icu = "shared"
[OHOS INFO]   video_components_support = true
[OHOS INFO]   web_components_support = true
[OHOS INFO]   xcomponent_components_support = true
[OHOS INFO] }
[OHOS INFO]   name = "ohos"
[OHOS INFO] }, {
[OHOS INFO]   config = {
[OHOS INFO]   accessibility_support = true
[OHOS INFO]   advance_components_support = false
[OHOS INFO]   ark_engine = {
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }
[OHOS INFO]   build_for_preview = true
[OHOS INFO]   cflags_cc = ["-std=c++17", "-DWINVER=0x0601", "-Wno-inconsistent-dllimport", "-Wno-macro-redefined", "-Wno-missing-braces", "-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis", "-Wno-ignored-attributes", "-Wno-unknown-pragmas", "-Wno-used-but-marked-unused"]
[OHOS INFO]   connect_server_support = false
[OHOS INFO]   defines = ["PREVIEW", "ENABLE_ROSEN_BACKEND", "WINDOWS_PLATFORM", "_USE_MATH_DEFINES", "NOGDI", "UNICODE", "U_CHARSET_IS_UTF8=1", "SK_BUILD_FOR_WIN", "SK_BUILD_FONT_MGR_FOR_PREVIEW_WIN"]
[OHOS INFO]   enable_ability_component = false
[OHOS INFO]   enable_rosen_backend = true
[OHOS INFO]   enable_standard_input = false
[OHOS INFO]   enable_system_clipboard = false
[OHOS INFO]   form_components_support = false
[OHOS INFO]   image_components_support = false
[OHOS INFO]   js_engines = [{
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }]
[OHOS INFO]   js_pa_support = false
[OHOS INFO]   libace_target = "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_windows"
[OHOS INFO]   ohos_standard_fontmgr = true
[OHOS INFO]   platform_deps = ["//foundation/arkui/ace_engine/adapter/preview/entrance:ace_preview_entrance_windows", "//foundation/arkui/ace_engine/adapter/preview/external:preview_external_source_windows", "//foundation/arkui/ace_engine/adapter/preview/inspector:ace_inspector_windows", "//foundation/arkui/ace_engine/adapter/preview/osal:ace_osal_windows"]
[OHOS INFO]   plugin_components_support = false
[OHOS INFO]   preview_support = true
[OHOS INFO]   remote_window_support = false
[OHOS INFO]   rich_components_support = true
[OHOS INFO]   use_build_in_js_engine = true
[OHOS INFO]   use_curl_download = true
[OHOS INFO]   video_components_support = false
[OHOS INFO]   web_components_support = false
[OHOS INFO]   xcomponent_components_support = false
[OHOS INFO] }
[OHOS INFO]   name = "windows"
[OHOS INFO] }, {
[OHOS INFO]   config = {
[OHOS INFO]   accessibility_support = true
[OHOS INFO]   advance_components_support = false
[OHOS INFO]   ark_engine = {
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }
[OHOS INFO]   build_for_preview = true
[OHOS INFO]   cflags_cc = ["-std=c++17", "-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis", "-Wno-ignored-attributes", "-Wno-unknown-pragmas"]
[OHOS INFO]   connect_server_support = false
[OHOS INFO]   defines = ["PREVIEW", "ENABLE_ROSEN_BACKEND", "MAC_PLATFORM", "UNICODE", "SK_BUILD_FONT_MGR_FOR_PREVIEW_MAC"]
[OHOS INFO]   enable_ability_component = false
[OHOS INFO]   enable_rosen_backend = true
[OHOS INFO]   enable_standard_input = false
[OHOS INFO]   enable_system_clipboard = false
[OHOS INFO]   form_components_support = false
[OHOS INFO]   image_components_support = false
[OHOS INFO]   js_engines = [{
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }]
[OHOS INFO]   js_pa_support = false
[OHOS INFO]   libace_target = "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_mac"
[OHOS INFO]   ohos_standard_fontmgr = true
[OHOS INFO]   platform_deps = ["//foundation/arkui/ace_engine/adapter/preview/entrance:ace_preview_entrance_mac", "//foundation/arkui/ace_engine/adapter/preview/external:preview_external_source_mac", "//foundation/arkui/ace_engine/adapter/preview/inspector:ace_inspector_mac", "//foundation/arkui/ace_engine/adapter/preview/osal:ace_osal_mac"]
[OHOS INFO]   plugin_components_support = false
[OHOS INFO]   preview_support = true
[OHOS INFO]   remote_window_support = false
[OHOS INFO]   rich_components_support = true
[OHOS INFO]   use_build_in_js_engine = true
[OHOS INFO]   use_curl_download = true
[OHOS INFO]   video_components_support = false
[OHOS INFO]   web_components_support = false
[OHOS INFO]   xcomponent_components_support = false
[OHOS INFO] }
[OHOS INFO]   name = "mac"
[OHOS INFO] }, {
[OHOS INFO]   config = {
[OHOS INFO]   accessibility_support = true
[OHOS INFO]   advance_components_support = false
[OHOS INFO]   ark_engine = {
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }
[OHOS INFO]   build_for_preview = true
[OHOS INFO]   cflags_cc = ["-std=c++17", "-Wno-thread-safety-attributes", "-Wno-thread-safety-analysis", "-Wno-ignored-attributes", "-Wno-unknown-pragmas"]
[OHOS INFO]   connect_server_support = false
[OHOS INFO]   defines = ["PREVIEW", "ENABLE_ROSEN_BACKEND", "LINUX_PLATFORM", "UNICODE", "GPU_DISABLED", "SK_BUILD_FONT_MGR_FOR_PREVIEW_LINUX"]
[OHOS INFO]   enable_ability_component = false
[OHOS INFO]   enable_rosen_backend = true
[OHOS INFO]   enable_standard_input = false
[OHOS INFO]   enable_system_clipboard = false
[OHOS INFO]   form_components_support = false
[OHOS INFO]   image_components_support = false
[OHOS INFO]   js_engines = [{
[OHOS INFO]   engine_defines = ["USE_ARK_ENGINE"]
[OHOS INFO]   engine_name = "ark"
[OHOS INFO]   engine_path = "jsi"
[OHOS INFO] }]
[OHOS INFO]   js_pa_support = false
[OHOS INFO]   libace_target = "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_linux"
[OHOS INFO]   ohos_standard_fontmgr = true
[OHOS INFO]   platform_deps = ["//foundation/arkui/ace_engine/adapter/preview/entrance:ace_preview_entrance_linux", "//foundation/arkui/ace_engine/adapter/preview/external:preview_external_source_linux", "//foundation/arkui/ace_engine/adapter/preview/inspector:ace_inspector_linux", "//foundation/arkui/ace_engine/adapter/preview/osal:ace_osal_linux"]
[OHOS INFO]   plugin_components_support = false
[OHOS INFO]   preview_support = true
[OHOS INFO]   remote_window_support = false
[OHOS INFO]   rich_components_support = true
[OHOS INFO]   use_build_in_js_engine = true
[OHOS INFO]   use_curl_download = true
[OHOS INFO]   video_components_support = false
[OHOS INFO]   web_components_support = false
[OHOS INFO]   xcomponent_components_support = false
[OHOS INFO] }
[OHOS INFO]   name = "linux"
[OHOS INFO] }]
[OHOS INFO] Could not find oem hook
[OHOS INFO] out_dir:/home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/rk3568/gen/base/hiviewdfx/hiview
[OHOS INFO] 
[OHOS INFO] 
[OHOS INFO] bundle_framework_graphics = true
[OHOS INFO] bundle_framework_free_install = true
[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 = true
[OHOS INFO] device_manager_enable = true
[OHOS INFO] global_resmgr_enable = true
[OHOS INFO] hicollie_enable = true
[OHOS INFO] support_jsapi = true
[OHOS INFO] hisysevent_enable = true
[OHOS INFO] bms_rdb_enable = true
[OHOS INFO] hisysevent_usage = true
[OHOS INFO] has_hisysevent_part = true
[OHOS INFO] ["--haptobin", "../../developtools/packing_tool/adapter/ohos", "--haptobinOutput", "obj/developtools/packing_tool/jar/haptobin_tool.jar", "--unpackOutput", "obj/developtools/packing_tool/jar/app_unpacking_tool.jar", "--packOutput", "obj/developtools/packing_tool/jar/app_packing_tool.jar", "--outpath", "obj/developtools/packing_tool/jar", "--toolchain", "//build/toolchain/ohos:ohos_clang_arm", "--compileTarget", "image"]
[OHOS INFO] window_manager_feature_subscribe_motion = false
[OHOS INFO] soc_perf_enable:  true
[OHOS INFO] imf_enable:  true
[OHOS INFO] input_feature_combination_key = true
[OHOS INFO] input_feature_pointer_drawing = true
[OHOS INFO] input_feature_monitor = true
[OHOS INFO] input_feature_interceptor = true
[OHOS INFO] input_feature_keyboard = true
[OHOS INFO] input_feature_mouse = true
[OHOS INFO] input_feature_joystick = true
[OHOS INFO] input_feature_touchscreen = true
[OHOS INFO] input_feature_input_device = true
[OHOS INFO] input_feature_input_cooperation = false
[OHOS INFO] rk3568_group in
[OHOS INFO] accessibility_enable =  true
[OHOS INFO] default_toolchain =  //build/toolchain/ohos:ohos_clang_arm
[OHOS INFO] current_toolchain =  //build/toolchain/ohos:ohos_clang_arm
[OHOS INFO] host_toolchain =  //build/toolchain/linux:clang_x64
[OHOS INFO] root_out_dir =  //out/rk3568
[OHOS INFO] root_output_dir_proto =  out/rk3568/clang_x64
[OHOS INFO] histreamer plugin: ffmpeg_adapter = true
[OHOS INFO] histreamer plugin: wav_demuxer = false
[OHOS INFO] histreamer plugin: hdi_adapter = false
[OHOS INFO] histreamer plugin: file_source = true
[OHOS INFO] histreamer plugin: file_fd_source = true
[OHOS INFO] histreamer plugin: std_stream_source = true
[OHOS INFO] histreamer plugin: http_source = true
[OHOS INFO] histreamer plugin: stream_source = false
[OHOS INFO] histreamer plugin: audio_server_sink = true
[OHOS INFO] histreamer plugin:lite_aac_decoder = false
[OHOS INFO] histreamer plugin:std_video_surface_sink = true
[OHOS INFO] histreamer plugin:std_video_capture = false
[OHOS INFO] { }
[OHOS INFO] ERROR at //arkcompiler/ets_frontend/es2panda/BUILD.gn:309:1: action_foreach target has no sources.
[OHOS INFO] action_foreach("gen_keywords_headers") {
[OHOS INFO] ^---------------------------------------
[OHOS INFO] If you don't specify any sources, there is nothing to run your
[OHOS INFO] script over.
[OHOS INFO] See //arkcompiler/ets_frontend/es2panda/BUILD.gn:554:12: which caused the file to be included.
[OHOS INFO]   deps = [ ":es2panda(${toolchain_win})" ]
[OHOS INFO]            ^----------------------------
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct)  : 0
[OHOS INFO] cache hit (preprocessed)  : 0
[OHOS INFO] cache miss  : 0
[OHOS INFO] hit rate:  0.00% 
[OHOS INFO] mis rate: 0.00% 
[OHOS INFO] ---------------------------------------------
[OHOS INFO] file: /home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/rk3568/.ninja_log not exists
[OHOS INFO] parse file fail
[OHOS ERROR] Please check build log in /home/linux/Documents/DevEco/Projects/OpenHarmony-v3.2-Release/out/rk3568/build.log
=====build  error=====

跟着OpenHarmony文档走,到这一步一定会报这个错误,这是什么原因,该如何解决

GN文件的554行注释掉试一试

引用chatgpt内容作答:
根据提供的编译日志,报错信息显示在文件//arkcompiler/ets_frontend/es2panda/BUILD.gn的第309行,具体错误信息如下:

ERROR at //arkcompiler/ets_frontend/es2panda/BUILD.gn:309:1: action_foreach target has no sources.
action_foreach("gen_keywords_headers") {
^---------------------------------------
If you don't specify any sources, there is nothing to run your
script over.
See //arkcompiler/ets_frontend/es2panda/BUILD.gn:554:12: which caused the file to be included.
deps = [ ":es2panda(${toolchain_win})" ]
^----------------------------

这个错误提示说明在gen_keywords_headers这个目标中没有指定任何源文件。可能的原因是在配置文件中缺少了必要的配置或指定了错误的源文件路径。

为了解决这个问题,你可以按照以下步骤进行操作:

1、确保你的配置文件中指定了正确的源文件路径。检查一下//arkcompiler/ets_frontend/es2panda/BUILD.gn文件中是否有指定源文件的部分。

2、检查配置文件中gen_keywords_headers目标的定义是否正确,并确保它包含正确的源文件。查看//arkcompiler/ets_frontend/es2panda/BUILD.gn文件的第309行,确认该目标是否正确设置了源文件。

3、检查相关的依赖项。根据错误提示,检查//arkcompiler/ets_frontend/es2panda/BUILD.gn文件的第554行,确保依赖项的设置是正确的。