esphome / issues

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

undefined reference to `esp_eth_phy_new_jl1101' #4174

Closed kquinsland closed 1 year ago

kquinsland commented 1 year ago

The problem

After updating to the new 2023.02 release this morning, I attempted to update the firmware on my BTLE proxy device and got this failure during compilation:

/home/karl/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o: in function esphome::ethernet::EthernetComponent::setup()': /home/karl/Projects/esphome/hardware/build-root/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp:100: undefined reference toesp_eth_phy_new_jl1101'

Which version of ESPHome has the issue?

2023.02

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

N/A

What platform are you using?

ESP32

Board

LILYGO TTGO T-Internet-POE ESP32-WROOM LAN8720A

Component causing the issue

ethernet

Example YAML snippet

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0

Anything in the logs that might be useful for us?

No response

Additional information

No response

syssi commented 1 year ago

Same here.

Linking .pioenvs/zb-gw03-coordinator/bootloader.elf
Building .pioenvs/zb-gw03-coordinator/bootloader.bin
Creating esp32 image...
Successfully created esp32 image.
Linking .pioenvs/zb-gw03-coordinator/firmware.elf
/home/runner/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.o:(.literal._ZN7esphome8ethernet17EthernetComponent5setupEv+0x44): undefined reference to `esp_eth_phy_new_jl1101'
/home/runner/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.o: in function `esphome::ethernet::EthernetComponent::setup()':
/home/runner/work/esphome-zb-gw03/esphome-zb-gw03/.esphome/build/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.cpp:57: undefined reference to `esp_eth_phy_new_jl1101'
collect2: error: ld returned 1 exit status
*** [.pioenvs/zb-gw03-coordinator/firmware.elf] Error 1
========================= [FAILED] Took 151.86 seconds =========================
Error: Process completed with exit code 1.

https://github.com/syssi/esphome-zb-gw03/actions/runs/4188369897/jobs/7259417281

Can be reproduced using this example configuration:

https://raw.githubusercontent.com/syssi/esphome-zb-gw03/main/coordinator-example.yaml

jesserockz commented 1 year ago

@kquinsland Can you try a clean build? (But also try 2023.2.1 first as that should run a clean build automatically)

@syssi I am guessing it could be the same issue for you as you cache the .esphome directory in your CI runs. (Sitenote: Have you looked at the https://github.com/esphome/build-action ? )

syssi commented 1 year ago

A clean build didn't solve the issue. I've removed the cache of the CI pipeline manually and tried a local build too:

$ cd /tmp
$ git clone git@github.com:syssi/esphome-zb-gw03.git 
$ cd esphome-zb-gw03
$ esphome run coordinator-example.yaml
[...]
Linking .pioenvs/zb-gw03-coordinator/bootloader.elf
Building .pioenvs/zb-gw03-coordinator/bootloader.bin
Creating esp32 image...
Successfully created esp32 image.
Linking .pioenvs/zb-gw03-coordinator/firmware.elf
/home/sebastian/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.o:(.literal._ZN7esphome8ethernet17EthernetComponent5setupEv+0x44): undefined reference to `esp_eth_phy_new_jl1101'
/home/sebastian/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.o: in function `esphome::ethernet::EthernetComponent::setup()':
/tmp/esphome-zb-gw03/.esphome/build/zb-gw03-coordinator/src/esphome/components/ethernet/ethernet_component.cpp:57: undefined reference to `esp_eth_phy_new_jl1101'
collect2: error: ld returned 1 exit status
*** [.pioenvs/zb-gw03-coordinator/firmware.elf] Error 1
$
kquinsland commented 1 year ago

@kquinsland Can you try a clean build? (But also try 2023.2.1 first as that should run a clean build automatically)

I failed to mention in the first post that I explicitly set the build_path to a new value before attempting to build.

Here's my shell history immediately after pip install --upgrade esphome and trying to build:

# This is a build attempt before cleaning....
Archiving .pioenvs/remote-bt-01/libFrameworkArduino.a
Indexing .pioenvs/remote-bt-01/libFrameworkArduino.a
Linking .pioenvs/remote-bt-01/firmware.elf
/home/karl/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o:(.literal._ZN7esphome8ethernet17EthernetComponent5setupEv+0x44): undefined reference to `esp_eth_phy_new_jl1101'
/home/karl/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o: in function `esphome::ethernet::EthernetComponent::setup()':
/home/karl/Projects/esphome/hardware/build-root/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp:100: undefined reference to `esp_eth_phy_new_jl1101'
collect2: error: ld returned 1 exit status
*** [.pioenvs/remote-bt-01/firmware.elf] Error 1
======================================================================= [FAILED] Took 12.17 seconds =======================================================================
❯ rm -rf /home/karl/.platformio/packages/toolchain-xtensa-esp32*
❯ esphome clean projects/ha_bt_proxy.yaml
INFO Reading configuration projects/ha_bt_proxy.yaml...
INFO Deleting projects/../build-root/remote-bt-01/.pioenvs
INFO Deleting projects/../build-root/remote-bt-01/.piolibdeps
INFO Done!

Here's the build post clean:

❯ esphome -s version_hash $(git rev-parse --short HEAD) run projects/ha_bt_proxy.yaml
INFO Reading configuration projects/ha_bt_proxy.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing remote-bt-01 (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
INFO Installing espressif/toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: toolchain-xtensa-esp32@8.4.0+2021r2-patch3 has been installed!
INFO toolchain-xtensa-esp32@8.4.0+2021r2-patch3 has been installed!
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
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
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...
Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5
INFO Installing bblanchon/ArduinoJson @ 6.18.5
Unpacking  [####################################]  100%
Library Manager: ArduinoJson@6.18.5 has been installed!
INFO ArduinoJson@6.18.5 has been installed!
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
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
|-- ESPmDNS @ 2.0.0
|-- ArduinoJson @ 6.18.5
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/api/user_services.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/atc_mithermometer/atc_mithermometer.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/binary_sensor/automation.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/binary_sensor/filter.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/bluetooth_proxy/bluetooth_connection.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/bluetooth_proxy/bluetooth_proxy.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/button/button.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32/core.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32/gpio.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32/preferences.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble/ble.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble/ble_advertising.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble/ble_uuid.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble_client/ble_characteristic.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble_client/ble_client_base.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble_client/ble_service.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/logger/logger.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/md5/md5.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/mdns/mdns_esp32.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/mdns/mdns_rp2040.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ota/ota_backend_arduino_esp32.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ota/ota_backend_arduino_esp8266.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ota/ota_backend_arduino_rp2040.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ota/ota_backend_esp_idf.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/ota/ota_component.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/prometheus/prometheus_handler.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/restart/button/restart_button.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/safe_mode/button/safe_mode_button.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/sensor/automation.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/sensor/filter.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/sensor/sensor.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/sntp/sntp_component.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/socket/bsd_sockets_impl.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/socket/lwip_raw_tcp_impl.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/socket/socket.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/status/status_binary_sensor.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/template/sensor/template_sensor.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/time/automation.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/time/real_time_clock.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/uptime/uptime_sensor.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/web_server/list_entities.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/web_server/web_server.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/web_server_base/web_server_base.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/xiaomi_ble/xiaomi_ble.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/components/xiaomi_lywsd02/xiaomi_lywsd02.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/application.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/color.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/component.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/component_iterator.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/controller.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/log.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/remote-bt-01/src/esphome/core/util.cpp.o
Compiling .pioenvs/remote-bt-01/src/main.cpp.o
Building .pioenvs/remote-bt-01/bootloader.bin
Generating partitions .pioenvs/remote-bt-01/partitions.bin
Creating esp32 image...
Successfully created esp32 image.
Compiling .pioenvs/remote-bt-01/libc06/AsyncTCP-esphome/AsyncTCP.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFi.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiAP.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiClient.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiGeneric.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiMulti.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiSTA.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiScan.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiServer.cpp.o
Compiling .pioenvs/remote-bt-01/lib2f8/WiFi/WiFiUdp.cpp.o
Compiling .pioenvs/remote-bt-01/lib203/FS/FS.cpp.o
Compiling .pioenvs/remote-bt-01/lib203/FS/vfs_api.cpp.o
Compiling .pioenvs/remote-bt-01/lib580/Update/HttpsOTAUpdate.cpp.o
Compiling .pioenvs/remote-bt-01/lib580/Update/Updater.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/AsyncEventSource.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/AsyncWebSocket.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/WebHandlers.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/WebRequest.cpp.o
Archiving .pioenvs/remote-bt-01/lib2f8/libWiFi.a
Archiving .pioenvs/remote-bt-01/libc06/libAsyncTCP-esphome.a
Indexing .pioenvs/remote-bt-01/libc06/libAsyncTCP-esphome.a
Indexing .pioenvs/remote-bt-01/lib2f8/libWiFi.a
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/WebResponses.cpp.o
Compiling .pioenvs/remote-bt-01/lib98e/ESPAsyncWebServer-esphome/WebServer.cpp.o
Compiling .pioenvs/remote-bt-01/lib981/ESPmDNS/ESPmDNS.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/Esp.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/FirmwareMSC.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/HWCDC.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/IPAddress.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/IPv6Address.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/MD5Builder.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/Print.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/Stream.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/StreamString.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/Tone.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/USB.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/USBCDC.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/USBMSC.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/WMath.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/WString.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/base64.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/cbuf.cpp.o
Archiving .pioenvs/remote-bt-01/lib981/libESPmDNS.a
Archiving .pioenvs/remote-bt-01/lib580/libUpdate.a
Archiving .pioenvs/remote-bt-01/lib203/libFS.a
Indexing .pioenvs/remote-bt-01/lib981/libESPmDNS.a
Indexing .pioenvs/remote-bt-01/lib580/libUpdate.a
Indexing .pioenvs/remote-bt-01/lib203/libFS.a
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-bt.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-cpu.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-dac.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-gpio.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-i2c-slave.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-i2c.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-ledc.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-matrix.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-misc.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-psram.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-rgb-led.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-rmt.c.o
Archiving .pioenvs/remote-bt-01/lib98e/libESPAsyncWebServer-esphome.a
Indexing .pioenvs/remote-bt-01/lib98e/libESPAsyncWebServer-esphome.a
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-spi.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-time.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-timer.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-tinyusb.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-touch.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/esp32-hal-uart.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/firmware_msc_fat.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/libb64/cdecode.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/libb64/cencode.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/main.cpp.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/stdlib_noniso.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/wiring_pulse.c.o
Compiling .pioenvs/remote-bt-01/FrameworkArduino/wiring_shift.c.o
Archiving .pioenvs/remote-bt-01/libFrameworkArduino.a
Indexing .pioenvs/remote-bt-01/libFrameworkArduino.a
Linking .pioenvs/remote-bt-01/firmware.elf
/home/karl/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o:(.literal._ZN7esphome8ethernet17EthernetComponent5setupEv+0x44): undefined reference to `esp_eth_phy_new_jl1101'
/home/karl/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp.o: in function `esphome::ethernet::EthernetComponent::setup()':
/home/karl/Projects/esphome/hardware/build-root/remote-bt-01/src/esphome/components/ethernet/ethernet_component.cpp:100: undefined reference to `esp_eth_phy_new_jl1101'
collect2: error: ld returned 1 exit status
*** [.pioenvs/remote-bt-01/firmware.elf] Error 1
nagyrobi commented 1 year ago

Same here on WT32-ETH01, tried multiple devices.

Discord thread: https://discord.com/channels/429907082951524364/1075781680591286325

danielduerr commented 1 year ago

Same here.

ssieb commented 1 year ago

@kquinsland , what kind of system are you running it on?

kquinsland commented 1 year ago

@kquinsland , what kind of system are you running it on?

LILYGO POE ESP32 module.

ssieb commented 1 year ago

I meant where are you running esphome? What kind of system are you using for HA?

syssi commented 1 year ago

In my case it's a simple python3.9 install (pip3 install esphome) on a amd64 based Debian Bullseye host.

StefanTT commented 1 year ago

Same here. Native installation on Arch, running on the commandline. Cleaning the build files does not help. Even tried deleting ~/.platformio

With esphome 2022.12.8 it works, esphome 2023.2.0 and 2023.2.1 are broken.

ssieb commented 1 year ago

Ok, it turns out the pypi package is somehow missing that file. So those of us that use the repo directly don't see this problem. As a workaround, you can use the esphome repo as an external component:

external_components:
  - source: github://esphome/esphome@dev
    components: [ ethernet ]
StefanTT commented 1 year ago

Yep, that's it. Adding the external component fixes the problem for me. Thank you for investigating!

danielduerr commented 1 year ago

@ssieb nice! I can confirm this works as well on a macOS install of esphome via brew.

kquinsland commented 1 year ago

I meant where are you running esphome? What kind of system are you using for HA?

Ah, I misunderstood.

I run HA on a k8s cluster. All my ESPHome builds take place inside of a container (CI/CD pipe) or my desktop... both linux based. For simplicity, I am showing things as they are on my desktop rather than from the CI/CD pipe which has some overhead.

In all cases, esphome is installed via pip in a venv

kpfleming commented 1 year ago

Just ran into this myself (pip-installed esphome, building for wESP32) and will either put in this workaround or wait for 2023.2.3 :-)

UngluedChalice commented 1 year ago

pip-installed esphome

How do you do the workaround for this? The way the workaround looks to me as a super noob is a Home Assistant configuration file, but I have ESPHome installed via the command line on my Mac.

syssi commented 1 year ago

In any case you have a YAML configuration with your ESPHome node configuration. To apply the workaround just extend this YAML file.

UngluedChalice commented 1 year ago

Oh, I understand. Those lines go in the YAML file that I have for each ESP32 device. I was thinking there was some general configuration file for the ESPHome package somewhere. Sorry, just got this up and running a week ago so I'm still learning the basics. Thanks!

kpfleming commented 1 year ago

Confirmed, my configuration builds and works as expected with 2023.2.3. Thanks!

lexcorp commented 1 year ago

Ok, resulta que al paquete pypi de alguna manera le falta ese archivo. Entonces, aquellos de nosotros que usamos el repositorio directamente no vemos este problema. Como solución alternativa, puede usar el repositorio esphome como componente externo:

external_components:
  - source: github://esphome/esphome@dev
    components: [ ethernet ]

Donde coloco esto?

ssieb commented 1 year ago

Donde coloco esto?

You would put that in the device yaml, but you don't need to now. Just update esphome to the latest version.

lexcorp commented 1 year ago

Donde coloco esto?

Pondrías eso en el dispositivo yaml, pero no es necesario ahora. Simplemente actualice esphome a la última versión.

Tengo la última version d esphome, la última version de de homeassistant y no funciono...

Home Assistant 2023.3.0 Supervisor 2023.02.dev2801 Frontend 20230301.0 - latest

ESPHome Current version: 2023.2.4

ssieb commented 1 year ago

What happens?

lexcorp commented 1 year ago

Intento instalar mi esp32, al hacer clic en instalar desde la interfaz de ESPHOME dentro de homeassistant:

INFO Reading configuration /config/esphome/tutum.yaml... INFO Generating C++ source... INFO Compiling app... Processing tutum (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 5.2.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

kpfleming commented 1 year ago

That is a different problem entirely.