Open dalemcbeath opened 4 years ago
Please check, if the PATH of the required components is in the sme location as described in CMakeLists.txt.
Aloha, Holub, thanks for your help!
Here's the default CmakeLists.txt in the project directory:
cmake_minimum_required(VERSION 3.5)
`
set(EXTRA_COMPONENT_DIRS ../../../components)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(recognition_solution)`
And IDF_PATH is
>> echo $IDF_PATH
/Users/CritterLab/esp/esp-idf
so that directory contains:
>> ls $IDF_PATH/tools/cmake/
build.cmake. git_submodules.cmake. project.cmake
targets.cmake version.cmake component.cmake
idf.cmake project_description.json.in. third_party
convert_to_cmake.py. kconfig.cmake. run_cmake_lint.sh
toolchain-esp32.cmake crosstool_version_check.cmake ldgen.cmake
components:
>> ls $IDF_PATH/components
app_trace esp-tls esp_local_ctrl heap nghttp tcp_transport app_update esp32 esp_ringbuf idf_test nvs_flash tcpip_adapter asio esp_adc_cal esp_rom jsmn openssl ulp bootloader esp_common esp_websocket_client json partition_table unity bootloader_support esp_eth esp_wifi libsodium protobuf-c vfs bt esp_event espcoredump log protocomm wear_levelling coap esp_gdbstub esptool_py lwip pthread wifi_provisioning console esp_http_client expat mbedtls sdmmc wpa_supplicant cxx esp_http_server fatfs mdns soc xtensa driver esp_https_ota freemodbus mqtt spi_flash efuse esp_https_server freertos newlib spiffs
set(EXTRA_COMPONENT_DIRS ../../../components)
I said, check this location, I think, that this directory does not exist (more or less ../). If it would exist, it would appear in components.
Yes, that directory did not exist. That directory on my machine is /Users/
I found a components directory one level back that did contain esp32-camera.
I changed the project CMakeLists.txt file to set(EXTRA_COMPONENT_DIRS ../components)
then ran idf.py menuconfig
. Same error.
I changed it back to set(EXTRA_COMPONENT_DIRS ../../../components)
and created a directory in that location with the component, and tried again.
dm > cd /Users/CritterLab/ESP32-EYE/detection_with_command_line
dm > cat CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS ../../../components)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(detection_with_command_line)
dm > ls ../../../components
esp32-camera
dm >
then ran idf.py menuconfig
. Same error.
-- Building ESP-IDF components for target esp32 CMake Error at /Users/CritterLab/esp/esp-idf/tools/cmake/build.cmake:185 (message): Failed to resolve component 'esp32-camera'. Call Stack (most recent call first): /Users/CritterLab/esp/esp-idf/tools/cmake/build.cmake:211 (__build_resolve_and_add_req) /Users/CritterLab/esp/esp-idf/tools/cmake/build.cmake:425 (__build_expand_requirements) /Users/CritterLab/esp/esp-idf/tools/cmake/project.cmake:348 (idf_build_process) CMakeLists.txt:7 (project)
thank you once again for your help, it is appreciated.
I am assuming you did not clone the esp-who
repository using the --recursive
option. The components your build fails to find are subrepositories and thus their directories will be empty if you don't pull them in via cloning recursively. Could you try again using
git clone --recursive https://github.com/espressif/esp-who.git
...and let us know how that went?
same issue here, I tried with
git clone --recursive https://github.com/espressif/esp-who.git
and didn't work.
-- Check for working CXX compiler: /Users/czu/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Project version: 40ec4530 -- Building ESP-IDF components for target esp32 CMake Error at /Users/czu/esp-who/esp-idf/tools/cmake/build.cmake:185 (message): Failed to resolve component 'esp32-camera'.
`
Finally I make it work, the esp-info reference is not the same that master branch esp-info at https://github.com/espressif/esp-idf
So I have to clone that repo and replace the folder esp-who/esp-inf, then install and export again.
I also I have to check the EXTRA_COMPONENT_DIRS path on CMakeList.txt that is in my project to reference the components folder inside esp-who.
After that I can make it work.
Good job @ZumelzuR, I could not reproduce your steps. Do you have a better idea what I could do?
@leoheck I had this same problem as the OP until I downgraded the IDF version from v5.0-rc2
to v4.4.3
. See this note where the mDNS package has been moved out of the ESP-IDF repo since v5.0.
The other solution might be to explicitly add the mDNS as a component (git submodule) to this repo and maintain a fork.
Oh, good, I will give it a try again with your tips to check if I can get it working. Thanks @sirajissani
This thread looks old, but in case someone's still stuck with this issue, here's how I managed to resolve it:
components
directory of your ESP IDF installation. Note that the name needs to be exactly esp32-camera
, so make sure to rename the folder before/after copying (i.e. remove the trailing version)https://github.com/espressif/esp-dl/tags
idf.py
commandAfter these steps I managed to successfully run idf.py set-target esp32
on my side
I tested it on v4.4.3
, as I tried @sirajissani suggestion first, but I assume that'll work on later version as well
P.S. IDK why those aren't downloaded automatically, maybe it's a macOS-specific issue
Thank you. I have to check your solution since I could not make it work yet.
I am new to this. But yay, I could make it work this time, with your help on Ubuntu 23.04
Here is my fully working setup... I did not have to make any custom changes, tho.
Remove previously installed stuff
rm -rf ~/.espressif/
First of all, install esp-idf (4.4.5)
git clone https://github.com/espressif/esp-idf.git
cd esp-idf
git checkout v4.4.5
./install.sh esp32
. ./export.sh
Then this repo (esp-who
)
git clone --recursive https://github.com/espressif/esp-who.git
cd esp-who
idf.py set-target esp32
# select the example intended
cd ./examples/motion_detection/terminal
idf.py build
# Plug the device, and check the device.. in my case, it was /dev/ttyUSB0
idf.py -p /dev/ttyUSB0 flash
idf.py -p /dev/ttyUSB0 monitor
Environment
Problem Description
followed Quick Start with ESP-WHO all the way through the hello_world project, which builds fine and works on the ESP-EYE board via Arduino Serial Monitor.
repeated process with each of the other included esp_who examples, each gives same error when trying to run idf.py menuconfig or idf.py -p /dev/cu.usbserial-1430 flash. All tries result in the same error:
-- Building ESP-IDF components for target esp32 CMake Error at /Users/CritterLab/esp/esp-idf/tools/cmake/build.cmake:185 (message): Failed to resolve component 'esp32-camera'.
I have tried all the examples, only hello_world works. I did get around a partition size problem by changing the table start from 8000 to 9000. I have gone through the issue lists and seen a few references to the "Failed to resolve component" issue, but none of the suggestions worked, or seemed appropriate, for my situation.
I have re-downloaded today's (2020-06-04) version of esp-who and tried new copies of those included examples with the same error. I do note there is an updated component "esp32-camera @ af93185" but I still get the same errors.
thank you, both for any help and for supporting these amazing boards. This is my first ever issue submission, so I apologize for any errors.
Expected Behavior
that all of the stable version examples would work.
Actual Behavior
only hello_world works.
Steps to reproduce
Code to reproduce this issue
Debug Logs
Other items if possible
sdkconfig.txt
build
folder (note this may contain all the code details and symbols of your project.)