mhendriks / esphome-p1

21 stars 14 forks source link

Compiling fails with 2023.10.1 #5

Closed FreddyX078 closed 11 months ago

FreddyX078 commented 11 months ago

Hi, compiling fails with latest ESPHome (2023.10.1)

This is the log:

Compiling .pioenvs/dsmr-p1-pro/src/esphome/components/ethernet/ethernet_component.cpp.o Compiling .pioenvs/dsmr-p1-pro/src/main.cpp.o src/esphome/components/ethernet/ethernet_component.cpp: In member function 'void esphome::ethernet::EthernetComponent::startconnect()': src/esphome/components/ethernet/ethernet_component.cpp:344:69: error: invalid static_cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} info.ip.addr = static_cast(this->manualip->static_ip); ^ src/esphome/components/ethernet/ethernet_component.cpp:345:67: error: invalid static_cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} info.gw.addr = static_cast(this->manualip->gateway); ^ src/esphome/components/ethernet/ethernet_component.cpp:346:71: error: invalid static_cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} info.netmask.addr = static_cast(this->manualip->subnet); ^ src/esphome/components/ethernet/ethernet_component.cpp:369:40: error: invalid cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} if (uint32_t(this->manualip->dns1) != 0) { ^ src/esphome/components/ethernet/ethernet_component.cpp:373:71: error: invalid static_cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} d.u_addr.ip4.addr = static_cast(this->manualip->dns1); ^ src/esphome/components/ethernet/ethernet_component.cpp:379:40: error: invalid cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} if (uint32_t(this->manualip->dns1) != 0) { ^ src/esphome/components/ethernet/ethernet_component.cpp:383:71: error: invalid static_cast from type 'esphome::network::IPAddress' to type 'uint32_t' {aka 'long unsigned int'} d.u_addr.ip4.addr = static_cast(this->manualip->dns2); ^ Archiving .pioenvs/dsmr-p1-pro/lib33b/libWiFi.a Indexing .pioenvs/dsmr-p1-pro/lib33b/libWiFi.a Archiving .pioenvs/dsmr-p1-pro/libb1b/libFS.a Indexing .pioenvs/dsmr-p1-pro/libb1b/libFS.a Archiving .pioenvs/dsmr-p1-pro/lib408/libUpdate.a Indexing .pioenvs/dsmr-p1-pro/lib408/libUpdate.a Compiling .pioenvs/dsmr-p1-pro/lib446/ESPAsyncWebServer-esphome/WebResponses.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib446/ESPAsyncWebServer-esphome/WebServer.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib8f6/ESPmDNS/ESPmDNS.cpp.o Compiling .pioenvs/dsmr-p1-pro/libb26/Dsmr/dsmr/fields.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AES128.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AES192.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AES256.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AESCommon.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AESEsp32.cpp.o Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/AuthenticatedCipher.cpp.o *** [.pioenvs/dsmr-p1-pro/src/esphome/components/ethernet/ethernet_component.cpp.o] Error 1 Compiling .pioenvs/dsmr-p1-pro/lib972/Crypto/BLAKE2b.cpp.o ========================== [FAILED] Took 3.16 seconds ==========================

Thanks!

mhendriks commented 11 months ago

Thanks for reporting the issue.

Casting changes are made: https://github.com/mhendriks/esphome-p1/blob/main/components/ethernet/ethernet_component.cpp

Works fine again :-)

FreddyX078 commented 11 months ago

Thanks, works again!