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] [288/328] gcc cross compiler obj/vendor/hihope/hispark_pegasus/demo/06_gpioled/libled_example.led_example.o [OHOS ERROR] FAILED: obj/vendor/hihope/hispark_pegasus/demo/06_gpioled/libled_example.led_example.o [OHOS ERROR] riscv32-unknown-elf-gcc.exe -D_XOPEN_SOURCE=700 -DOHOS_DEBUG -D__LITEOS__ -D__LITEOS_M__ -I../../../base/iot_hardware/peripheral/interfaces -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/system/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/config -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/config/nv -I../../../utils/native/lite/include -I../../../device/hisilicon/hispark_pegasus/hi3861_adapter/kal/cmsis -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/base/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/arch/risc-v/rv32im -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libm/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libsec/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/net/wpa_supplicant-2.7/src/common -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/plat/riscv -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/extended/runstop -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/posix/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/linux/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/third_party/lwip_sack/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/arch/generic -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/arch/riscv32 -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/hw/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/nuttx/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libsec/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/config -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/user -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/plat -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/extend/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/arch -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/bionic/libm -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/shell/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/net/telnet/include -Os -mabi=ilp32 -falign-functions=2 -msave-restore -fno-optimize-strlen -freorder-blocks-algorithm=simple -fno-schedule-insns -fno-inline-small-functions -fno-inline-functions-called-once -mtune=size -mno-small-data-limit=0 -fno-aggressive-loop-optimizations -std=c99 -Wpointer-arith -Wstrict-prototypes -ffunction-sections -fdata-sections -fno-exceptions -fno-short-enums -Wextra -Wundef -U PRODUCT_CFG_BUILD_TIME -DLOS_COMPILE_LDM -DPRODUCT_USR_SOFT_VER_STR=None -DCYGPKG_POSIX_SIGNALS -D__ECOS__ -D__RTOS_ -DPRODUCT_CFG_HAVE_FEATURE_SYS_ERR_INFO -D__LITEOS__ -DLIB_CONFIGURABLE -DLOSCFG_SHELL -DLOSCFG_CACHE_STATICS -DCUSTOM_AT_COMMAND -DLOS_COMPILE_LDM -DLOS_CONFIG_IPERF3 -DCMSIS_OS_VER=2 -DSECUREC_ENABLE_SCANF_FILE=0 -DCONFIG_AT_COMMAND -DPRODUCT_CFG_CHIP_VER_STR=Hi3861V100 -DCHIP_VER_Hi3861 -DPRODUCT_CFG_SOFT_VER_STR=Hi3861 -DHI_BOARD_ASIC -DHI_ON_FLASH -DLITEOS_WIFI_IOT_VERSION -mabi=ilp32 -falign-functions=2 -msave-restore -fno-optimize-strlen -freorder-blocks-algorithm=simple -fno-schedule-insns -fno-inline-small-functions -fno-inline-functions-called-once -mtune=size -mno-small-data-limit=0 -fno-aggressive-loop-optimizations -std=c99 -Wpointer-arith -Wstrict-prototypes -ffunction-sections -fdata-sections -fno-exceptions -fno-short-enums -Wextra -Wundef -U PRODUCT_CFG_BUILD_TIME -DLOS_COMPILE_LDM -DPRODUCT_USR_SOFT_VER_STR=None -DCYGPKG_POSIX_SIGNALS -D__ECOS__ -D__RTOS_ -DPRODUCT_CFG_HAVE_FEATURE_SYS_ERR_INFO -D__LITEOS__ -DLIB_CONFIGURABLE -DLOSCFG_SHELL -DLOSCFG_CACHE_STATICS -DCUSTOM_AT_COMMAND -DLOS_COMPILE_LDM -DLOS_CONFIG_IPERF3 -DCMSIS_OS_VER=2 -DSECUREC_ENABLE_SCANF_FILE=0 -DCONFIG_AT_COMMAND -DPRODUCT_CFG_CHIP_VER_STR=Hi3861V100 -DCHIP_VER_Hi3861 -DPRODUCT_CFG_SOFT_VER_STR=Hi3861 -DHI_BOARD_ASIC -DHI_ON_FLASH -DLITEOS_WIFI_IOT_VERSION -march=rv32imac -fno-common -fno-builtin -fno-strict-aliasing -Wall -fsigned-char -fstack-protector-all -std=c99 -c ../../../vendor/hihope/hispark_pegasus/demo/06_gpioled/led_example.c -o obj/vendor/hihope/hispark_pegasus/demo/06_gpioled/libled_example.led_example.o [OHOS ERROR] ../../../vendor/hihope/hispark_pegasus/demo/06_gpioled/led_example.c:22:10: fatal error: iot_gpio.h: No such file or directory [OHOS ERROR] #include "iot_gpio.h" // GPIO基础操作 [OHOS ERROR] ^~~~~~~~~~~~ [OHOS ERROR] compilation terminated. [OHOS ERROR] you can check build log in D:\cs\hi3861\src\out\hispark_pegasus\wifiiot_hispark_pegasus\build.log [OHOS ERROR] command: "D:\cs\thirdparty\python38\scripts\ninja.exe -w dupbuild=warn -C D:\cs\hi3861\src\out\hispark_pegasus\wifiiot_hispark_pegasus" failed [OHOS ERROR] return code: 1 [OHOS ERROR] execution path: D:\cs\hi3861\src scons: *** [src\out\hispark_pegasus\wifiiot_hispark_pegasus\target.elf] Failed to build!
07-03
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值