Software: Arduino IDE 2.3.3
Board: Arduino Nano ESP32
OS: Windows 11
I allowed updates to be installed automatically without checking what exactly the updates were.
Afterwards, if I compiled any project or a new (empty) project, I got the old:
Compilation error: fork/exec C:\Users*\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s3-elf-gcc\esp-2021r2-patch5-8.4.0/bin/xtensa-esp32s3-elf-g++.exe: The filename or extension is too long.
I manually played around and found that it was the latest Arduino ESP32 Boards update causing the issue.
Once I reverted back to 2.0.13 everything worked fine.