esp-aws-iot icon indicating copy to clipboard operation
esp-aws-iot copied to clipboard

Fleet Provisioning build error (CA-331)

Open amitabhskrishworks opened this issue 10 months ago • 2 comments

Hello there, I have cloned the esp-aws-iot folder using the "https://github.com/espressif/esp-aws-iot.git" .Without making any changes I tried to build the fleet_provisioning_with_csr example (given at: esp-aws-iot/examples/fleet_provisioning/fleet_provisioning_with_csr) but got stuck with build errors (mentioned below) but was able to build the mqtt/tls_mutual_auth example. Although both the examples are in same folders but i don't know why is fleet one not working.

C:/Users/Amitabh/esp/esp-aws-iot/libraries/Fleet-Provisioning-for-AWS-IoT-embedded-sdk/Fleet-Provisioning-for-AWS-IoT-embedded-sdk/source/fleet_provisioning.c:765:1: fatal error: opening dependency file esp-idf\Fleet-Provisioning-for-AWS-IoT-embedded-sdk\CMakeFiles__idf_Fleet-Provisioning-for-AWS-IoT-embedded-sdk.dir\f7893e654caf0f5cdf916ac2a3b97995\fleet_provisioning.c.obj.d: No such file or directory 765 | } | ^ compilation terminated. [937/947] Building C object esp-idf/corePKCS11/CMakeFiles/__idf_corePKCS11.dir/corePKCS11/source/portable/mbedtls/core_pkcs11_mbedtls.c.obj ninja: build stopped: subcommand failed.

  • The terminal process "C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.

Detailed log are in the file fleet_prov_log_2Apr2024.txt

ESP-IDF version : v5.1.3

amitabhskrishworks avatar Apr 02 '24 07:04 amitabhskrishworks

I also encountered the same problem, have you solved it?

ookamipjq avatar Apr 09 '24 03:04 ookamipjq

Hi @amitabhskrishworks Issue is due to maximum filename limitation in Windows filesystem.

Can you try enabling longpaths on your Windows as instructed here.

If this doesn't work as well, can you try placing esp-aws-iot somewhere in C:\ directly for now? We will see how we can shorten the filepath of the object file for Windows. Unfortunately. we don't have a way around it as of yet.

avsheth avatar May 08 '24 06:05 avsheth

Or else you can just change the name of "Fleet-Provisioning-for-AWS-IoT-embedded-sdk" to "Fleet-Provisioning".

This is easy and best solution if enabling long path does not work

PaulAnurag avatar May 28 '24 05:05 PaulAnurag

If change the branch to any of these then it works release/202012.04-LTS release/202210.01-LTS

amitabhskrishworks avatar May 28 '24 05:05 amitabhskrishworks

Hi @amitabhskrishworks Issue is due to maximum filename limitation in Windows filesystem.

Can you try enabling longpaths on your Windows as instructed here.

If this doesn't work as well, can you try placing esp-aws-iot somewhere in C:\ directly for now? We will see how we can shorten the filepath of the object file for Windows. Unfortunately. we don't have a way around it as of yet.

This solution worked for me Thank you

amitabhskrishworks avatar May 28 '24 05:05 amitabhskrishworks