platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
336 stars 219 forks source link

collect2.exe: fatal error: CreateProcess: No such file or directory #231

Open TD-er opened 4 years ago

TD-er commented 4 years ago

I've been getting this error when building on VScode in Windows. If I build the exact same code in Linux (using command line) it just works out fine. It happens with PIO 5.0.1 and the latest 5.0.2 dev version. (reinstalled PIO and all its cache and downloaded packages a few times already)

Building in release mode
Compiling .pio\build\custom_beta_ESP8266_4M1M\src\ESPEasy.ino.cpp.o
Linking .pio\build\custom_beta_ESP8266_4M1M\ESP_Easy_mega_20201012_custom_beta_ESP8266_4M1M.elf
collect2.exe: fatal error: CreateProcess: No such file or directory
compilation terminated.
*** [.pio\build\custom_beta_ESP8266_4M1M\ESP_Easy_mega_20201012_custom_beta_ESP8266_4M1M.elf] Error 1

The strange thing is, it only happens with some of my PIO environments and also depends on some commits I make. I have been working very hard on converting all my .ino files to .cpp/.h (see: https://github.com/platformio/platformio-vscode-ide/issues/2067 ) and in the process I do see this happen on some of my PIO environments and after a new commit (changing again a few dozen files) it happens on even more environments. If I checkout an older commit it can be built again in a few environments that failed before.

So it just seems like I'm hitting some resource limit when building in VScode? In my changes from .ino to .cpp/.h I do try to include as little as possible in .h files an try to only include in the .cpp file. Only exception is files like ESPEasy_common.h, which are included almost everywhere. N.B. my environments differ in the used ESP8266/Arduino core library and also the number of "plugins" of my code included in the build.

I created a branch of which the last commit made compiling impossible in VS code for the custom_ESP8266_4M1M environment. https://github.com/TD-er/ESPEasy/tree/build/failing_custom_windows_builds When going back 1 commit in that branch, it compiles again. Even building in verbose mode is not giving any clue why it failed to generate the .elf file.

So to summarize:

TD-er commented 2 years ago

Apparently there is something merged which should (hopefully) fix this.... See: https://github.com/espressif/esp-idf/commit/d8361634448e5da794a74da8082426fe9a06fe52 Can this also be used for ESP8266 toolchain, or do we use a different version for both platforms?