Hi, Apologies if this has already been addressed - I couldn't find a solution.
I'm currently trying to build an application using the release/v4.1 branch (commit 5dbabae). I re-cloned the esp-idf directory and ran install.bat (windows 10 shell), followed by export.bat.
The build seems to work until almost the end, where I get the following error:
ccache: error: Failed to create temporary file for esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c.obj: No such file or directory
[746/903] Building C object esp-idf/libsodium/CMakeFiles/_...dium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Could someone help me with a solution to this please?
Thanks
Ivo
ccache error during building
Re: ccache error during building
I didn't notice, but earlier in the build output there was a failure:
Generated D:/Repositories/Project-Folder/Espressif/esp-idf/New_Development/esp-now/build/bootloader/bootloader.bin
[737/903] Building C object esp-idf/libsodium/CMakeFiles/_...lsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c.obj
FAILED: esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c.obj
How can I find out why this failed?
Generated D:/Repositories/Project-Folder/Espressif/esp-idf/New_Development/esp-now/build/bootloader/bootloader.bin
[737/903] Building C object esp-idf/libsodium/CMakeFiles/_...lsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c.obj
FAILED: esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c.obj
How can I find out why this failed?
Re: ccache error during building
Hi Ivo,
It looks like you might be running up against path length limitations on Windows. Windows is limited to 260 character paths by default, and it looks like the total path length for some of these build files is pushing up against that.
There is a registry edit you can do to remove this limit.
https://www.howtogeek.com/266621/how-to ... haracters/
However this might not work as we currently build the ESP-IDF toolchains as 32-bit Windows executables only. I'll talk to the toolchain team about whether we can start building a 64-bit version as well.
If making the registry edit doesn't work, a quick workaround would be to override the build directory to a short top-level path, something like "idf.py -B D:\proj_build build"
Angus
It looks like you might be running up against path length limitations on Windows. Windows is limited to 260 character paths by default, and it looks like the total path length for some of these build files is pushing up against that.
There is a registry edit you can do to remove this limit.
https://www.howtogeek.com/266621/how-to ... haracters/
However this might not work as we currently build the ESP-IDF toolchains as 32-bit Windows executables only. I'll talk to the toolchain team about whether we can start building a 64-bit version as well.
If making the registry edit doesn't work, a quick workaround would be to override the build directory to a short top-level path, something like "idf.py -B D:\proj_build build"
Angus
Re: ccache error during building
Hi Angus,
I believe you hit the nail on the head. Thanks very much for taking the time to reply.
The registry was already set for long path lengths, but the "idf.py -B D:\proj_build build" worked correctly.
Your help is very much appreciated.
Ivo
I believe you hit the nail on the head. Thanks very much for taking the time to reply.
The registry was already set for long path lengths, but the "idf.py -B D:\proj_build build" worked correctly.
Your help is very much appreciated.
Ivo
-
- Posts: 21
- Joined: Fri Nov 06, 2020 8:23 am
- Location: Brno
- Contact:
Re: ccache error during building
The problem is caused by CCache and it occurs even when Long Paths on Windows are enabled.
It's sufficient to install ESP-IDF and the project to a path with 82 characters. Build of libsodium cache will fail.
This can happen on GitHub runner. The issue was reproduced with CCache 3.7.
One way to workaround it is to set env variable before launching idf.py.
When the value of the variable is an empty string, the idf.py won't start CCache, and the build process will proceed.
Here is the documentation of idf.py options: https://docs.espressif.com/projects/esp ... py-options
It's sufficient to install ESP-IDF and the project to a path with 82 characters. Build of libsodium cache will fail.
This can happen on GitHub runner. The issue was reproduced with CCache 3.7.
One way to workaround it is to set env variable
Code: Select all
IDF_CCACHE_ENABLED=''
When the value of the variable is an empty string, the idf.py won't start CCache, and the build process will proceed.
Here is the documentation of idf.py options: https://docs.espressif.com/projects/esp ... py-options
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems
Senior Embedded Software Engineer at Espressif Systems
Re: ccache error during building
Sorry to bump an old topic.
I just did a new install of esp32 tools with v4.1.2 idf installed from the installer:.
It appears that the above issue is still present. I am unsure if the 64b tools have been either installed or being used in the above installer. I get the following err:
The didn't solve this at all, same error occurred.
I have ensured both my group policy long file names and my manual regex longfile nname regions have been applied.
reducing path length byt copying my project to C:\tmp\ appears to be the only work around atm.
I just did a new install of esp32 tools with v4.1.2 idf installed from the installer:
Code: Select all
esp-idf-tools-setup-online-2.10.exe
It appears that the above issue is still present. I am unsure if the 64b tools have been either installed or being used in the above installer. I get the following err:
Code: Select all
ccache: error: Failed to create temporary file for esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c.obj: No such file or directory
[692/903] Building C object esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj
FAILED: esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj
ccache C:\Users\RFleming.usr\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DCONFIGURED -DHAVE_WEAK_SYMBOLS -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DNATIVE_LITTLE_ENDIAN -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Iconfig -IC:/esp/esp-idf-v4.1.2/components/libsodium/libsodium/src/libsodium/include -IC:/esp/esp-idf-v4.1.2/components/libsodium/port_include -IC:/esp/esp-idf-v4.1.2/components/libsodium/libsodium/src/libsodium/include/sodium -IC:/esp/esp-idf-v4.1.2/components/libsodium/port_include/sodium -IC:/esp/esp-idf-v4.1.2/components/libsodium/port -IC:/esp/esp-idf-v4.1.2/components/newlib/platform_include -IC:/esp/esp-idf-v4.1.2/components/freertos/include -IC:/esp/esp-idf-v4.1.2/components/heap/include -IC:/esp/esp-idf-v4.1.2/components/log/include -IC:/esp/esp-idf-v4.1.2/components/lwip/include/apps -IC:/esp/esp-idf-v4.1.2/components/lwip/include/apps/sntp -IC:/esp/esp-idf-v4.1.2/components/lwip/lwip/src/include -IC:/esp/esp-idf-v4.1.2/components/lwip/port/esp32/include -IC:/esp/esp-idf-v4.1.2/components/lwip/port/esp32/include/arch -IC:/esp/esp-idf-v4.1.2/components/lwip/port/esp32/tcp_isn -IC:/esp/esp-idf-v4.1.2/components/soc/esp32/include -IC:/esp/esp-idf-v4.1.2/components/soc/include -IC:/esp/esp-idf-v4.1.2/components/esp_rom/include -IC:/esp/esp-idf-v4.1.2/components/esp_common/include -IC:/esp/esp-idf-v4.1.2/components/xtensa/include -IC:/esp/esp-idf-v4.1.2/components/xtensa/esp32/include -IC:/esp/esp-idf-v4.1.2/components/esp32/include -IC:/esp/esp-idf-v4.1.2/components/driver/include -IC:/esp/esp-idf-v4.1.2/components/driver/esp32/include -IC:/esp/esp-idf-v4.1.2/components/esp_ringbuf/include -IC:/esp/esp-idf-v4.1.2/components/efuse/include -IC:/esp/esp-idf-v4.1.2/components/efuse/esp32/include -IC:/esp/esp-idf-v4.1.2/components/vfs/include -IC:/esp/esp-idf-v4.1.2/components/esp_wifi/include -IC:/esp/esp-idf-v4.1.2/components/esp_wifi/esp32/include -IC:/esp/esp-idf-v4.1.2/components/esp_event/include -IC:/esp/esp-idf-v4.1.2/components/esp_netif/include -IC:/esp/esp-idf-v4.1.2/components/esp_eth/include -IC:/esp/esp-idf-v4.1.2/components/tcpip_adapter/include -IC:/esp/esp-idf-v4.1.2/components/app_trace/include -IC:/esp/esp-idf-v4.1.2/components/mbedtls/port/include -IC:/esp/esp-idf-v4.1.2/components/mbedtls/mbedtls/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.1.2\" -DESP_PLATFORM -MD -MT esp-idf/libsodium/CMakeFiles/__idf_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/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_libsodium.dir/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c.obj -c C:/esp/esp-idf-v4.1.2/components/libsodium/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c
ccache: error: 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
Code: Select all
IDF_CCACHE_ENABLED=''
I have ensured both my group policy long file names and my manual regex longfile nname regions have been applied.
reducing path length byt copying my project to C:\tmp\ appears to be the only work around atm.
-
- Posts: 6
- Joined: Mon Jan 22, 2018 8:11 pm
Re: ccache error during building
Not sure if this helps anyone. But sharing my experience. I just started using the ESP-IDF and thought, finally something that will work out of the box, so to speak. Then I had this error. I thought maybe it was one of the cheap boards I'm using. Then again it may be.
In any case I played around with reset and boot buttons. But it finally worked if I hold down the reset button until I get this:
and released the reset button. Suddenly the code loaded fine. So I tried it with the other board and it only works if I follow that procedure.
Both use a CP210x. Hope it helps.
In any case I played around with reset and boot buttons. But it finally worked if I hold down the reset button until I get this:
Code: Select all
Serial port COM7
Both use a CP210x. Hope it helps.
Who is online
Users browsing this forum: Baidu [Spider], Gaston1980 and 131 guests