config.json把相关子系统裁剪后,编译报错,显示很多组件依赖所裁剪子系统

nanfengchuiyeluo 显示全部楼层 发表于 2024-1-22 10:11:11
【问题描述】
我想要裁剪标准系统下的图形子系统、多媒体子系统以及电话子系统,在config.json删除对应子系统配置后,编译报错,如下:

```
[OHOS INFO] ERROR at //build/templates/cxx/cxx.gni:585:7: Script returned non-zero exit code.
[OHOS INFO]       exec_script(external_deps_script, arguments, "string")
[OHOS INFO]       ^----------
[OHOS INFO] Current dir: /home/st/share/harmony-3.2/root/data/harmony/release_code/2023-04-09/OpenHarmony-v3.2-Release/OpenHarmony/out/phytiumpi-firefly/
[OHOS INFO] Command: /usr/bin/env /home/st/share/harmony-3.2/root/data/harmony/release_code/2023-04-09/OpenHarmony-v3.2-Release/OpenHarmony/build/templates/common/external_deps_handler.py --external-deps ability_base:want ability_base:zuri ability_runtime:ability_manager access_token:libaccesstoken_sdk bundle_framework:appexecfwk_base bundle_framework:appexecfwk_core c_utils:utils device_info_manager:distributed_device_profile_client device_manager:devicemanagersdk eventhandler:libeventhandler hisysevent_native:libhisysevent hitrace_native:hitrace_meter hitrace_native:libhitracechain hiviewdfx_hilog_native:libhilog imf:inputmethod_client init:libbeget_proxy init:libbegetutil ipc:ipc_core multimedia_image_framework:image_native os_account:os_account_innerkits safwk:system_ability_fwk samgr:samgr_proxy --parts-src-flag-file build_configs/parts_src_flag.json --external-deps-temp-file gen/foundation/distributeddatamgr/pasteboard/services/pasteboard__pasteboard_service_external_deps_temp.json --sdk-base-dir ../../sdk/ohos-arm64 --sdk-dir-name sdk/ohos-arm64 --current-toolchain //build/toolchain/ohos:ohos_clang_arm64 --innerkits-adapter-info-file ../../build/ohos/inner_kits_adapter.json
[OHOS INFO] Returned 1 and printed out:
[OHOS INFO]
[OHOS INFO] file '../../sdk/ohos-arm64/multimedia_image_framework/sdk_info.json' doesn't exist.
[OHOS INFO]
[OHOS INFO] stderr:
[OHOS INFO]
[OHOS INFO] Traceback (most recent call last):
[OHOS INFO]   File "/home/st/share/harmony-3.2/root/data/harmony/release_code/2023-04-09/OpenHarmony-v3.2-Release/OpenHarmony/build/templates/common/external_deps_handler.py", line 248, in <module>
[OHOS INFO]     sys.exit(main())
[OHOS INFO]   File "/home/st/share/harmony-3.2/root/data/harmony/release_code/2023-04-09/OpenHarmony-v3.2-Release/OpenHarmony/build/templates/common/external_deps_handler.py", line 214, in main
[OHOS INFO]     sdk_module_info, adapted_ok = _get_external_module_from_sdk(
[OHOS INFO]   File "/home/st/share/harmony-3.2/root/data/harmony/release_code/2023-04-09/OpenHarmony-v3.2-Release/OpenHarmony/build/templates/common/external_deps_handler.py", line 73, in _get_external_module_from_sdk
[OHOS INFO]     raise Exception("part '{}' doesn't exist in sdk modules.".format(
[OHOS INFO] Exception: part 'multimedia_image_framework' doesn't exist in sdk modules.
[OHOS INFO]
[OHOS INFO] See //foundation/distributeddatamgr/pasteboard/services/BUILD.gn:49:1: whence it was called.
[OHOS INFO] ohos_shared_library("pasteboard_service") {
[OHOS INFO] ^------------------------------------------
[OHOS INFO] See //build/ohos/ohos_part.gni:25:16: which caused the file to be included.
[OHOS INFO]     _deps += [ get_label_info(module_label, "label_with_toolchain
```


看报错像是有些模块依赖于所裁剪的多媒体子系统,这样的话是不是就没有完全解耦,那我想要裁剪相关子系统应该如何做?




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

精彩评论4

nanfengchuiyeluo

沙发 发表于 2024-1-23 09:11:04
有人能帮忙解答下吗

论坛小助手

发表于 2024-2-2 11:54  IP属地: 广东省广州市

回复 nanfengchuiyeluo: 来了来了

【1 条回复】

论坛小助手 官方账号

板凳 发表于 2024-2-2 11:54:04
子系统内各部件模块会对外提供功能接口,举例来说,对于DFX子系统,其他子系统都会调用该子系统提供的日志打印能力,这就存在一定的依赖关系,单独裁剪掉DFX子系统则会导致其他子系统编译都报错。因此裁剪掉子系统后,需要将对其有依赖的所有子系统全部裁剪掉

nanfengchuiyeluo

发表于 2024-2-18 15:11  IP属地: 广东省广州市

回复 论坛小助手: 那这样的话我就需要把所有依赖的子系统都先梳理出来,然后再裁剪到,如果有些依赖的子系统我不想要裁剪到怎么办呢?就只能把对应子系统引用相关模块的代码给删掉吗?那这裁剪起来也太麻烦了吧,openharmony不是说组件化设计嘛,不应该很容易裁剪嘛

论坛小助手

发表于 2024-2-19 16:39  IP属地: 广东省广州市

回复 nanfengchuiyeluo: 是都需要裁剪掉。DFX是公共能力

【2 条回复】
共4 条回复,点击查看

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

返回顶部