wifi类实验代码编译不过

数创院刘Sir 显示全部楼层 发表于 2024-4-17 09:28:03

之前官网上下载的关于wifi的各种案例代码,现在编译都过不了,报各种中间文件错误问题,传感器类的代码可以正常编译,尝试过1.1.0,1.1.3,3.2.4的源码,出现各种不同的编译问题

[OHOS ERROR] [750/770] ACTION //device/soc/hisilicon/hi3861v100/sdk_liteos:run_wifiiot_scons(//build/lite/toolchain:riscv32-unknown-elf)
[OHOS ERROR] FAILED: obj/device/soc/hisilicon/hi3861v100/sdk_liteos/run_wifiiot_scons_build_ext_components.txt 
[OHOS ERROR] /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/prebuilts/python/linux-x86/3.9.2/bin/python3 ../../../build/lite/build_ext_components.py --path=../../../device/soc/hisilicon/hi3861v100/sdk_liteos --command=sh\ hm_build.sh\ /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus\ linux --target_dir=/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus/obj/device/soc/hisilicon/hi3861v100/sdk_liteos/build.log --out_dir=/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/out/hispark_pegasus/wifiiot_hispark_pegasus/error.log
[OHOS ERROR] execute ota_builder with python...
[OHOS ERROR] riscv32-unknown-elf-gcc -Iplatform/os/Huawei_LiteOS/kernel/include -Iconfig -DCONFIG_TEE_HUKS_SUPPORT -DCONFIG_CHIP_PKT_32K -DHI_BOARD_ASIC -DHI_ON_FLASH -E build/link/system_config.ld.S -o build/build_tmp/scripts/system_config.ld -P
[OHOS ERROR] nvimg_builder(["build/build_tmp/scripts/system_config.ld"], ["build/link/system_config.ld.S"])
[OHOS ERROR] product_name_list: ['sta']
[OHOS ERROR] xml h file: /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv
[OHOS ERROR] /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta
[OHOS ERROR] app_subver_list: ['demo']
[OHOS ERROR] current subver_name:demo
[OHOS ERROR] root_dir: /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool
[OHOS ERROR] mdm_xml: /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/xml_file/mss_nvi_db.xml
[OHOS ERROR] HNV NAME:mss_nvi_db.xml
[OHOS ERROR] nv_tool: /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/tools/nv/cdbm
[OHOS ERROR] app_subver_temp_dir:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/outside_demo
[OHOS ERROR] make app_subver_temp_dir
[OHOS ERROR] mdmxml:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/xml_file/mss_nvi_db.xml
[OHOS ERROR] src_xml_list: ['/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/xml_file/mss_nvi_db.xml']
[OHOS ERROR] combin_xml:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/mss_nvi_db.xml
[OHOS ERROR] root_list [<Element 'HISTUDIO' at 0x7fec8e0346d0>]
[OHOS ERROR] hi_nv_modify_by_cfg
[OHOS ERROR] cfg_file: nv
[OHOS ERROR] 
[OHOS ERROR] cmd_line= ('/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/tools/nv/cdbm', '/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/outside_demo/nv.xml', '/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv', '/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/outside_demo/nv')
[OHOS ERROR] /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/outside_demo/nv.xml
[OHOS ERROR] /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv
[OHOS ERROR] /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/Hi3861_wifiiot_app/outside_demo/nv
[OHOS ERROR] ===========Init HDB Start===========
[OHOS ERROR] *********strDataTypeDefPath:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv/../nv/nv_modem_struct_def.txt
[OHOS ERROR] *********strDataTypeDefPath:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv/../nv/nv_modem_struct_def.txt
[OHOS ERROR] *********strDataTypeDefPath:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/h_file/nv/../nv/nv_factory_struct_def.txt
[OHOS ERROR] ===========Init HDB finish===========
[OHOS ERROR] ===========Write NV Buffer To File===========
[OHOS ERROR] ===========Write NV Buffer Finish===========
[OHOS ERROR] RETURN VALUE:0
[OHOS ERROR] dst_hnv= /home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/hnv/Hi3861_wifiiot_app.hnv
[OHOS ERROR] Factory NV total num:10
[OHOS ERROR] NV_FILE_STRU :28
[OHOS ERROR] Factory NV total size:824
[OHOS ERROR] Normal NV total num:13
[OHOS ERROR] NV_FILE_STRU :28
[OHOS ERROR] Normal NV total size:766
[OHOS ERROR] build hnv OK:/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/tools/nvtool/out_nv_bin/sta/nv/hnv/Hi3861_wifiiot_app.hnv
[OHOS ERROR] ENDING
[OHOS ERROR] riscv32-unknown-elf-gcc -Iplatform/os/Huawei_LiteOS/kernel/include -Iconfig -DCONFIG_TEE_HUKS_SUPPORT -DCONFIG_CHIP_PKT_32K -DHI_BOARD_ASIC -DHI_ON_FLASH -DFLASH_FIRM_START=4248512 -E build/link/link.ld.S -o build/build_tmp/scripts/link.lds -P
[OHOS ERROR] riscv32-unknown-elf-ld -nostartfiles -nostdlib -static --gc-sections -L/home/harmonyos/.deveco-device-tool/resources/compilers/gcc-riscv32/7.3.0/gcc_riscv32/bin/../lib/gcc/riscv32-unknown-elf/7.3.0 -L/home/harmonyos/share/code-v3.2.4-Release_20231113/OpenHarmony-v3.2.4-Release/OpenHarmony/device/soc/hisilicon/hi3861v100/sdk_liteos/build/scripts/../../../../../huawei/hms/hilink/ohos/l0/hi3861/lib/wifi -Lbuild/build_tmp/libs/app/wifiiot_app -Lbuild/build_tmp/libs/components/at -Lbuild/build_tmp/libs/platform/drivers -Lbuild/build_tmp/libs/platform/system -Lbuild/build_tmp/scripts -Lbuild/libs -Lbuild/libs/hi3861/release/no_mesh -Lbuild/scripts -Lohos/libs -Tbuild/build_tmp/scripts/link.lds -Map=output/bin/Hi3861_wifiiot_app.map -o output/bin/Hi3861_wifiiot_app.out --start-group -ladc -lat -lc_flash -lcfg -lcoap -lcpup -ldiag -ldrv -lflash -lgcc -lgpio -lhistreaminglink -li2c -lio -liperf -llitekernel_flash -lltoswpa -llwip -lm_flash -lmbedtls -lmqtt -lparttab -lpwm -lres_cfg -lsdio -lsec_flash -lspiffs -lsystem -ltsensor -luart -lupg -lwifi -lwifi_flash -lwifiiot_app -lwpa --whole-archive -lhal_update_static -lhiview_lite_static -lbootstrap -lhal_file_static -linithook -lutils_kv_store -lhal_wifiaware -lsoftbus_server_frame -ldeviceauth_hal_liteos -lhichainsdk -lhilog_lite_static -lsamgr_adapter -lbegetutil -lcmsis -lmbedtls -lhal_sysparam -lhal_iothardware -lhievent_lite_static -lcjson_static -lhota -lnet_demo -lhidumper_mini -ldeviceauth -lparam_client_lite -lposix -lsoftbus_client -lblackbox -linit_utils -lsamgr_source -lhal_sys_param -lwifiservice -lhilog_static -lwifiaware -lsamgr -lsoftbus_adapter -lsoftbus_utils -lnstackx_ctrl -lnstackx_util.open -linit_log -lbroadcast -lsensing_demo -lhuks_3.0_sdk -lnative_file --no-whole-archive --end-group
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L1':
[OHOS ERROR] kv_store.c:(.text.NewItem.constprop.0+0x60): undefined reference to `access'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L10':
[OHOS ERROR] kv_store.c:(.text.GetCurrentItem.constprop.1+0x5c): undefined reference to `opendir'
[OHOS ERROR] riscv32-unknown-elf-ld: kv_store.c:(.text.GetCurrentItem.constprop.1+0x68): undefined reference to `readdir'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L11':
[OHOS ERROR] kv_store.c:(.text.GetCurrentItem.constprop.1+0x7e): undefined reference to `closedir'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L19':
[OHOS ERROR] kv_store.c:(.text.GetCurrentItem.constprop.1+0xba): undefined reference to `closedir'
[OHOS ERROR] riscv32-unknown-elf-ld: kv_store.c:(.text.GetCurrentItem.constprop.1+0xc8): undefined reference to `stat'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L15':
[OHOS ERROR] kv_store.c:(.text.GetCurrentItem.constprop.1+0xe0): undefined reference to `readdir'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L34':
[OHOS ERROR] kv_store.c:(.text.InitKv.constprop.2+0x4e): undefined reference to `access'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L28':
[OHOS ERROR] kv_store.c:(.text.InitKv.constprop.2+0x60): undefined reference to `mkdir'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L46':
[OHOS ERROR] kv_store.c:(.text.GetResolvedPath.constprop.6+0x56): undefined reference to `realpath'
[OHOS ERROR] riscv32-unknown-elf-ld: ohos/libs/libutils_kv_store.a(libutils_kv_store.kv_store.o): in function `.L60':
[OHOS ERROR] kv_store.c:(.text.GetValueByFile.constprop.5+0x54): undefined reference to `stat'
[OHOS ERROR] scons: *** [output/bin/Hi3861_wifiiot_app.out] Error 1
[OHOS ERROR] BUILD FAILED!!!!
[OHOS ERROR] Failed building output/bin/Hi3861_wifiiot_app.out: Error 1

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

精彩评论4

论坛小助手 官方账号

沙发 发表于 2024-4-17 16:13:53
看提供的报错代码信息,应该是在链接libutils_kv_store.a静态库时,找不到一些系统调用函数的定义
检查一下access、opendir、readdir、closedir、stat和mkdir等,看能否解决问题

数创院刘Sir

发表于 2024-4-18 09:38  IP属地: - 中国四川省 中国电信IDC

回复 论坛小助手: 所以我感觉是编译工具的编译规则被改了,之前都好好的,access、opendir、readdir、closedir、stat和mkdir这几个是系统内置的文件吗还是某个系统函数,这种问题太底层被改了好难解决

【1 条回复】

qiuds

来自手机 板凳 发表于 2024-7-22 22:56:49
我今天也遇到同样的问题,我是基于4.1的源码,请问你解决了吗?

数创院刘Sir

发表于 2024-7-25 14:25  IP属地: 四川省成都市

回复 qiuds: https://forums.openharmony.cn/fo ... thread&tid=2960可以看我新的帖子,搭建完整的4.1开发环境,解决了

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

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

返回顶部