Skip to content

ESP32-P4 with custom_sdkconfig build fails: ip_addr vs ip_addr_t type mismatch (AsyncTCP.cpp) #66

@qniens

Description

@qniens

IDE / Tooling

pioarduino

What happened?

When building AsyncTCP for the ESP32-P4 with custom_sdkconfig set (even without any options), compilation fails due to mismatched types between [ip_addr] and [ip_addr_t].

To Reproduce use AsyncTCP as a dependency in a PlatformIO project targeting ESP32-P4 and set custom_sdkconfig.
Build the project.

Stack Trace

.pio/libdeps/esp32-p4/AsyncTCP/src/AsyncTCP.cpp:313:27: error: cannot convert 'ip_addr_t*' {aka 'ip4_addr*'} to 'ip_addr*'
  e->client->_dns_found(&e->dns.addr);
                        ^~~~~~~~~~~~
                        ip_addr_t* {aka ip4_addr*}
.pio/libdeps/esp32-p4/AsyncTCP/src/AsyncTCP.cpp:527:34: error: invalid application of 'sizeof' to incomplete type 'ip_addr'
  memcpy(&e->dns.addr, ipaddr, sizeof(struct ip_addr));
                                 ^~~~~~~~~~~~~~~~~~~~
.pio/libdeps/esp32-p4/AsyncTCP/src/AsyncTCP.cpp:1164:12: error: no matching function for call to 'AsyncClient::connect(ip_addr&, uint16_t&)'
  connect(*ipaddr, _connect_port);
           ^~~~~~~~~~~~~~~~~~~~~

Minimal Reproductible Example (MRE)

Empty project

#include <Arduino.h>
void setup(){

}

void loop(){

}

platformio.ini

[env:esp32-p4]
platform = https://github.com/pioarduino/platform-espressif32.git
lib_compat_mode = strict
lib_ldf_mode = chain

framework = arduino
board = esp32-p4
build_flags = -D CORE_DEBUG_LEVEL=5
monitor_speed = 115200

;if you remove custom_sdkconfig will compile
custom_sdkconfig        = 
                          ; CONFIG_CACHE_L2_CACHE_256KB=y


custom_component_remove = espressif/esp_hosted
                          espressif/esp_wifi_remote
                          espressif/mdns
                          espressif/esp-dsp
                          espressif/esp_modem
                          espressif/esp32-camera

lib_deps =  
  ESP32Async/AsyncTCP
  ;ESP32Async/ESPAsyncWebServer

I confirm that:

  • I have read the documentation.
  • I have searched for similar discussions.
  • I have searched for similar issues.
  • I have looked at the examples.
  • I have upgraded to the lasted version of AsyncTCP.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions