Unable to update ESP32(s) after update of ESPhome to 2022.12.0 version

Hi,
I am using Home Assistant on Raspberry Pi 3b. Recently, the ESPhome updated to version 2022.12.0 and with that, I am unable to update any of the ESP32. I am able to update esp 8266 chips that are linked with ESPhome, but not the ESP32.
I noticed that with the ESPhome Addon update, the Platformio and Xtensa also updated and that might be causing issues.
I have tried to remove the ESPhome Addon completely with all the files and re-install it, but it did not help.
I have tried to restore to previous backups, but as soon as ESPhome Addon updates, the problem arises again.
Any help in the matter would be of great help.
PS: I am a bit new to linux, so in case I need to update platformIO and xtensa manually, kindly also provide a link to the commands.

Thanks a lot in advance.

It keeps giving the following errors:

INFO Generating C++ source...
INFO Compiling app...
Processing above-wardrobe (board: nodemcu-32s; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
--------------------------------------------------------------------------------
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
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
Compiling /data/above-wardrobe/.pioenvs/above-wardrobe/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: not found
*** [/data/above-wardrobe/.pioenvs/above-wardrobe/src/esphome/components/api/api_connection.cpp.o] Error 127
========================== [FAILED] Took 9.71 seconds ==========================```

I believe it is a known issue that is to do with 32bit / 64bit software - there is a issue open on Github and looks like a PR to fix it:

Thank you so much for the help. Will wait for someone to post a solution to there.

I believe 12.1 is out with a fix.

I still have the problem with 2022.12.8 version.

Is it normal?

I don’t have such problem with esp8266