Platform Io not working on termux

$ ls ~/.platformio/packages/toolchain-xtensa-esp32/bin/

xtensa-esp32-elf-addr2line xtensa-esp32-elf-elfedit xtensa-esp32-elf-gcov-dump xtensa-esp32-elf-objcopy

xtensa-esp32-elf-ar xtensa-esp32-elf-g++ xtensa-esp32-elf-gcov-tool xtensa-esp32-elf-objdump

xtensa-esp32-elf-as xtensa-esp32-elf-gcc xtensa-esp32-elf-gdb xtensa-esp32-elf-ranlib

xtensa-esp32-elf-c++ xtensa-esp32-elf-gcc-8.4.0 xtensa-esp32-elf-gdb-add-index xtensa-esp32-elf-readelf

xtensa-esp32-elf-c++filt xtensa-esp32-elf-gcc-ar xtensa-esp32-elf-gprof xtensa-esp32-elf-size

xtensa-esp32-elf-cc xtensa-esp32-elf-gcc-nm xtensa-esp32-elf-ld xtensa-esp32-elf-strings

xtensa-esp32-elf-cpp xtensa-esp32-elf-gcc-ranlib xtensa-esp32-elf-ld.bfd xtensa-esp32-elf-strip

xtensa-esp32-elf-ct-ng.config xtensa-esp32-elf-gcov xtensa-esp32-elf-nm

~/esp $ pio run

Processing espwroom32 (platform: espressif32; board: esp32dev; framework: arduino)

----------------------------------------------------------------------------------------------------------------------

Verbose mode can be enabled via `-v, --verbose` option

CONFIGURATION: Redirecting...

PLATFORM: Espressif 32 (6.12.0) > Espressif ESP32 Dev Module

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

DEBUG: Current (cmsis-dap) 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.20017.241212+sha.dcc1105b

  • tool-esptoolpy @ 2.40900.250804 (4.9.0)

  • toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5

LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation

LDF Modes: Finder ~ chain, Compatibility ~ soft

Found 33 compatible libraries

Scanning dependencies…

No dependencies

Building in release mode

Compiling .pio/build/espwroom32/src/main.cpp.o

Building .pio/build/espwroom32/bootloader.bin

Generating partitions .pio/build/espwroom32/partitions.bin

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

esptool.py v4.9.0

Creating esp32 image…

Merged 1 ELF section

Successfully created esp32 image.

Compiling .pio/build/espwroom32/FrameworkArduino/Esp.cpp.o

*** [.pio/build/espwroom32/src/main.cpp.o] Error 127

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

*** [.pio/build/espwroom32/FrameworkArduino/Esp.cpp.o] Error 127

============================================= [FAILED] Took 1.80 seconds =============================================

simply problem is reported. But source is termux cant run try run it from cmd line directly and will see why. Only python works here = no pio builds.

We have already had that discussion in

You can check the answers here Failing to compile using pio in termux