Skip to content

Issue with 3.4.0 with ESP-IDF & arduino-esp32 #161

@atfox98

Description

@atfox98

IDE / Tooling

ESP-IDF

What happened?

Skeleton project no longer builds with 3.4.0. I suspect it has something to do with ESP32Async/AsyncTCP#47.

Stack Trace

Compilation failed because AsyncEventSource.cpp (in "esp32async__espasyncwebserver" component) includes Arduino.h, provided by espressif__arduino-esp32 component(s).
However, espressif__arduino-esp32 component(s) is not in the requirements list of "esp32async__espasyncwebserver".
To fix this, add espressif__arduino-esp32 to REQUIRES list of idf_component_register call in project/managed_components/esp32async__espasyncwebserver/CMakeLists.txt.

Minimal Reproductible Example (MRE)

Create the arduino-esp32 hello_world project with the following command:

idf.py create-project-from-example "espressif/arduino-esp32:hello_world"

In main/idf_component.yml, paste the following:

dependencies:
  espressif/arduino-esp32: ^3.2.0
  esp32async/espasyncwebserver: ^3.7.6
  esp32async/asynctcp: 3.3.8 

Building the project like this works.

To reproduce the issue, change the asynctcp dependency in idf-component.yml to 3.4.0:

dependencies:
  espressif/arduino-esp32: ^3.2.0
  esp32async/espasyncwebserver: ^3.7.6
  esp32async/asynctcp: 3.4.0

The project will now no longer build.

My quick try to band-aid fix was to add the following to CMakeLists.txt

if (CONFIG_ENABLE_ARDUINO_DEPENDS)
    set(COMPONENT_REQUIRES "arduino-esp32")
endif()

...but in that case it had a different error (missing esp_timer.h/esp_timer component). Adding esp_timer to the COMPONENT_REQUIRES did not solve this, so you are now reading this issue instead of a PR ;-)

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

Labels

Type: BugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions