esphome / issues

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

Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64' #2576

Closed 5A52 closed 2 years ago

5A52 commented 2 years ago

The problem

Can not compile after upgrading to 2021.10.0 image

Which version of ESPHome has the issue?

2021.10.0

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

2021.10.6

What platform are you using?

ESP8266

Board

TYWE3L

Component causing the issue

undefined reference to `esphome::light::ESPColorView:

Example YAML snippet

substitutions:
  devicename: espblb1_rroom

esphome:
  name: $devicename
  platform: ESP8266
  board: esp_wroom_02

packages:
  common: !include common/common.yaml

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_white
    pin: GPIO5

e131:
  method: unicast

light:
  - platform: rgbw
    internal: true
    id: l1
    red: output_red
    green: output_green
    blue: output_blue
    white: output_white

  - platform: partition
    name: $devicename
    id: $devicename
    segments:
      - id: l1
        from: 0
        to: 0      
    effects:
      - e131:
          universe: 1
          channels: RGBW    
      - random:
      - flicker:

Anything in the logs that might be useful for us?

/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /data/espblb1_rroom/.pioenvs/espblb1_rroom/src/esphome/components/light/addressable_light.cpp.o:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x0): undefined reference to esphome::light::ESPColorView::set_red(unsigned char)' /data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /data/espblb1_rroom/.pioenvs/espblb1_rroom/src/esphome/components/light/addressable_light.cpp.o:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x4): undefined reference toesphome::light::ESPColorView::set_green(unsigned char)' /data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /data/espblb1_rroom/.pioenvs/espblb1_rroom/src/esphome/components/light/addressable_light.cpp.o:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x8): undefined reference to esphome::light::ESPColorView::set_blue(unsigned char)' /data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /data/espblb1_rroom/.pioenvs/espblb1_rroom/src/esphome/components/light/addressable_light.cpp.o: in functionesphome::light::AddressableLightTransformer::apply()': addressable_light.cpp:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x20b): undefined reference to esphome::light::ESPColorView::set_red(unsigned char)' /data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: addressable_light.cpp:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x21a): undefined reference toesphome::light::ESPColorView::set_green(unsigned char)' /data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: addressable_light.cpp:(.text._ZN7esphome5light27AddressableLightTransformer5applyEv+0x228): undefined reference to `esphome::light::ESPColorView::set_blue(unsigned char)'

Additional information

No response

probot-esphome[bot] commented 2 years ago

Hey there @esphome/core, mind taking a look at this issue as it has been labeled with an integration (light) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

OttoWinter commented 2 years ago

Can't reproduce with the config you provided. Compile works fine here.

Please try pressing the clean button in the overflow menu on the right, then compile again.

Marlor commented 2 years ago

I can confirm the missing package on Home Assistant OS generic-x86-64 with minimal yaml:

esphome:
  name: mini
  platform: ESP8266
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "7a41383e14ef4acd88afe1f4b98bea24"

wifi:
  ssid: ""
  password: ""

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

captive_portal:
Library Manager: Installing Update
Warning! Could not find the package with 'Update' requirements for your system 'linux_x86_64'

there seems to be a lot of ambiguity from the packages on an cleen install:

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!
Tool Manager: Installing tool-esptool @ <2
Tool Manager: Warning! More than one package has been found by tool-esptool @ <2 requirements:
 - platformio/tool-esptool @ 1.413.0
 - volcas/tool-esptool @ 1.413.1
Tool Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-esptool @ 1.413.0 has been installed!
Library Manager: Warning! More than one package has been found by AsyncTCP-esphome requirements:
 - ottowinter/AsyncTCP-esphome @ 1.2.1
 - esphome/AsyncTCP-esphome @ 1.2.2
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts

Full log: log.txt

OttoWinter commented 2 years ago

@Marlor I meant I can't reproduce the compile error "undefined reference to ..." with the config. The title of this issue is a bit misleading, the Update warning is just that, a warning. iirc the warning is printed because we need to add the Update library from arduino core, but PIO somehow can't find it (but we still need to define it so that the includes work) - in short: it's complicated

Re the more than one found: please try with 2021.10, most of those should be gone now

Marlor commented 2 years ago

It's good to know the update warning can be ignored, but sadly the Log is from an cleen reinstall of the 2021.10 addon

5A52 commented 2 years ago

Can't reproduce with the config you provided. Compile works fine here.

Please try pressing the clean button in the overflow menu on the right, then compile again.

No, it is not compiling even clean, sorry. Here is a full log if it helps some kind. esp.log

oxan commented 2 years ago

I can reproduce this as long as I use the partition light, but I really don't see why it happens.

oxan commented 2 years ago

Using the correct segment configuration fixes it, though:

  - platform: partition
    segments:
      - single_light_id: l1
oxan commented 2 years ago

I can trigger it by removing this line from the generated main.cpp:

light_addressablelightwrapper = new light::AddressableLightWrapper(l1);

Smells like a compiler bug to me, I really don't see how that line has any relation to the missing symbols it complains about.

OttoWinter commented 2 years ago

Ah now I see why I couldn't reproduce it. Making it a debug build type fixes the issue haha

esphome:
  platformio_options:
    build_type: debug

Yeah smells like a compiler bug

oxan commented 2 years ago

Can't reproduce it with Arduino 3 which uses GCC 10, so yeah, definitely a compiler bug.

5A52 commented 2 years ago

@oxan Thank you, - single_light_id: fixed my problem. Should I close issue now, or this is bug anyway?

Marlor commented 2 years ago

@OttoWinter The packages confusion is still happening in 2021.10.2: log.txt do you want me to open a new issue?

toolchain-xtensa is especially odd. you want version ~2.40802.191122

platformio offers 2.100300.210717 mcspr offers 5.100300.210830 tasmota offers 5.100200.210303

and version 2.40802.200502 gets installed but from who?

oxan commented 2 years ago

toolchain-xtensa is especially odd. you want version ~2.40802.191122

platformio offers 2.100300.210717 mcspr offers 5.100300.210830 tasmota offers 5.100200.210303

and version 2.40802.200502 gets installed but from who?

PlatformIO offers more than one version of the toolchain. The tilde in ~2.40802.191122 means a version compatible with 2.40802.191122, so it selects 2.40802.200502 which is the newest compatible version.

Marlor commented 2 years ago

so it selects 2.40802.200502 which is the newest compatible version.

From mcspr or from tasmota? The platformio version is lower than the installed one.

oxan commented 2 years ago

From mcspr or from tasmota?

From PlatformIO.

The platformio version is lower than the installed one.

I'm not sure why you conclude this, but it's not the case.

Marlor commented 2 years ago

I'm not sure why you conclude this, but it's not the case.

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!

isn't the installed version 2.40802.200502 higher than the version offerd by platformio 2.100300.210717?

oxan commented 2 years ago

isn't the installed version 2.40802.200502 higher than the version offerd by platformio 2.100300.210717?

No, as 100300 > 40802.

Marlor commented 2 years ago

That's good, do you want a new issue for that?

oxan commented 2 years ago

2620 already fixed it.