Sh: 1: xtensa-esp32-elf-g++: not found

I’ve updated ESPHome on my Raspberry Pi this morning to 2022.12 and am getting the error:-

sh: 1: xtensa-esp32-elf-g++: not found

Uninstalling and reinstalling the ESPHome Addon from the Home Add-on Store hasn’t helped - looks like it (?) downloads and installs OK?

INFO [email protected]+2021r2-patch3 has been installed!

but isn’t accessible?

Anyone know how to fix this / what debug steps to take?

Running on

Home Assistant 2022.11.2
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221108.0 - latest

Full logs:-

INFO Reading configuration /config/esphome/vandoorne.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing vandoorne (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif32 @ 5.2.0
INFO Installing platformio/espressif32 @ 5.2.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
INFO Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: [email protected]+2021r2-patch3 has been installed!
INFO [email protected]+2021r2-patch3 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
INFO Installing platformio/framework-arduinoespressif32 @ ~3.20005.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.40201.0
INFO Installing platformio/tool-esptoolpy @ ~1.40201.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40400.0
INFO Installing platformio/tool-scons @ ~4.40400.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- WiFi @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- Update @ 2.0.0
Compiling /data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling /data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling /data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_pb2.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
*** [/data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_connection.cpp.o] Error 127
Compiling /data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_pb2_service.cpp.o
*** [/data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_frame_helper.cpp.o] Error 127
*** [/data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_pb2.cpp.o] Error 127
sh: 1: xtensa-esp32-elf-g++: not found
*** [/data/vandoorne/.pioenvs/vandoorne/src/esphome/components/api/api_pb2_service.cpp.o] Error 127
========================= [FAILED] Took 222.84 seconds =========================

Looks like ESPHome have broke it and don’t care about fixing it :frowning:

Turns out it was a bug with the AddOn on all 32bit platforms.

The 2012.12.01 update has resolved this issue.

1 Like

ESPHome 2022.12.8 installed as HA add-on on Raspberry and I have the same problem
“sh: 1: xtensa-esp32-elf-g++: not found”

Could someone try to fix it ?
Thank you for support

Hi kevjs1982,
You are saying this issue is solved. But can you tell me how? I’m trying to compile on a rapsberrypi in a container, and I’m getting the same error. I pulled the version 2022.12.8 but I still get the same error:

Compiling .pioenvs/ketelmonitor/src/esphome/components/adc/adc_sensor.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found

Any suggestions?

  • Paul
1 Like

Hi,

I have still the issue with:

sh: 1: xtensa-esp32-elf-g++: not found

I am running ESPHome 2023.3.1 under

Home Assistant 2023.3.6
Supervisor 2023.03.2
Operating System 9.5
Frontend 20230309.1 - latest

Does anyone see the same issue? Is there a solution in place?

Thanks for any help!

Dirk

1 Like

Hi, I’m facing this issue too while trying to flash an ESP32C3.

sh: 1: riscv32-esp-elf-g++: not found

Home Assistant 2023.7.1
Supervisor 2023.08.1
Operating System 10.3
Frontend 20230705.1 - latest

1 Like

The same here with ESPhome 2023.8.2. The solution doesn’t work for me.
Putting back backup ESPhome 2023.7.1 makes no difference.

same problem
with ESP32
but not with 8266

Compiling .pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling .pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling .pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_pb2.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
*** [.pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_connection.cpp.o] Error 127
Compiling .pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_pb2_service.cpp.o
*** [.pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_frame_helper.cpp.o] Error 127
*** [.pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_pb2.cpp.o] Error 127
sh: 1: xtensa-esp32-elf-g++: not found
*** [.pioenvs/esphome-web-6a91e1/src/esphome/components/api/api_pb2_service.cpp.o] Error 127
========================== [FAILED] Took 6.70 seconds ==========================

  • Core2023.11.0
  • Supervisor2023.11.0
  • Operating System11.1
  • Frontend20231030.1

Same here (only ESP32 broken)

  • Core2023.11.2
  • Supervisor2023.11.3
  • Operating System11.1

Compiling .pioenvs/multiospiti32/src/esphome/components/adc/adc_sensor.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling .pioenvs/multiospiti32/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
Compiling .pioenvs/multiospiti32/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
*** [.pioenvs/multiospiti32/src/esphome/components/adc/adc_sensor.cpp.o] Error 127
Compiling .pioenvs/multiospiti32/src/esphome/components/api/api_pb2.cpp.o
*** [.pioenvs/multiospiti32/src/esphome/components/api/api_connection.cpp.o] Error 127
*** [.pioenvs/multiospiti32/src/esphome/components/api/api_frame_helper.cpp.o] Error 127
sh: 1: xtensa-esp32-elf-g++: not found
*** [.pioenvs/multiospiti32/src/esphome/components/api/api_pb2.cpp.o] Error 127
========================== [FAILED] Took 5.08 seconds ==========================

Just want to add another voice on here.

This issue seems to have been introduced with ESPHome 2023.11.0.

I’ve reported the issue in ESPHome’s github.

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
    Dependency Graph
    |-- AsyncTCP-esphome @ 2.0.1
    |-- WiFi @ 2.0.0
    |-- FS @ 2.0.0
    |-- Update @ 2.0.0
    |-- ESPAsyncWebServer-esphome @ 3.1.0
    |-- DNSServer @ 2.0.0
    |-- ESPmDNS @ 2.0.0
    |-- ArduinoJson @ 6.18.5
    Compiling .pioenvs/s3/src/esphome/components/binary_sensor/automation.cpp.o
    sh: 1: xtensa-esp32-elf-g++: not found
    Compiling .pioenvs/s3/src/esphome/components/binary_sensor/binary_sensor.cpp.o
    sh: 1: xtensa-esp32-elf-g++: not found
    Compiling .pioenvs/s3/src/esphome/components/binary_sensor/filter.cpp.o
    sh: 1: xtensa-esp32-elf-g++: not found
    *** [.pioenvs/s3/src/esphome/components/binary_sensor/automation.cpp.o] Error 127
    Compiling .pioenvs/s3/src/esphome/components/ble_client/automation.cpp.o
    *** [.pioenvs/s3/src/esphome/components/binary_sensor/binary_sensor.cpp.o] Error 127
    *** [.pioenvs/s3/src/esphome/components/binary_sensor/filter.cpp.o] Error 127
    sh: 1: xtensa-esp32-elf-g++: not found
    *** [.pioenvs/s3/src/esphome/components/ble_client/automation.cpp.o] Error 127
    ========================== [FAILED] Took 7.05 seconds ==========================

tested with version: 2023.10.6 then its ok.
problem is in ESPHome 2023.11.0.

Still not fixed :frowning:

same issue on Current version: 2024.5.5