question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Hi,

Basically trying to compile esp32-cam including BME280. Whater I do I get this issue: sh: 1: xtensa-esp32-elf-g++: not found I have this issue even when using development version TasmoCompiler v8-development though docker under raspberry pi or https://gitpod.io/#https://github.com/benzino77/tasmocompiler/tree/development

Here is the full log:

Processing firmware (board: esp32-cam; framework: arduino; platform: https://github.com/tasmota/platform-espressif32/releases/download/v3.4.1/Tasmota-platform-espressif32.zip)
--------------------------------------------------------------------------------
Platform Manager: Installing https://github.com/tasmota/platform-espressif32/releases/download/v3.4.1/Tasmota-platform-espressif32.zip
Downloading
Unpacking
Platform Manager: espressif32 @ 3.4.1 has been installed!
The platform 'https://github.com/tasmota/platform-espressif32/releases/download/v3.4.1/Tasmota-platform-espressif32.zip' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2
Downloading
Unpacking
Tool Manager: toolchain-xtensa-esp32 @ 8.4.0+2021r2 has been installed!
Tool Manager: Installing https://github.com/tasmota/arduino-esp32/releases/download/2.0.1.1/framework-arduinoespressif32-release_IDF4.4.tar.gz
Downloading
Unpacking
Tool Manager: framework-arduinoespressif32 @ 2.0.1+1 has been installed!
Tool Manager: Installing https://github.com/tasmota/esptool/releases/download/v3.2/esptool-v3.2.zip
Downloading
Unpacking
Tool Manager: tool-esptoolpy @ 1.30200.211025 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-cam.html
PLATFORM: Espressif 32 (3.4.1) > AI Thinker ESP32-CAM, 4M Flash 4MB PSRAM, Tasmota 1856k Code/OTA, 320k SPIFFS
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (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 2.0.1+1 
 - tool-esptoolpy 1.30200.211025 (3.2.0) 
 - tool-mklittlefs 1.203.210628 (2.3) 
 - toolchain-xtensa-esp32 8.4.0+2021r2
Converting tasmota.ino
sh: 1: xtensa-esp32-elf-g++: not found
*** Error 127
AssertionError: :
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/main.py", line 181:
    env.SConscript("$BUILD_SCRIPT")
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/root/.platformio/platforms/espressif32/builder/main.py", line 233:
    target_elf = env.BuildProgram()
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/platformio.py", line 61:
    env.ProcessProgramDeps()
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/platformio.py", line 128:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/platformio.py", line 340:
    env.ConvertInoToCpp()
  File "/root/.platformio/packages/tool-scons/scons-local-4.3.0/SCons/Util.py", line 742:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/piomisc.py", line 240:
    out_file = c.convert(ino_nodes)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/piomisc.py", line 92:
    return self.process(contents)
  File "/usr/local/lib/python3.7/dist-packages/platformio/builder/tools/piomisc.py", line 113:
    assert self._gcc_preprocess(contents, out_file)
========================= [FAILED] Took 228.74 seconds =========================

Environment    Status    Duration
-------------  --------  ------------
firmware       FAILED    00:03:48.738
==================== 1 failed, 0 succeeded in 00:03:48.738 ====================
Finished. Exit code: 1.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Enjoy-Combicommented, Mar 4, 2022

OK, thank you for all the support and explanations.

0reactions
benzino77commented, Mar 4, 2022

So this can be a problem with espressif repository or with platformio itself - I can do nothing about that.

Regarding this information I will probably remove possibility to choose “HomeAssistant” feature for ESP32-CAM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sh: 1: xtensa-esp32-elf-g++: not found - ESPHome
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.
Read more >
ESPHome xtensa-esp32-elf-g++: not found on 2022.12.0
The problem After updating the ESPHome integration to 2022.12.0, I get these error messages: INFO Reading configuration vliering.yaml.
Read more >
Problem with xtensa-esp32-elf when compiling - espressif32
Hello all, I am new to PlatformIO and using it with ESP32. I am trying to compile the code cloned from here: ...
Read more >
Failed to find Xtensa toolchain - ESP32 Forum
xtensa -esp32-elf-gcc: command not found. WARNING: Failed to find Xtensa toolchain, may need to alter PATH or set one in the configuration ...
Read more >
espressif/arduino-esp32 - Gitter
... Error 1 xtensa-esp32-elf-g++: error: unrecognized command line option ... @hasenradball it looks like possibly PIO is not using the correct GCC version....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found