55 Star 85 Fork 947

OpenHarmony / build

 / 详情

[问题咨询]: 添加新模块如何修改白名单

待办的
创建于  
2024-05-03 00:30

问题描述

【问题描述】
在device/soc/rockchip/rk3568/hardware/sqlite3_lib路径下添加一个库,代码如下

import("//build/ohos.gni")

ohos_shared_library("sqlite3_lib") {
  include_dirs = [
    "./",
    "//third_party/sqlite/include",
  ]
  sources = [
    "sqlite3_lib.c",
  ]

  deps = [
    "//third_party/sqlite:sqlite",
  ]

  install_images = [ chipset_base_dir ]
  subsystem_name = "rockchip_products"
}

group("sq") {
  deps = [
    ":sqlite3_lib",
  ]
}

我在build仓做了如下修改

diff --git a/compile_standard_whitelist.json b/compile_standard_whitelist.json
index ce4ca863..edfa2c48 100644
--- a/compile_standard_whitelist.json
+++ b/compile_standard_whitelist.json
@@ -33,7 +33,9 @@
         "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/dec:libomxvpu_dec",
         "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/enc:libomxvpu_enc",
         "//device/soc/rockchip/rk3568/hardware/omx_il/core:libOMX_Core",
+        "//device/soc/rockchip/rk3568/hardware/sqlite3_lib:sqlite3_lib",
         "//device/soc/rockchip/rk3568/hardware/omx_il/libOMXPlugin:libOMX_Pluginhw",
+        "//third_party/sqlite:sqlite",
         "//foundation/arkui/napi/sample/native_module_systemtest:systemtestnapi",
         "//ide/tools/previewer:lite_previewer",
         "//vendor/hihope/rk3568/bluetooth:libbt_vendor",
@@ -128,6 +130,7 @@
         "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/dec:libomxvpu_dec",
         "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/enc:libomxvpu_enc",
         "//device/soc/rockchip/rk3568/hardware/omx_il/core:libOMX_Core",
+        "//device/soc/rockchip/rk3568/hardware/sqlite3_lib:sqlite3_lib",
         "//device/soc/rockchip/rk3568/hardware/omx_il/osal:RkOMX_OSAL",
         "//drivers/hdf_core/adapter/build/test_common:libhdf_test_common",
         "//drivers/hdf_core/adapter/uhdf/manager:hdf_core",
@@ -418,6 +421,7 @@
         "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/enc:libomxvpu_enc",
         "//device/soc/rockchip/rk3568/hardware/omx_il/core:libOMX_Core",
         "//device/soc/rockchip/rk3568/hardware/omx_il/libOMXPlugin:libOMX_Pluginhw",
+        "//device/soc/rockchip/rk3568/hardware/sqlite3_lib:sqlite3_lib",
         "//device/soc/rockchip/rk3568/hardware/omx_il/osal:RkOMX_OSAL",
         "//drivers/hdf_core/adapter/uhdf/platform:hdf_platform",
         "//drivers/peripheral/input/hal:hdi_input",
@@ -691,6 +695,7 @@
         "//third_party/vk-gl-cts/modules/gles3:libdeqp-gles3",
         "//third_party/vk-gl-cts/modules/glshared:deqp-gl-shared_source",
         "//third_party/vk-gl-cts/modules/glshared:libdeqp-gl-shared",
+        "//third_party/sqlite:sqlite",
         "//third_party/rust/crates/rust-openssl/openssl-sys:lib"
     ]
 }
diff --git a/component_compilation_whitelist.json b/component_compilation_whitelist.json
index 3feae15c..6e6af216 100644
--- a/component_compilation_whitelist.json
+++ b/component_compilation_whitelist.json
@@ -212,6 +212,7 @@
         "//third_party/skia:gif",
         "//third_party/skia:heif",
         "//third_party/skia:jpeg_decode",
+        "//third_party/sqlite:sqlite",
         "//third_party/skia:jpeg_encode",
         "//foundation/systemabilitymgr/samgr/services/samgr/native/test/unittest:samgr_proxy_tdd",
         "//third_party/skia:pdf",
@@ -13766,4 +13767,4 @@
             "//arkcompiler/ets_frontend/es2panda/es2abc_config.gni"
         ]
     }
-}
\ No newline at end of file
+}
diff --git a/core/gn/ohos_exec_script_allowlist.gni b/core/gn/ohos_exec_script_allowlist.gni
index 0a986f49..e6d036b1 100644
--- a/core/gn/ohos_exec_script_allowlist.gni
+++ b/core/gn/ohos_exec_script_allowlist.gni
@@ -188,6 +188,7 @@ ohos_exec_script_config = {
     "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/build_overrides/build.gni",
     "//third_party/spirv-tools/build_overrides/build.gni",
     "//third_party/toybox/BUILD.gn",
+    "//third_party/sqlite/BUILD.gn",
     "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/BUILD.gn",
     "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_vendor_ext.gni",
     "//build_plugins/config/aosp/config.gni",

【问题现象】
但是编译一直报错如下:
输入图片说明

[OHOS INFO] [6024/52098] ACTION //domains/advertising/advertising/common:advertising_common__notice(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] [6025/52098] ACTION //domains/advertising/advertising/frameworks/js/napi/ads:advertising__notice(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] [6026/52098] ACTION //device/board/hihope/rk3568/kernel:kernel(//build/toolchain/ohos:ohos_clang_arm)

[OHOS ERROR] [6011/52098] ACTION //device/soc/rockchip/rk3568/hardware/sqlite3_lib:sqlite3_lib__check(//build/toolchain/ohos:ohos_clang_arm)
[OHOS ERROR] FAILED: obj/device/soc/rockchip/rk3568/hardware/sqlite3_lib/sqlite3_lib__check.txt
[OHOS ERROR] /usr/bin/env ../../build/templates/common/check_build_target.py --part-name rockchip_products --subsystem-name rockchip_products --target-path //device/soc/rockchip/rk3568/hardware/sqlite3_lib:sqlite3_lib --depfile gen/device/soc/rockchip/rk3568/hardware/sqlite3_lib/sqlite3_lib__check.d --output obj/device/soc/rockchip/rk3568/hardware/sqlite3_lib/sqlite3_lib__check.txt --compile-standard-allow-file ../preloader/rk3568/compile_standard_whitelist.json --deps //third_party/sqlite:sqlite

[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR]     return func(*args, **kwargs)
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/modules/ohos_build_module.py", line 67, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR]     super().run()
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/modules/interface/build_module_interface.py", line 72, in run
[OHOS ERROR]     raise exception
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/modules/interface/build_module_interface.py", line 70, in run
[OHOS ERROR]     self._target_compilation()
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/modules/ohos_build_module.py", line 103, in _target_compilation
[OHOS ERROR]     self.target_compiler.run()
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/services/ninja.py", line 38, in run
[OHOS ERROR]     self._execute_ninja_cmd()
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/services/ninja.py", line 69, in _execute_ninja_cmd
[OHOS ERROR]     SystemUtil.exec_command(
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/util/system_util.py", line 64, in exec_command
[OHOS ERROR]     LogUtil.get_failed_log(log_path)
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/util/log_util.py", line 193, in get_failed_log
[OHOS ERROR]     LogUtil.get_compiler_failed_log(log_path)
[OHOS ERROR]   File "/home/wen_fei/OpenHarmony/OpenHarmony-v4.1-Release/build/hb/util/log_util.py", line 180, in get_compiler_failed_log

请教一下如何修改才能编译通过

评论 (1)

闻飞 创建了任务
闻飞 添加了
 
question
标签
展开全部操作日志

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 @RingKing @handy @chenmudan @liwentao 。如果需要调整订阅PR、Issue的变更状态,请访问链接

Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer @RingKing @handy @chenmudan @liwentao for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

openharmony_ci 添加了
 
waiting_for_assign
标签

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
7387629 openharmony ci 1656582662
1
https://gitee.com/openharmony/build.git
git@gitee.com:openharmony/build.git
openharmony
build
build

搜索帮助