ccache error during building

Ivo.Tisch
Posts: 14
Joined: Tue Nov 05, 2019 7:59 pm

ccache error during building

Postby Ivo.Tisch » Tue Mar 10, 2020 12:56 am

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

Ivo.Tisch
Posts: 14
Joined: Tue Nov 05, 2019 7:59 pm

Re: ccache error during building

Postby Ivo.Tisch » Tue Mar 10, 2020 3:03 am

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?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ccache error during building

Postby ESP_Angus » Tue Mar 10, 2020 11:25 pm

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

Ivo.Tisch
Posts: 14
Joined: Tue Nov 05, 2019 7:59 pm

Re: ccache error during building

Postby Ivo.Tisch » Wed Mar 11, 2020 9:49 pm

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

ESP_georgik
Posts: 20
Joined: Fri Nov 06, 2020 8:23 am
Location: Brno
Contact:

Re: ccache error during building

Postby ESP_georgik » Mon Mar 15, 2021 10:38 am

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

Code: Select all

IDF_CCACHE_ENABLED=''
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
- Juraj Michálek
Senior Embedded Software Engineer at Espressif Systems

rfleming
Posts: 62
Joined: Tue Oct 09, 2018 12:30 am

Re: ccache error during building

Postby rfleming » Wed Sep 15, 2021 1:07 am

Sorry to bump an old topic.

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
The

Code: Select all

IDF_CCACHE_ENABLED=''
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.

Who is online

Users browsing this forum: eskibrew and 39 guests