ERROR at //build/config/BUILDCONFIG.gn:401:1: Unknown function.

这篇博客探讨了在构建配置文件时遇到的GN错误,具体为在BUILDCONFIG.gn第401行出现未知函数问题。错误提示指出该函数可能在当前GN版本中不存在,需要更新到相应版本以解决。文章将指导读者如何识别并更新GN版本,以确保构建过程的顺利进行。

ERROR at //build/config/BUILDCONFIG.gn:401:1: Unknown function.

ERROR at //build/config/BUILDCONFIG.gn:401:1: Unknown function.
set_sources_assignment_filter(sources_assignment_filter)

错误是GN的版本 没有此函数,需要更新GN到相应的版本

[OHOS INFO] ERROR at //third_party/tinyxml2/BUILD.gn:16:1: Unknown function. [OHOS INFO] lite_library("tinyxml2_static") { [OHOS INFO] ^----------- [OHOS INFO] See //vendor/bestechnic/display_demo/tests/mdtp/BUILD.gn:13:5: which caused the file to be included. [OHOS INFO] "//third_party/tinyxml2:tinyxml2" [OHOS INFO] ^-------------------------------- [OHOS INFO] build wifiiot_v200zr : true [OHOS INFO] copy signature bin exec_path /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo [OHOS INFO] fs_src: /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/data [OHOS INFO] bsp_path: /home/zkxi/workspace/L0_332/src/device/soc/bestechnic/bes2600/liteos_m/../../aos_bsp [OHOS ERROR] ERROR at //third_party/tinyxml2/BUILD.gn:16:1: Unknown function. [OHOS ERROR] lite_library("tinyxml2_static") { [OHOS ERROR] ^----------- [OHOS ERROR] See //vendor/bestechnic/display_demo/tests/mdtp/BUILD.gn:13:5: which caused the file to be included. [OHOS ERROR] "//third_party/tinyxml2:tinyxml2" [OHOS ERROR] ^-------------------------------- [OHOS ERROR] build wifiiot_v200zr : true [OHOS ERROR] copy signature bin exec_path /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo [OHOS ERROR] fs_src: /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/data [OHOS ERROR] bsp_path: /home/zkxi/workspace/L0_332/src/device/soc/bestechnic/bes2600/liteos_m/../../aos_bsp [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/zkxi/workspace/L0_332/src/build/hb/containers/status.py", line 47, in wrapper [OHOS ERROR] return func(*args, **kwargs) [OHOS ERROR] File "/home/zkxi/workspace/L0_332/src/build/hb/services/gn.py", line 197, in _execute_gn_gen_cmd [OHOS ERROR] SystemUtil.exec_command(gn_gen_cmd, self.config.log_path) [OHOS ERROR] File "/home/zkxi/workspace/L0_332/src/build/hb/util/system_util.py", line 64, in exec_command [OHOS ERROR] LogUtil.get_failed_log(log_path) [OHOS ERROR] File "/home/zkxi/workspace/L0_332/src/build/hb/util/log_util.py", line 191, in get_failed_log [OHOS ERROR] LogUtil.get_gn_failed_log(log_path) [OHOS ERROR] File "/home/zkxi/workspace/L0_332/src/build/hb/util/log_util.py", line 137, in get_gn_failed_log [OHOS ERROR] raise OHOSException( [OHOS ERROR] exceptions.ohos_exception.OHOSException: GN Failed! Please check error in /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/error.log, and for more build information in /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/build.log [OHOS ERROR] [OHOS ERROR] Code: 3000 [OHOS ERROR] [OHOS ERROR] Reason: GN Failed! Please check error in /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/error.log, and for more build information in /home/zkxi/workspace/L0_332/src/out/v200zr/display_demo/build.log [OHOS ERROR] [OHOS ERROR] Error Type: UNKNOWN 这个报错是怎么回事?
09-09
[OHOS ERROR] [21169/81830] ACTION //foundation/communication/netmanager_base/services/netmanagernative/bpf:netsys(//build/toolchain/ohos:ohos_clang_arm) [OHOS ERROR] FAILED: obj/foundation/communication/netmanager_base/services/netmanagernative/bpf/netsys.o [OHOS ERROR] /usr/bin/env ../../build/scripts/bpf.py --clang-path ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang --output-file obj/foundation/communication/netmanager_base/services/netmanagernative/bpf/netsys.o --include-dirs obj/build/templates/bpf/arm-linux-ohos/usr/include obj/build/templates/bpf/arm-linux-ohos ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/include --input-file ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/src/netsys.c [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/out/rk3568/../../build/scripts/bpf.py", line 71, in <module> [OHOS ERROR] sys.exit(main(sys.argv[1:])) [OHOS ERROR] ^^^^^^^^^^^^^^^^^^ [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/out/rk3568/../../build/scripts/bpf.py", line 58, in main [OHOS ERROR] build_utils.call_and_write_depfile_if_stale( [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/build/scripts/util/build_utils.py", line 729, in call_and_write_depfile_if_stale [OHOS ERROR] md5_check.call_and_record_if_stale(on_stale_md5, [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/build/scripts/util/md5_check.py", line 121, in call_and_record_if_stale [OHOS ERROR] function(*args) [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/build/scripts/util/build_utils.py", line 719, in on_stale_md5 [OHOS ERROR] function(*args) [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/out/rk3568/../../build/scripts/bpf.py", line 59, in <lambda> [OHOS ERROR] lambda: bpf_compile(options, cmd), [OHOS ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^ [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/out/rk3568/../../build/scripts/bpf.py", line 42, in bpf_compile [OHOS ERROR] build_utils.check_output(cmd, env=my_env) [OHOS ERROR] File "/home/jianhong/OpenHarmony_5.0/build/scripts/util/build_utils.py", line 257, in check_output [OHOS ERROR] raise CalledProcessError(cwd, args, stdout + stderr) [OHOS ERROR] util.build_utils.CalledProcessError: Command failed: ( cd /home/jianhong/OpenHarmony_5.0/out/rk3568; ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang -v -g -c -O2 -target bpf -I obj/build/templates/bpf/arm-linux-ohos/usr/include -I obj/build/templates/bpf/arm-linux-ohos -I ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/include -c ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/src/netsys.c -o obj/foundation/communication/netmanager_base/services/netmanagernative/bpf/netsys.o ) [OHOS ERROR] OHOS (dev) clang version 15.0.4 (llvm-project ef33c3575763937746833063de4d2e1fd184bbf7) [OHOS ERROR] Target: bpf [OHOS ERROR] Thread model: posix [OHOS ERROR] InstalledDir: /home/jianhong/OpenHarmony_5.0/out/rk3568/../../prebuilts/clang/ohos/linux-x86_64/llvm/bin [OHOS ERROR] (in-process) [OHOS ERROR] "/home/jianhong/OpenHarmony_5.0/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang-15" -cc1 -triple bpf -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name netsys.c -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/jianhong/OpenHarmony_5.0/out/rk3568 -resource-dir /home/jianhong/OpenHarmony_5.0/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/15.0.4 -I obj/build/templates/bpf/arm-linux-ohos/usr/include -I obj/build/templates/bpf/arm-linux-ohos -I ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/include -O2 -fdebug-compilation-dir=/home/jianhong/OpenHarmony_5.0/out/rk3568 -ferror-limit 19 -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o obj/foundation/communication/netmanager_base/services/netmanagernative/bpf/netsys.o -x c ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/src/netsys.c [OHOS ERROR] clang -cc1 version 15.0.4 based upon LLVM 15.0.4 default target x86_64-unknown-linux-gnu [OHOS ERROR] #include "..." search starts here: [OHOS ERROR] #include <...> search starts here: [OHOS ERROR] obj/build/templates/bpf/arm-linux-ohos/usr/include [OHOS ERROR] obj/build/templates/bpf/arm-linux-ohos [OHOS ERROR] ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/include [OHOS ERROR] /usr/local/include [OHOS ERROR] /home/jianhong/OpenHarmony_5.0/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/15.0.4/include [OHOS ERROR] /usr/include [OHOS ERROR] End of search list. [OHOS ERROR] In file included from ../../foundation/communication/netmanager_base/services/netmanagernative/bpf/src/netsys.c:17: [OHOS ERROR] obj/build/templates/bpf/arm-linux-ohos/bpf/bpf_helpers.h:11:10: fatal error: 'bpf_helper_defs.h' file not found [OHOS ERROR] #include "bpf_helper_defs.h" [OHOS ERROR] ^~~~~~~~~~~~~~~~~~~ [OHOS ERROR] 1 error generated.
最新发布
12-26
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值