esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 36 forks source link

API Compile Error: xtensa-esp32-elf-g++: internal compiler error: Killed (program cc1plus) #3867

Closed LeonEmm closed 1 year ago

LeonEmm commented 1 year ago

The problem

Hello everybody,

ESPHome stated, that an update for my devices is available. While Updating following Message appeard and the build failed:

*** [/data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_connection.cpp.o] Error 4 xtensa-esp32-elf-g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate.

I made no Changes to my configuration and tried a "clean build files", but nothing solved my issue.

Best regards

Which version of ESPHome has the issue?

2022.11.4

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.11.4

What platform are you using?

ESP32

Board

esp-wrover-kit

Component causing the issue

api

Example YAML snippet

esphome:
  name: brighteast
  platform: ESP32
  board: esp-wrover-kit

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  safe_mode: true
  password: ##BLURRED##

wifi: ##BLURRED##

captive_portal:

i2c:
  sda: 21
  scl: 22
  scan: true
  id: bus_a
  frequency: 400kHz

sensor:
  - platform: tsl2561
    name: "Sensor East"
    address: 0x29
    update_interval: 60s
    integration_time: 14ms

binary_sensor:
  - platform: status
    name: "Sensor East Status"

button:
  - platform: restart
    name: "Sensor East Restart"

Anything in the logs that might be useful for us?

Processing brighteast (board: esp-wrover-kit; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: AsyncTCP-esphome@1.2.2 has been installed!
INFO AsyncTCP-esphome@1.2.2 has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: ESPAsyncWebServer-esphome@2.1.0 has been installed!
INFO ESPAsyncWebServer-esphome@2.1.0 has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 1.0
|-- FS @ 1.0
|-- Update @ 1.0
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 1.1.0
|-- ESPmDNS @ 1.0
|-- Wire @ 1.0.1
Compiling /data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_connection.cpp.o
Compiling /data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_frame_helper.cpp.o
Compiling /data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_pb2_service.cpp.o
xtensa-esp32-elf-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [/data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_connection.cpp.o] Error 4
xtensa-esp32-elf-g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [/data/brighteast/.pioenvs/brighteast/src/esphome/components/api/api_pb2.cpp.o] Error 4

Additional information

No response

ssieb commented 1 year ago

What kind of system are you running this on? If it's a pi, then try adding the compile process limit option to the esphome: section.

LeonEmm commented 1 year ago

I'm using ESPHome as the official Home-Assistant Addon. HomeAssistant is running inside a VM on a unraid Server. I've allocated 2GB of RAM and 2vCPUs to the HAOS-Virtual Machine. So everything is running at x86_64 Architcture.

ssieb commented 1 year ago

2GB is pretty low. Try that compile process limit.

LeonEmm commented 1 year ago

Thanks for your help. I just increaded the RAM assigned to the VM to 4 GB. Now everyhing works fine. I found a "out of Memory Error" on the VNC Console of HAOS, but actually didn't find this kind of error in the HomeAsisstant Logs.... Must've overlooked it.