Jason2866 / platform-espressif32

Tasmota Espressif 32: development platform for PlatformIO
Apache License 2.0
57 stars 25 forks source link

tasmota / arduino-esp32 issue with mDNS lib #93

Closed vortigont closed 3 weeks ago

vortigont commented 4 weeks ago

Hi @Jason2866, can't open the issue in tasmota/arduino-esp32, so created it here. Found a problem in recent tasmota's arduino-esp32 release 3.1.0.241030. For mDNS lib - the linker fails to build a project if mDNS header ESPmDNS.h is included somewhere in the project. I found that file libraries/ESPmDNS/src/ESPmDNS.cpp supplied in the package is modified against the upstream source, this line is added at the top #if CONFIG_MDNS_MAX_INTERFACES Looks like when the cpp unit is built it does not include "sdkconfig.h" so the #if guard is always false. I fixed it with

#include "sdkconfig.h"
#if CONFIG_MDNS_MAX_INTERFACES

Could you pls check if this? Appreciate your work on IDF's 5.3 build, so nice to have a new version of c++ toolchain here! Thanks!

Jason2866 commented 4 weeks ago

Hi @vortigont Ahh, yes. Fixed. Use platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.11.30/platform-espressif32.zip Updated rebuild the frameworks. You may have to delete the folders in .platformio and the cache folder Btw. the pioarduino rc2 release uses the new toolchains too. It is 100% identic with Arduino espressif release (uses the tar balls from espressif)

vortigont commented 3 weeks ago

got it! Thanks so much!

vortigont commented 3 weeks ago

Still not fixed, unfortunately :( Inside this zip https://github.com/tasmota/platform-espressif32/releases/download/2024.11.30/platform-espressif32.zip the manifest declares

  "packages": {                                                                                                                                               
    "framework-arduinoespressif32": {                                                                                                                         
      "type": "framework",                                                                                                                                    
      "optional": true,                                                                                                                                       
      "owner": "tasmota",                                                                                                                                     
      "version": "https://github.com/tasmota/arduino-esp32/releases/download/v3.1.0.241030/framework-arduinoespressif32.zip"                                  
    },   

and inside https://github.com/tasmota/arduino-esp32/releases/download/v3.1.0.241030/framework-arduinoespressif32.zip the file libraries/ESPmDNS/src/ESPmDNS.cpp is still broken with

#if CONFIG_MDNS_MAX_INTERFACES
Jason2866 commented 3 weeks ago

@vortigont Mhh why?

#include "sdkconfig.h"
#if CONFIG_MDNS_MAX_INTERFACES
.
.
.

So it should work

vortigont commented 3 weeks ago

ah... so sorry... looks like it stuck in CI's cache. Indeed when downloaded with wget it's all fine. Now builds fine! Sorry for the noise!