编译esp_ble_mesh中onoff_client example出错
编译esp_ble_mesh中onoff_client example出错
使用idf.py fullclean,然后再编译onoff_client出现如下错误,请问如何解决?
__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly13
05/box_curve25519xchacha20poly1305.c.obj -MF esp-idf\libsodium\CMakeFiles\__idf_
libsodium.dir\libsodium\src\libsodium\crypto_box\curve25519xchacha20poly1305\box
_curve25519xchacha20poly1305.c.obj.d -o esp-idf/libsodium/CMakeFiles/__idf_libso
dium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curv
e25519xchacha20poly1305.c.obj -c D:/code/esp-idf-v4.0.1/components/libsodium/l
ibsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xcha
cha20poly1305.c
ccache: error: Failed to create temporary file for esp-idf\libsodium\CMakeFiles\
__idf_libsodium.dir\libsodium\src\libsodium\crypto_box\curve25519xchacha20poly13
05\box_curve25519xchacha20poly1305.c.obj.d: No such file or directory
[10/149] cmd.exe /C "cd /D D:\code\esp...*************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
D:\code\esp-idf-v4.0.1\examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_clien
t>
__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly13
05/box_curve25519xchacha20poly1305.c.obj -MF esp-idf\libsodium\CMakeFiles\__idf_
libsodium.dir\libsodium\src\libsodium\crypto_box\curve25519xchacha20poly1305\box
_curve25519xchacha20poly1305.c.obj.d -o esp-idf/libsodium/CMakeFiles/__idf_libso
dium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curv
e25519xchacha20poly1305.c.obj -c D:/code/esp-idf-v4.0.1/components/libsodium/l
ibsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xcha
cha20poly1305.c
ccache: error: Failed to create temporary file for esp-idf\libsodium\CMakeFiles\
__idf_libsodium.dir\libsodium\src\libsodium\crypto_box\curve25519xchacha20poly13
05\box_curve25519xchacha20poly1305.c.obj.d: No such file or directory
[10/149] cmd.exe /C "cd /D D:\code\esp...*************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
D:\code\esp-idf-v4.0.1\examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_clien
t>
- Attachments
-
- compile error.PNG (53.2 KiB) Viewed 14949 times
Re: 编译esp_ble_mesh中onoff_client example出错
我把idf sdk删除之前,重新解压缩一份,再编译,还是发生同样错误,使用的4.0.1版本,并没有修改任何文件。
请赐教,谢谢
请赐教,谢谢
Re: 编译esp_ble_mesh中onoff_client example出错
Hi raymond,
请确保 esp-idf clone 完整(包括 submodule),下面是我按照 idf windows 相关的介绍文档下载 idf 后的编译结果。
谢谢
- Attachments
-
- compile_2.PNG (147.16 KiB) Viewed 14857 times
Re: 编译esp_ble_mesh中onoff_client example出错
我使用是代码是完整的,开始拿到时可以编译完成,我在examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_client, 使用idf.py menuconfig去修改mesh node的设置(去掉gatt以及proxy),再编译出错源文件的编译错误(函数定义未找到),然后我使用idf.py fullclean清除所有配置,再使用idf.py build就出现了上述编译问题, 出问题的文件是存在的,没有经过修改。
我在两台电脑重复了上面步骤,都出现了同样问题。
我编译examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server,没有出现上面错误。
我在两台电脑重复了上面步骤,都出现了同样问题。
我编译examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server,没有出现上面错误。
Re: 编译esp_ble_mesh中onoff_client example出错
1. 函数编译报错的问题已经修复了,后续会同步到 Github。raymond wrote: ↑Wed Jun 24, 2020 4:42 am我使用是代码是完整的,开始拿到时可以编译完成,我在examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_client, 使用idf.py menuconfig去修改mesh node的设置(去掉gatt以及proxy),再编译出错源文件的编译错误(函数定义未找到),然后我使用idf.py fullclean清除所有配置,再使用idf.py build就出现了上述编译问题, 出问题的文件是存在的,没有经过修改。
我在两台电脑重复了上面步骤,都出现了同样问题。
我编译examples\bluetooth\esp_ble_mesh\ble_mesh_node\onoff_server,没有出现上面错误。
2. 针对上述问题,麻烦把 onoff_client example 下的 build 文件夹删除后再试一下
Re: 编译esp_ble_mesh中onoff_client example出错
遇到了同样的问题,代码是20201224下载的版本,没有解决问题。第一次能编译过,idf.py menuconfig后再也编译不过呢
-
- Posts: 7
- Joined: Thu May 09, 2019 3:36 am
Re: 编译esp_ble_mesh中onoff_client example出错
我也出现类似的错误
Failed to create temporary file for esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj: No such file or directory
最初总结了出现该现象时的情况,大致是在自定义了component,而且自定义的component加入了含有CMakeList.txt文件的库,出现了cmakelist.txt嵌套,即如下目录结构,componenta含有库libc:
/components
|--------/component-a
| |---------/include_a
| |---------CMakeList.txt
| |---------/libc
| |-----------+include_c
| |-----------CMakeList.txt
|--------+component-b
解决办法:出现上面的报错,只能删除整个包,重来,试过删除自定义component后,clean,reconfigure,fullclean,删除build,都没用,只能整个删除重来
新建项目后,libc下的CMakeList.txt文件要么重命名要么删除,就可以了
但今晚又莫名其妙的出现了上面的错误……,还在找原因……
Failed to create temporary file for esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj: No such file or directory
最初总结了出现该现象时的情况,大致是在自定义了component,而且自定义的component加入了含有CMakeList.txt文件的库,出现了cmakelist.txt嵌套,即如下目录结构,componenta含有库libc:
/components
|--------/component-a
| |---------/include_a
| |---------CMakeList.txt
| |---------/libc
| |-----------+include_c
| |-----------CMakeList.txt
|--------+component-b
解决办法:出现上面的报错,只能删除整个包,重来,试过删除自定义component后,clean,reconfigure,fullclean,删除build,都没用,只能整个删除重来
新建项目后,libc下的CMakeList.txt文件要么重命名要么删除,就可以了
但今晚又莫名其妙的出现了上面的错误……,还在找原因……
-
- Posts: 7
- Joined: Thu May 09, 2019 3:36 am
Re: 编译esp_ble_mesh中onoff_client example出错
最近由于修改项目较频繁,比如修改配置,重设了menuconfig,或者用了clean或者fullclean命令,下面的错误基本上次次都会出现:
尝试了多种方法,没有找到该错误发生的原因,鉴于报错部分属于加密库部分,猜测是不是idf的校验脚本做了什么一致性检测导致的(纯属猜测 )
暂时对于该问题,找到临时解决方法,就是重命名当前项目的文件夹名,当然在重命名之前,最好退出占用该路径或文件夹的应用;重命名完后,重新编译,应该OK了
对于重命名之后依然报错的话,是cache造成的,会缓存之前所有idf环境编译的环境信息,如果重命名与之前编译过的某个环境的路径名一样,有可能依然报错,对于此,再重命名其他的吧……反正我起初用这个方法,同一个项目改了n个文件夹名()
不过,由于最近修改的地方多,出错频繁,重命名已经记不住会不会重复了,所以扒了所有可能的地方,发现有个cache缓存目录,该目录位于
这个应该是cache工具产生的吧,对文件夹下的所有文件shift+delete,然后重新编译项目,应该就ok了,不需要再重命名,但是该操作我不确定会不会对之前的项目有所影响(毕竟只是缓存,应该是没有影响的……)
Code: Select all
FAILED: esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj
暂时对于该问题,找到临时解决方法,就是重命名当前项目的文件夹名,当然在重命名之前,最好退出占用该路径或文件夹的应用;重命名完后,重新编译,应该OK了
对于重命名之后依然报错的话,是cache造成的,会缓存之前所有idf环境编译的环境信息,如果重命名与之前编译过的某个环境的路径名一样,有可能依然报错,对于此,再重命名其他的吧……反正我起初用这个方法,同一个项目改了n个文件夹名()
不过,由于最近修改的地方多,出错频繁,重命名已经记不住会不会重复了,所以扒了所有可能的地方,发现有个cache缓存目录,该目录位于
Code: Select all
C:\Users\Administrator\AppData\Roaming\.ccache
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: 编译esp_ble_mesh中onoff_client example出错
确实有此问题,但当前看问题仅在 Windows 上,会让内部处理一下。不使用 ccache 不会出现该问题,临时方案是使用 idf.py --no-ccache build 进行编译。
-
- Posts: 21
- Joined: Fri Nov 06, 2020 8:23 am
- Location: Brno
- Contact:
Re: 编译esp_ble_mesh中onoff_client example出错
This problem with compilation of libsodioum on Windows occurs when:
1. path to ESP-IDF Tools (.espressif) is longer than 90 characters
2. path to ESP-IDF is longer than 90 characters
3. path to the project is longer than 90 characters
This seems to be a bug in an older version of CCache in ESP-IDF.
Suggested workaround in the previous post: disable CCache is valid.
Please, change your environment so that all three conditions are met.
Please use a Windows installer to repair the existing ESP-IDF or install a new version of ESP-IDF. The installer contains several checks for the environment. If installation or build still fails, post the log from C:\Users\USER\AppData\Local\Temp\Setup Log DATE #NUMBER.txt
The latest stable version of the installer is available: https://dl.espressif.com/dl/esp-idf/
The beta development version of the installer is available: https://github.com/espressif/idf-installer/releases
1. path to ESP-IDF Tools (.espressif) is longer than 90 characters
2. path to ESP-IDF is longer than 90 characters
3. path to the project is longer than 90 characters
This seems to be a bug in an older version of CCache in ESP-IDF.
Suggested workaround in the previous post: disable CCache is valid.
Please, change your environment so that all three conditions are met.
Please use a Windows installer to repair the existing ESP-IDF or install a new version of ESP-IDF. The installer contains several checks for the environment. If installation or build still fails, post the log from C:\Users\USER\AppData\Local\Temp\Setup Log DATE #NUMBER.txt
The latest stable version of the installer is available: https://dl.espressif.com/dl/esp-idf/
The beta development version of the installer is available: https://github.com/espressif/idf-installer/releases
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems
Senior Embedded Software Engineer at Espressif Systems
Who is online
Users browsing this forum: No registered users and 41 guests