psvanstrom / esphome-p1reader

ESPHome custom component for reading P1 data from electricity meters.
MIT License
252 stars 106 forks source link

sh: 1: xtensa-lx106-elf-g++: not found #19

Closed Anteus closed 2 years ago

Anteus commented 2 years ago

Anybody else getting errors while compiling on esphome 2021.9.3 from HA?

Works fine locally but not through HA. Tried removing the addon and files and reinstalling but no luck.

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

INFO Reading configuration /config/esphome/p1reader.yaml...
WARNING 'electricity_meter': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/electricity_meter
Processing electricity_meter (board: nodemcu; framework: arduino; platform: platformio/espressif8266@2.6.2)
--------------------------------------------------------------------------------
Tool Manager: Installing toolchain-xtensa @ ~2.40802.191122
Tool Manager: Warning! More than one package has been found by toolchain-xtensa @ ~2.40802.191122 requirements:
 - platformio/toolchain-xtensa @ 2.100300.210717
 - mcspr/toolchain-xtensa @ 5.100300.210830
 - tasmota/toolchain-xtensa @ 5.100200.210303
Tool Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: toolchain-xtensa @ 2.40802.200502 has been installed!
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.20704.0 (2.7.4) 
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.20800.0 (2.8.0) 
 - toolchain-xtensa 2.40802.200502 (4.8.2)
Library Manager: Installing Update
Library Manager: Already installed, built-in library
Dependency Graph
|-- <ESPAsyncTCP-esphome> 1.2.3
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncWebServer-esphome> 1.3.0
|   |-- <ESPAsyncTCP-esphome> 1.2.3
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <noise-c> 0.1.3
|   |-- <libsodium> 1.10018.1
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Compiling /data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-lx106-elf-g++: not found
Compiling /data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: xtensa-lx106-elf-g++: not found
Compiling /data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_pb2.cpp.o
*** [/data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_connection.cpp.o] Error 127
sh: 1: xtensa-lx106-elf-g++: not found
Compiling /data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_pb2_service.cpp.o
*** [/data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_frame_helper.cpp.o] Error 127
*** [/data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_pb2.cpp.o] Error 127
sh: 1: xtensa-lx106-elf-g++: not found
*** [/data/electricity_meter/.pioenvs/electricity_meter/src/esphome/components/api/api_pb2_service.cpp.o] Error 127
========================= [FAILED] Took 19.87 seconds =========================
jdrozdnovak commented 2 years ago

I tried as well, without any issues. Just make sure you included the UART and sensor part in the config and the .h file is uploaded to the esphome folder

Anteus commented 2 years ago

From Home Assistant running on a Pi or other arm linux? Running 64 kernel and 32 userland might be a factor as well.

jdrozdnovak commented 2 years ago

@Anteus that's a good point. I am on x86.

Anteus commented 2 years ago

Got better error message on 2021.10.0 seems to be missing package for aarch64.

Warning! Could not find the package with 'Update' requirements for your system 'linux_aarch64'

Full: `INFO Reading configuration /config/esphome/p1reader.yaml... INFO Generating C++ source... INFO Compiling app... Processing esp-p1reader (board: nodemcu; framework: arduino; platform: platformio/espressif8266 @ 2.6.2)

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash PACKAGES:

Anteus commented 2 years ago

Run esphome locally from the terminal if using multiarch with 64 kernel and 32 userland.

To compile: setarch arm esphome compile p1reader.yaml