Skip to content

Failed to resolve component 'mdns' (IDFGH-11204) #8740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
piti-diablotin opened this issue Oct 8, 2023 · 5 comments · Fixed by #8743, tasmota/arduino-esp32#282 or tasmota/arduino-esp32#283
Closed
3 tasks done
Assignees
Labels
Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF Type: Bug 🐛 All bugs

Comments

@piti-diablotin
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1.1

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

I followed the guide on how to integrate arduino-esp32 in idf.
In the documentation it is mention we can install the component in global component directory so this is what I did.
In ~esp-idf/components I did

cd components && \
git clone https://github.com/espressif/arduino-esp32.git arduino && \
cd arduino && \
git submodule update --init --recursive 

Then in a fresh new project, when I run idf.py menuconfig I expect the command to display menuconfig with arduino option as describe in documentation

What is the actual behavior?

Instead I got this error when running idf.py menuconfig

Executing action: menuconfig
Running cmake in directory /home/diablotin/Codes/ESP32/toto/build
Executing "cmake -G 'Unix Makefiles' -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/diablotin/.espressif/python_env/idf5.1_py3.11_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/diablotin/Codes/ESP32/toto"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: /usr/bin/git (found version "2.42.0") 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/diablotin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/diablotin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/diablotin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal : ni ceci ni aucun de ses répertoires parents n'est un dépôt git : .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
Dependencies lock doesn't exist, solving dependencies.
Updating lock file at /home/diablotin/Codes/ESP32/toto/dependencies.lock
Processing 1 dependencies:
[1/1] idf (5.1.1)
CMake Error at /home/diablotin/Codes/esp-idf/tools/cmake/build.cmake:266 (message):
  Failed to resolve component 'mdns'.
Call Stack (most recent call first):
  /home/diablotin/Codes/esp-idf/tools/cmake/build.cmake:302 (__build_resolve_and_add_req)
  /home/diablotin/Codes/esp-idf/tools/cmake/build.cmake:595 (__build_expand_requirements)
  /home/diablotin/Codes/esp-idf/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!
cmake failed with exit code 1

Steps to reproduce.

cd components && \
git clone https://github.com/espressif/arduino-esp32.git arduino && \
cd arduino && \
git submodule update --init --recursive 
  • idf.py create-project toto && cd toto && idf.py menuconfig

Build or installation Logs.

Running on Manjaro

More Information.

I tried to add an extra directory for component but did not change a thing.
I am for sure missing something but cannot figure out what

@github-actions github-actions bot changed the title Failed to resolve component 'mdns' Failed to resolve component 'mdns' (IDFGH-11204) Oct 8, 2023
@igrr
Copy link
Member

igrr commented Oct 9, 2023

The issue is probably in arduino-esp32's CMakeLists.txt:

set(requires spi_flash mbedtls mdns wifi_provisioning wpa_supplicant esp_adc esp_eth http_parser)

Over there, mdns component is added as a dependency of arduino-esp32 component, but idf_component.yml doesn't declare a dependency on espressif/mdns.

To fix this, mdns has to be removed from the list of requirements and added to idf_component.yml.

@igrr igrr transferred this issue from espressif/esp-idf Oct 9, 2023
@igrr igrr added Status: Awaiting triage Issue is waiting for triage Area: Arduino as ESP-IDF component Issues about Arduino used as component in ESP-IDF labels Oct 9, 2023
@igrr
Copy link
Member

igrr commented Oct 9, 2023

Also, we really should have a CI job to verify that arduino-esp32 can be successfully used as a component in an plain IDF project (without the lib-builder).

@me-no-dev
Copy link
Member

Also, we really should have a CI job to verify that arduino-esp32 can be successfully used as a component in an plain IDF project (without the lib-builder).

We have it on 4.4 and was turned off here a while ago because there was no way to do it at the time (5.1 as master). Will turn it on again and make sure dependencies are properly declared.

@piti-diablotin
Copy link
Author

Thanks for the fast fix !

I still have one question. When I follow procedure, I have an error about FREERTOS frequency being 100 instead of 1000.
I changed it by hand in sdkconfig but I was wondering if there is something better to do ?

Otherwise it works fine ! 👍

@me-no-dev
Copy link
Member

you can have a sdkconfig.defaults file in the root of your project with contents CONFIG_FREERTOS_HZ=1000. This will ensure that you always have it set to the proper value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment