Work around to error msg: collect2.exe: fatal error: CreateProcess: No such file or directory

When using the Arduino IDE 2.2.1 on a Windows 10 system, and admittedly a lot of bigger libraires (KD8CEC v2, lvgl, eSPI, and Earle Philhower's wonderful Arduino compatibility libraries that allows you to build for a RaspberryPi Pico), I got the following error message:

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

This is actually a linker error message. My research suggested that this is the result of the build system using the windows "echo" command which has a line length limit of 32k characters. So when the command chops things off, it of course chops things off in the middle of a file name.. Linker doesn't know better, it just got bad info and so generates this cryptic error message. (This problem is speculation on my part, perhaps this is not how the IDE works... But the solution that follows fixes my original problem)

My solution to this was to make the lvgl library into a static library. Once I did that, the build worked fine. I used the following instructions to build this static library. (Certainly more difficult than it should be...)

I documented this as an issue on the Arduino IDE github. Perhaps smarter folks there will add more info to this "hidden" limit

Mark

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.