esphome / issues

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

[2022.12.0] esp32-hal-log.h: No such file or directory #3861

Open brauhausdc opened 1 year ago

brauhausdc commented 1 year ago

The problem

Unable to compile/install for a couple ESP32 based boards I have. One is a Expressif esp32dev board, the other an Adafruit Metro esp32s2. Running esphome as a docker container on an X86-64 machine. [v2022.12.0-dev] is working in this config for 3 other boards I have - two Adafruit 8266 based Huzzah feathers and a pico-w.

Which version of ESPHome has the issue?

v2022.12.0-dev

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

N/A

What platform are you using?

ESP32

Board

Expressif esp32dev

Component causing the issue

esp32-hal-log.h ??

Example YAML snippet

esphome:
  name: guestroomesp32

esp32:
  board: esp32dev
#  framework:
#    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: !secret guestroom_enc_key

ota:

  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Guestroomesp32 Fallback Hotspot"
    password: !secret wifi_password

  manual_ip:
    # Set this to the IP of the ESP
    static_ip: !secret guestroom_ip
    # Set this to the IP address of the router. Often ends with .1
    gateway: !secret gateway
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0

captive_portal:

# Example configuration entry

dallas:
  pin: 33
  update_interval: 30s

  # Individual sensors
sensor:

  - platform: dallas
    address: 0x990000053B28C128
    name: "ESP32 Temperature"
    filters:
        - offset: -0.3
    force_update: true
    accuracy_decimals: 2

  - platform: uptime
    name: "ESP32 Uptime Sensor"

  - platform: wifi_signal
    name: "ESP32 WiFi Signal Sensor"
    update_interval: 60s

  - platform: dht
    pin: 32
    model: DHT11
    temperature:
      name: "DHT11 Temperature"
      filters:
        - offset: -1.76
      accuracy_decimals: 4
      force_update: true
    humidity:
      name: "DHT11 Humidity"
      accuracy_decimals: 4
      force_update: true
    update_interval: 30s

    # Example configuration entry
web_server:

# Activates prometheus /metrics endpoint
prometheus:

# Tooth
# bluetooth_proxy:

#esp32_ble_tracker:

Anything in the logs that might be useful for us?

INFO Reading configuration /config/guestroomesp32.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing guestroomesp32 (board: esp32dev; 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
Library Manager: Installing FS
Warning! Could not find the package with 'FS' requirements for your system 'linux_x86_64'
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
Library Manager: Installing ESPmDNS
Warning! Could not find the package with 'ESPmDNS' requirements for your system 'linux_x86_64'
Dependency Graph
|-- AsyncTCP-esphome @ 1.2.2
|-- WiFi @ 1.2.7
|-- ESPAsyncWebServer-esphome @ 2.1.0
|   |-- AsyncTCP-esphome @ 1.2.2
|-- DNSServer @ 1.1.0
|-- noise-c @ 0.1.4
|   |-- libsodium @ 1.10018.1
|-- ArduinoJson @ 6.18.5
Compiling .pioenvs/guestroomesp32/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/guestroomesp32/src/esphome/components/api/api_frame_helper.cpp.o
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_connection.h:4,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/core/log.h:18:10: fatal error: esp32-hal-log.h: No such file or directory

***********************************************************************
* Looking for esp32-hal-log.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp32-hal-log.h"
* Web  > https://registry.platformio.org/search?q=header:esp32-hal-log.h
*
***********************************************************************

 #include <esp32-hal-log.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/guestroomesp32/src/esphome/components/api/api_connection.cpp.o] Error 1
In file included from src/esphome/components/api/api_frame_helper.cpp:3:
src/esphome/core/log.h:18:10: fatal error: esp32-hal-log.h: No such file or directory

***********************************************************************
* Looking for esp32-hal-log.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp32-hal-log.h"
* Web  > https://registry.platformio.org/search?q=header:esp32-hal-log.h
*
***********************************************************************

 #include <esp32-hal-log.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/guestroomesp32/src/esphome/components/api/api_frame_helper.cpp.o] Error 1
========================== [FAILED] Took 6.89 seconds ==========================

Additional information

This config has worked previously, but stopped working with v2022.12.0-dev

azirion commented 1 year ago

Same problem here! I just upgraded to 2022.12.0 and could not compile my nspanel with esp32dev board again. It was working perfectly until the upgrade. It's frustrating I can't keep working on my panel. I'm using the supervisor version of HA with latest upgrades. I keep getting this error: sh: 1: xtensa-esp32-elf-g++: not found *** [/data/nspanel/.pioenvs/nspanel/src/esphome/components/adc/adc_sensor.cpp.o] Error 127

jesserockz commented 1 year ago

@azirion your issue is different https://github.com/esphome/issues/issues/3904 and fixed in dev

brauhausdc commented 1 year ago

Any updates on this, or is it dependent on the underlying tool chain? I haven't, but probably could if it would help, try different platforms to host the esphome Docker Container that I'm using.

denislooby commented 1 year ago

I had this issue with the home assistant esphome addon. Uninstalling and reinstalling the add on fixed it.

ryanupp commented 1 year ago

I had this issue with the home assistant esphome addon. Uninstalling and reinstalling the add on fixed it.

+1 for uninstall / reinstall of the ESPHome add-on fixing my issues with the _Could not find the package with 'XXXXXXX' requirements for your system 'linux_x8664'

declan-wade commented 9 months ago

Also having same issue on 2023.12.7:

Config:

esphome:
  name: esphome-web-04b1b8
  friendly_name: ESPHome Web 04b1b8
  project:
    name: esphome.voice-assistant
    version: "1.0"
  min_version: 2023.10.0
  on_boot:
    - priority: -100
      then:
        - wait_until: api.connected
        - delay: 5s
        - if:
            condition:
              switch.is_on: use_wake_word
            then:
              - voice_assistant.start_continuous:
  platformio_options:
    platform: espressif32@^6.1.0
    board: lolin_s3_mini
    framework: espidf

esp32:
  variant: ESP32S3
  board: lolin_s3_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: xxx

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-04B1B8"
    password: "xxx"

captive_portal:

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/esp32-s3-box-lite.yaml@main

light:
  - platform: rgb
    id: 'led'
    name: "Speaker Light"
    red: output_component1
    green: output_component2
    blue: output_component3

output:
  - platform: ledc
    id: output_component1
    pin: GPIO39
  - platform: ledc
    id: output_component2
    pin: GPIO37
  - platform: ledc
    id: output_component3
    pin: GPIO36

binary_sensor:
  - platform: template
    id: left
    name: "Left"
  - platform: template
    id: middle
    name: "Middle"
  - platform: template
    id: right
    name: "Right"

  - platform: gpio
    pin:
      number: GPIO1
      mode: INPUT_PULLUP
      inverted: true
    name: Left Top Button
    disabled_by_default: true
    on_click:
      - if:
          condition:
            switch.is_off: use_wake_word
          then:
            - if:
                condition: voice_assistant.is_running
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
                else:
                  - voice_assistant.start:
          else:
            - voice_assistant.stop
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - voice_assistant.start_continuous:

i2s_audio:
  - id: i2s_mic
    i2s_lrclk_pin: GPIO9
    i2s_bclk_pin: GPIO11
  - id: i2s_sp
    i2s_lrclk_pin: GPIO3
    i2s_bclk_pin: GPIO5

microphone:
  - platform: i2s_audio
    id: external_mic
    i2s_audio_id: i2s_mic
    adc_type: external
    i2s_din_pin: GPIO12
    pdm: false

speaker:
  - platform: i2s_audio
    dac_type: external
    i2s_dout_pin: GPIO7
    i2s_audio_id: i2s_sp
    id: external_sp
    mode: mono

voice_assistant:
  id: va
  microphone: external_mic
  speaker: external_sp
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  on_listening:
    - light.turn_on:
        id: led
  on_tts_start:
    - light.turn_on:
        id: led
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
    - delay: 1s
    - script.execute: reset_led
    - script.wait: reset_led
    - lambda: |-
        if (code == "wake-provider-missing" || code == "wake-engine-missing") {
          id(use_wake_word).turn_off();
        }

script:
  - id: reset_led
    then:
      - if:
          condition:
            switch.is_on: use_wake_word
          then:
            - light.turn_on:
                id: led
          else:
            - light.turn_off: led

switch:
  - platform: template
    name: Use wake word
    id: use_wake_word
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - lambda: id(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);

Logs:

.....
Installing collected packages: urllib3, tqdm, six, pyyaml, pyparsing, pycparser, packaging, msgpack, kconfiglib, idna, future, filelock, contextlib2, colorama, click, charset-normalizer, certifi, schema, requests, esp-idf-kconfig, cffi, requests-toolbelt, requests-file, cryptography, cachecontrol, idf-component-manager
  DEPRECATION: future is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for future: started
  Running setup.py install for future: finished with status 'done'
Successfully installed cachecontrol-0.13.1 certifi-2023.11.17 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 contextlib2-21.6.0 cryptography-41.0.7 esp-idf-kconfig-1.2.0 filelock-3.13.1 future-0.18.3 idf-component-manager-1.2.3 idna-3.6 kconfiglib-14.1.0 msgpack-1.0.7 packaging-23.2 pycparser-2.21 pyparsing-3.0.9 pyyaml-6.0.1 requests-2.31.0 requests-file-1.5.1 requests-toolbelt-1.0.0 schema-0.7.5 six-1.16.0 tqdm-4.66.1 urllib3-1.26.18
Reading CMake configuration...
Library Manager: Installing FS
Warning! Could not find the package with 'FS' requirements for your system 'linux_x86_64'
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
Library Manager: Installing ESPmDNS
Warning! Could not find the package with 'ESPmDNS' requirements for your system 'linux_x86_64'
Generating assembly for certificate bundle...
Warning! Flash memory size mismatch detected. Expected 4MB, found 2MB!
Please select a proper value in your `sdkconfig.defaults` or via the `menuconfig` target!
Library Manager: Installing FS
Warning! Could not find the package with 'FS' requirements for your system 'linux_x86_64'
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'
Library Manager: Installing ESPmDNS
Warning! Could not find the package with 'ESPmDNS' requirements for your system 'linux_x86_64'
Dependency Graph
|-- noise-c @ 0.1.4
Compiling .pioenvs/esphome-web-04b1b8/src/esphome/components/api/api_connection.o
Compiling .pioenvs/esphome-web-04b1b8/src/esphome/components/api/api_frame_helper.o
In file included from src/esphome/components/api/api_frame_helper.cpp:3:
src/esphome/core/log.h:18:10: fatal error: esp32-hal-log.h: No such file or directory

***********************************************************************
* Looking for esp32-hal-log.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp32-hal-log.h"
* Web  > https://registry.platformio.org/search?q=header:esp32-hal-log.h
*
***********************************************************************

   18 | #include <esp32-hal-log.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/esphome-web-04b1b8/src/esphome/components/api/api_frame_helper.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_connection.h:4,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/core/log.h:18:10: fatal error: esp32-hal-log.h: No such file or directory

***********************************************************************
* Looking for esp32-hal-log.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp32-hal-log.h"
* Web  > https://registry.platformio.org/search?q=header:esp32-hal-log.h
*
***********************************************************************

   18 | #include <esp32-hal-log.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/esphome-web-04b1b8/src/esphome/components/api/api_connection.o] Error 1
========================= [FAILED] Took 52.93 seconds =========================