Cannot compile project anymore (xtensa-esp32-elf-gcc not found)

Don’t know what happend, but today I’m not longer able to compile project GitHub - biologist79/ESPuino at dev (while a few days ago it was still possible).

I’m shown this message:

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (54.3.21) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.2.1 
 - framework-arduinoespressif32-libs @ 5.4.0+sha.858a988d6e 
 - framework-espidf @ 3.50402.0 (5.4.2) 
 - tool-cmake @ 3.30.2 
 - tool-esp-rom-elfs @ 2024.10.11 
 - tool-esptoolpy @ 5.0.0 
 - tool-ninja @ 1.10.2 
 - tool-scons @ 4.40801.0 (4.8.1) 
 - toolchain-xtensa-esp-elf @ 14.2.0+20241119
Installing Arduino Python dependencies
Creating a new virtual environment for IDF Python dependencies
Installing ESP-IDF's Python dependencies
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: xtensa-esp32-elf-gcc
-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!

fatal: not a git repository (or any of the parent directories): .git
CMake Error at /Users/user/.platformio/packages/framework-espidf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_C_COMPILER:

    xtensa-esp32-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


CMake Error at /Users/user/.platformio/packages/framework-espidf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_CXX_COMPILER:

    xtensa-esp32-elf-g++

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


CMake Error at /Users/user/.platformio/packages/framework-espidf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_ASM_COMPILER:

    xtensa-esp32-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

I already recognized Idf_tools.py installation failed and deleted the whole .platformio directory, but unfortunately this doesn’t solve the problem. The text shown above is what is shown directly after re-initialisation of Platformio.

When I click again on “Build”, additionaly this is shown:

idf_tools.py installation failed
idf_tools.py installation failed
Verbose mode can be enabled via `-v, --verbose` option

Any suggestions?
I’m using a Mac M1 pro with Mac OS 15.6.1.

Did you check Idf_tools.py installation failed ?

Sure. That’s why I wrote

Sorry, I didn’t see. Just had a deja-vú…
This might be a pioarduino specific issue.

Did you check with the latest version?
There is also a pioarduino discord server.

Also check the re-release 54.03.21-2 which fixes a few bugs.

I tried the latest one but these installation fails of idf_tools.py are still there (in higher quantity; 10 or so). So I tried the version you linked but this ends up in

Resolving complete dependencies...
ERROR: Python's lzma module is unavailable or broken in this interpreter.
LZMA (liblzma) support is required for tool/toolchain installation.
Please install Python built with LZMA support.

Don’t know (yet) how to fix that.

Seems as I’m not the only one…

Broken Python. Using a version without support for LZMA. LZMA support is standard and has to be there. Sadly there are Distributions out there which includes this broken Python versions. Replace the broken Python with a full working version.

1 Like

Yes, meanwhile I fixed it. We already had a conversation here :slight_smile:.
VSC => Settings => Extensions => Platformio IDE: Is disabled “Use Builtin Python” and deleted .platformio folder.
After reopening VSC, platformio was set up and a new python-env was built upon a python-version that I previsously installed via Macports.

However, I don’t know why this problem didn’t raise up earlier.

@jason2866 Who decides which python-version is taken when “use builtin python” is active? Can this be configured somehow?

No, there is no choice to select which python version is used when use builtin Python is selected. Currently the provided Python versions from Platformio are used. I have nearly finished a new pioarduino VSC plugin which is now very different to the Platformio VSC plugin. But still should be compatible too. The new VSC pioarduino extension will install the Python buillds from GitHub - astral-sh/python-build-standalone: Produce redistributable builds of Python

Can already be tested, by installing manually the extension from here pioarduino-vscode-ide/pioarduino-ide-1.1.0.vsix at pioarduino · Jason2866/pioarduino-vscode-ide · GitHub

1 Like