OpenHarmony开发者论坛
标题:
config.json把相关子系统裁剪后,编译报错,显示很多组件依赖所裁剪子系统
[打印本页]
作者:
nanfengchuiyeluo
时间:
2024-1-22 10:11
标题:
config.json把相关子系统裁剪后,编译报错,显示很多组件依赖所裁剪子系统
【问题描述】
我想要裁剪标准系统下的图形子系统、多媒体子系统以及电话子系统,在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/s
t/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
```
看报错像是有些模块依赖于所裁剪的多媒体子系统,这样的话是不是就没有完全解耦,那我想要裁剪相关子系统应该如何做?
作者:
nanfengchuiyeluo
时间:
2024-1-23 09:11
有人能帮忙解答下吗
作者:
论坛小助手
时间:
2024-2-2 11:54
子系统内各部件模块会对外提供功能接口,举例来说,对于DFX子系统,其他子系统都会调用该子系统提供的日志打印能力,这就存在一定的依赖关系,单独裁剪掉DFX子系统则会导致其他子系统编译都报错。因此裁剪掉子系统后,需要将对其有依赖的所有子系统全部裁剪掉
作者:
论坛小助手
时间:
2024-2-2 11:54
回复
nanfengchuiyeluo
: 来了来了
作者:
nanfengchuiyeluo
时间:
2024-2-18 15:11
回复
论坛小助手
: 那这样的话我就需要把所有依赖的子系统都先梳理出来,然后再裁剪到,如果有些依赖的子系统我不想要裁剪到怎么办呢?就只能把对应子系统引用相关模块的代码给删掉吗?那这裁剪起来也太麻烦了吧,openharmony不是说组件化设计嘛,不应该很容易裁剪嘛
作者:
论坛小助手
时间:
2024-2-19 16:39
回复
nanfengchuiyeluo
: 是都需要裁剪掉。DFX是公共能力
欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/)
Powered by Discuz! X3.5