Avr-g++: error: CreateProcess: No such file or directory

I am getting the following error when trying to build Marlin 2.0 using PlatformIO > Build.
It wasn’t happening before, it started after I had to wipe the contents of the cloned folder to get Github Desktop to sync new files. I had been using it for months without any problems before this.

The folder it creates is there and it has files in it

If I choose Auto Build > PIO Build it will build the firmware no problems just a different folder.

Please run pio run -v > build.log 2>&1 in the project directory and upload it to pastebin.com and paste the link.

1 Like

Please execute this command in PIO terminal.

I tried that and it didn’t work. I can’t even type in the terminal/insert text.

I reinstalled it.

Oh you’re working in the obsoleted Atom environment and not VSCode, sorry. Can you manually locate your PlatformIO installation? For me it’s /usr/local/bin/pio (use like cd / && sudo find . -name "pio")

1 Like

BTW I got the command to run after i reinstalled Terminal-IDE. This is under Windows 10 and not linux BTW.

Alright. It wouldn’t let me use Pastebin because it exceeded the 512k limit. Here is the file.
https://drive.google.com/file/d/1KJvmn-96S2h6PlGujhS_heeaGj1_S3-w/view?usp=sharing

Atom isn’t dead.

Not according to them or the documentation.
https://docs.platformio.org/en/latest/ide/atom.html

1 Like

Was assumed for cmd.exe, not powershell

Fatal error: can't create .pio\build\sanguino_atmega1284p\lib724\LiquidCrystal_ID136\LiquidCrystal_SR.cpp.o: No such file or directory

Hm. Can you move the project from C:\Users\denet\Documents\GitHub\Marlin to a shorter path, like C:\Marlin and attempt compilation there? If something basic fails like creating a file, then maybe there are path length limitations or other problems.

It isn’t dead, but PIO recommends VSCode usage. Atom was the preferred editor before the VSCode plugin came around, but now VSCode is more frequently updated (refer here and here)

1 Like

I have similar problems with Windows and a new VSCode/PIO install.

Side note: I have yet to get the miniterm.py integrated terminal to work. I have gotten putty(kitty) to work with my board and can see printf output from my PIO project. (I’m not sure what this means -from Deneteus: I reinstalled Terminal-IDE)

I can build and run the mbed-blink example just fine.
I get the following error(s) when attempting to build the mbed-ble-thermometer example:
Compiling .pio\build\nrf52_dk\FrameworkMbed\cmsis\TARGET_CORTEX_M\mbed_tz_context.o
arm-none-eabi-gcc: error: CreateProcess: No such file or directory

I have attempted to manually create the directory with no luck so far.
Any guidance is greatly appreciated.

I think the source of the error is different than the one in the original question, but I could reproduce it. Compilation also fails for me when compiling the example.

This is due to PIO generating a longcmd for GCC with the list of includes for compilation. This file is close to 32kB, and together with the command line argument, exceeds 32kB. And Window’s CreateProcess() can’t handle that when it’s invoked with such large arguments.

Refer ARM mbed: Compilation of project with long file paths not possible · Issue #2877 · platformio/platformio-core · GitHub. I’ll update the issue there.

The only known workaround as of this time should be to use Linux instead, bypassing Windows’ restrictions there.

2 Likes

Thank you so much for the prompt response, maxgerhardt.

Given the prevalence of this particular issue, and the lack of workarounds, couldn’t the IDE be updated to write a temporary .cmd file with the >32kb command string and then invoke the temp .cmd file through CreateProcess?

I shall consider moving over to Linux. I’m currently running lubuntu in a VM…

You know the path hasn’t gotten longer and the folder exists. The program actually made it.and has been for more than a year with the same output file name.

I quite literally went into Atom and uninstalled it and re-installed it.

1 Like

Deneteus,
Thank you kindly for your response.

  1. I shall let the moderators comment on the Enable Win32 Long Paths Policy. I wonder how this actually affects the CreateProcess 32K buffer limitation. It would be brilliant if this addressed the issue.
  2. I did not install Atom and never installed the pio-ide-terminal (standalone) package for VSCode. I see that “Facebook has decided to retire their open source efforts on Nuclide, the Atom IDE, and other associated repos.”. So while Atom isn’t being developed, it’s still around to be installed and used. I wonder to what extent the open source community will continue to support Atom…

I have uninstalled PIO for now and have started playing around with the Nordic nRF5 SDK and the Cortex Debugger. If anyone has comments on toolsets, IDEs and the like, feel free to comment - perhaps I should spin up a new thread on this subject.

I do like VSCode and am simply trying to develop some BLE code for my nRF52DK

I’m still getting started and have the luxury of examining other tools. Perhaps I should explore the Atom toolset at some point…

1 Like

All I’ll say on the ‘Enable Win32 Long Paths Policy’ is that:

Starting with Windows 10 build 14352, you can enable NTFS long paths to allow manifested win32 applications and Windows Store applications to access paths beyond the normal 260 characters limit per node. Enabling this setting will cause the long paths to be accessible within the process.

Starting with Windows build 1607, this policy has moved and is now called Win32 long paths.

Source: https://www.tenforums.com/tutorials/51704-enable-disable-win32-long-paths-windows-10-a.html

So, it has nothing to do with the 32K CreateProcess limit which is the main problem above. I thought I saw mention that PlatformIO used a temporary file for long command line strings for another toolchain, but perhaps I’m confusing it with something else. Maybe a feature worth investigating?

I just upgraded to a Windows 10 Pro insider build to resolve a problem with Fusion360 not opening so I have not had a chance to test it again. Too much stuff going on with Coronavirus. Sidetracked with other issues offsite currently. I will let you know what happens

1 Like