esphome / issues

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

Can't compile 2022.12.3 under windows #4025

Open silentgecko opened 1 year ago

silentgecko commented 1 year ago

The problem

I'm not able to compile esphome with 2022.12.3 anymore, previous version (2022.11.1) worked.

Which version of ESPHome has the issue?

2022.12.3

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

lolin_d32

Component causing the issue

No response

Example YAML snippet

substitutions:
    name: "Banana 1"
    update_interval: 360s

esphome:
  name: banana_1
  platform: ESP32
  board: lolin_d32
  on_shutdown:
    then:
      - switch.turn_off: spower

logger:

api:
  password: "xxxx"

ota:
  password: "xxx"

wifi:
  ssid: "xxx"
  password: "xxx"

  # Optional manual IP
  manual_ip:
    static_ip: 192.168.1.55
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "$name Fallback Hotspot"
    password: "e388ZTjA9god"

captive_portal:
bluetooth_proxy:
  active: true

esp32_ble_tracker:
  scan_parameters:
    interval: 500ms
    window: 500ms
    active: true

switch:
  - platform: gpio
    pin: GPIO4
    name: "Sensor Power"
    id: spower
    restore_mode: ALWAYS_ON
    internal: true
    setup_priority: 1000

i2c:
  sda: 25
  scl: 26
  scan: True
  id: bus_a
  setup_priority: -200

text_sensor:
  - platform: version
    hide_timestamp: true
    name: '${name} ESPHome Version'
  - platform: wifi_info
    ip_address:
      name: '${name} IP Address'
      icon: mdi:wifi
    ssid:
      name: '${name} Connected SSID'
      icon: mdi:wifi-strength-2

sensor:
  - platform: wifi_signal
    name: "$name WiFi Signal"
    update_interval: $update_interval
    icon: mdi:wifi-strength-1

  - platform: dht
    model: dht11
    pin:
      number: 16
      mode: input
    temperature:
      name: "$name Temperature"
    humidity:
      name: "$name Humidity"
    update_interval: $update_interval
    setup_priority: -100

  - platform: adc
    pin: GPIO32
    name: "$name Soil"
    update_interval: $update_interval
    attenuation: 11db
    unit_of_measurement: '%'
    filters:
      - calibrate_linear:
          # Map 0.0 (from sensor) to 0.0 (true value)
          - 3.08 -> 0.0
          - 1.42 -> 100.0

  - platform: adc
    pin: GPIO34
    name: "$name Salt"
    update_interval: $update_interval
    unit_of_measurement: '%'
    accuracy_decimals: 4
    filters:
      - calibrate_linear:
          # Map 0.0 (from sensor) to 0.0 (true value)
          - 0.0 -> 0.0
          - 1.1 -> 100.0

  - platform: bh1750
    i2c_id: bus_a
    name: "$name Illuminance"
    address: 0x23
    update_interval: $update_interval
    setup_priority: -300

Anything in the logs that might be useful for us?

INFO Reading configuration banana1.yml...
WARNING 'banana_1': 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
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing banana_1 (board: lolin_d32; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin_d32.html
PLATFORM: Espressif 32 (5.2.0) > WEMOS LOLIN D32
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.20005.220925 (2.0.5)
 - tool-esptoolpy @ 1.40201.0 (4.2.1)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
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
|-- Wire @ 2.0.0
Building in release mode
Compiling .pioenvs\banana_1\src\esphome\components\adc\adc_sensor.cpp.o
In file included from src/esphome/components/adc/adc_sensor.h:4,
                 from src/esphome/components/adc/adc_sensor.cpp:1:
src/esphome/core/hal.h:14:10: fatal error: esp_attr.h: No such file or directory

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

 #include <esp_attr.h>
          ^~~~~~~~~~~~
compilation terminated.
Compiling .pioenvs\banana_1\src\esphome\components\api\api_connection.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\api_frame_helper.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\api_pb2.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\api_pb2_service.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\api_server.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\list_entities.cpp.o
Compiling .pioenvs\banana_1\src\esphome\components\api\proto.cpp.o
In file included from src/esphome/components/socket/socket.h:5,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/socket/headers.h:116:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
compilation terminated.
Compiling .pioenvs\banana_1\src\esphome\components\api\subscribe_state.cpp.o
In file included from src/esphome/components/socket/socket.h:5,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_frame_helper.cpp:1:
src/esphome/components/socket/headers.h:116:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
compilation terminated.
Compiling .pioenvs\banana_1\src\esphome\components\api\user_services.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_pb2.cpp:3:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
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_pb2_service.h:5,
Compiling .pioenvs\banana_1\src\esphome\components\bh1750\bh1750.cpp.o
                 from src/esphome/components/api/api_pb2_service.cpp:3:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\adc\adc_sensor.cpp.o] Error 1
Compiling .pioenvs\banana_1\src\esphome\components\bluetooth_proxy\bluetooth_connection.cpp.o
*** [.pioenvs\banana_1\src\esphome\components\api\api_connection.cpp.o] Error 1
*** [.pioenvs\banana_1\src\esphome\components\api\api_frame_helper.cpp.o] Error 1
*** [.pioenvs\banana_1\src\esphome\components\api\api_pb2.cpp.o] Error 1
*** [.pioenvs\banana_1\src\esphome\components\api\api_pb2_service.cpp.o] Error 1
In file included from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/core/controller.h:17,
                 from src/esphome/components/api/api_server.h:4,
                 from src/esphome/components/api/api_server.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\api\api_server.cpp.o] Error 1
In file included from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/core/controller.h:17,
                 from src/esphome/core/component_iterator.h:4,
                 from src/esphome/components/api/list_entities.h:4,
                 from src/esphome/components/api/list_entities.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\api\list_entities.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/proto.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\api\proto.cpp.o] Error 1
In file included from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/core/controller.h:17,
                 from src/esphome/core/component_iterator.h:4,
                 from src/esphome/components/api/subscribe_state.h:4,
                 from src/esphome/components/api/subscribe_state.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\api\subscribe_state.cpp.o] Error 1
In file included from src/esphome/core/automation.h:5,
                 from src/esphome/components/api/user_services.h:7,
                 from src/esphome/components/api/user_services.cpp:1:
src/esphome/core/helpers.h:14:10: fatal error: esp_heap_caps.h: No such file or directory

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

 #include <esp_heap_caps.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\api\user_services.cpp.o] Error 1
In file included from src/esphome/components/sensor/sensor.h:3,
                 from src/esphome/components/bh1750/bh1750.h:4,
                 from src/esphome/components/bh1750/bh1750.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

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

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\bh1750\bh1750.cpp.o] Error 1
In file included from src/esphome/core/automation.h:5,
                 from src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.h:4,
                 from src/esphome/components/esp32_ble_client/ble_client_base.h:5,
                 from src/esphome/components/bluetooth_proxy/bluetooth_connection.h:5,
                 from src/esphome/components/bluetooth_proxy/bluetooth_connection.cpp:1:
src/esphome/core/helpers.h:14:10: fatal error: esp_heap_caps.h: No such file or directory

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

 #include <esp_heap_caps.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\banana_1\src\esphome\components\bluetooth_proxy\bluetooth_connection.cpp.o] Error 1
============================================================================================================================== [FAILED] Took 1.98 seconds ==============================================================================================================================

Additional information

Tried as admin cmd in windows with global esphome install as well as user esphome install in userdir, same result

yousaf465 commented 1 year ago

why not try WSL ubuntu for compiling?

silentgecko commented 1 year ago

Sure, wsl ubuntu works fine for me now, but what is the sense in supporting windows then anyway, when the answer will be: use wsl?

rekcodocker commented 8 months ago

Found possible cause and why re-install helped. Installation of one component took long (several minutes) without feedback or progress indication. So I thought installation of ESPhome-addon was finished.

Only it wasn´t.