platform-espressif8266: collect2.exe: fatal error: CreateProcess: No such file or directory

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:

  • Some env. builds in VScode (Windows) suddenly fail after converting some .ino files to .cpp/.h
  • Command line build in the terminal of VScode also fails.
  • The same code built in Linux (command line) works just fine
  • Reverting back to a previous commit makes those envs build again in VScode.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 51 (22 by maintainers)

Most upvoted comments

I think they are all used in such a structure. Only problem right now is that the plugins still are in .ino files, which may cause the LDF to find them, even though the includes that refer to the libraries are all within the #ifdef USES_Pxxx checks. Problem is, if I convert them to .cpp/.h too, I will very soon hit the limit of the longcmd again.

And about using PIO… I truly have no idea how to work without it anymore. Some users still want to build using Arduino IDE, but I really don’t understand why…

That explains it. We hope the feature request will be done (soon)😍 Thanks for your awesome work and your great support. Without PlatformIO Tasmota would not be possible!