Migration to v5.0 problem - inbuilt components not found
Posted: Sun Jan 01, 2023 2:55 am
I'm migrating a working project from esp.idf 4.4.3 to 5.0. My problem is that although `idf.py reconfigure` correctly lists the inbuilt components, the include paths for these are not added to the compile line. So I get errors where include files belonging to the components are not found, e.g.
If I capture the command line (listed below) it does not add the correct path to find this, i.e.
If I add that (and all the other bundled component paths) to the INCLUDE_DIRS in main/CMakeLists.txt then the compile succeeds, but the build fails at the link stage due apparently to mis-ordering of library files. Manually reordering them results in a successful link step.
My top-level CMakeLists.txt is the standard boilerplate, and my main/CMakeLists.txt is:
A sample compile command generated by idf.py is below (broken into lines for readability) - note that there is no -I option to add the esp_events/include folder to the include search path. The full log file is attached.
All this worked fine with 4.4.3 - and nothing in the migration guide has helped. Any ideas?
Code: Select all
fatal error: esp_event.h: No such file or directory
Code: Select all
"${IDF_PATH}/components/esp_event/include"
My top-level CMakeLists.txt is the standard boilerplate, and my main/CMakeLists.txt is:
Code: Select all
file(GLOB_RECURSE IMAGE_SOURCES images/*.c)
file(GLOB MAIN_SOURCES *.c)
idf_component_register(SRCS ${IMAGE_SOURCES} ${MAIN_SOURCES}
REQUIRES esp_websocket_client lvgl
INCLUDE_DIRS "."
)
add_compile_definitions(
LV_CONF_PATH=${CMAKE_CURRENT_SOURCE_DIR}/lv_conf.h
LV_LVGL_H_INCLUDE_SIMPLE
)
All this worked fine with 4.4.3 - and nothing in the migration guide has helped. Any ideas?
Code: Select all
/Users/clyde/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc
-DLV_CONF_INCLUDE_SIMPLE
-DLV_CONF_PATH=/Users/clyde/dev/projects/esp/traffix-display/main/lv_conf.h
-DLV_LVGL_H_INCLUDE_SIMPLE
-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"
-I/Users/clyde/dev/projects/esp/traffix-display/build/config
-I/Users/clyde/dev/projects/esp/traffix-display/main
-I/Users/clyde/dev/tools/esp/esp-idf/components/newlib/platform_include
-I/Users/clyde/dev/tools/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/freertos/esp_additions/include/freertos
-I/Users/clyde/dev/tools/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/freertos/esp_additions/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_hw_support/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_hw_support/include/soc
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_hw_support/include/soc/esp32s3
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_hw_support/port/esp32s3/.
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_hw_support/port/esp32s3/private_include
-I/Users/clyde/dev/tools/esp/esp-idf/components/heap/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/log/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/soc/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/soc/esp32s3/.
-I/Users/clyde/dev/tools/esp/esp-idf/components/soc/esp32s3/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/hal/esp32s3/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/hal/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/hal/platform_port/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_rom/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_rom/include/esp32s3
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_rom/esp32s3
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_common/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_system/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_system/port/soc
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_system/port/include/private
-I/Users/clyde/dev/tools/esp/esp-idf/components/xtensa/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/xtensa/esp32s3/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp_timer/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/include/apps
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/include/apps/sntp
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/lwip/src/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/port/esp32/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/lwip/port/esp32/include/arch
-I/Users/clyde/dev/projects/esp/traffix-display/managed_components/lvgl__lvgl
-I/Users/clyde/dev/projects/esp/traffix-display/managed_components/lvgl__lvgl/src
-I/Users/clyde/dev/projects/esp/traffix-display/managed_components
-I/Users/clyde/dev/projects/esp/traffix-display/components/gdl90/include
-I/Users/clyde/dev/projects/esp/traffix-display/managed_components/espressif__esp_websocket_client/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp-tls
-I/Users/clyde/dev/tools/esp/esp-idf/components/esp-tls/esp-tls-crypto
-I/Users/clyde/dev/tools/esp/esp-idf/components/mbedtls/port/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/mbedtls/mbedtls/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/mbedtls/mbedtls/library
-I/Users/clyde/dev/tools/esp/esp-idf/components/mbedtls/esp_crt_bundle/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/tcp_transport/include
-I/Users/clyde/dev/tools/esp/esp-idf/components/http_parser
-mlongcalls
-fdiagnostics-color=always
-ffunction-sections
-fdata-sections
-Wall
-Werror=all
-Wno-error=unused-function
-Wno-error=unused-variable
-Wno-error=deprecated-declarations
-Wextra
-Wno-unused-parameter
-Wno-sign-compare
-Wno-enum-conversion
-gdwarf-4
-ggdb
-Og
-fmacro-prefix-map=/Users/clyde/dev/projects/esp/traffix-display=.
-fmacro-prefix-map=/Users/clyde/dev/tools/esp/esp-idf=/IDF
-fstrict-volatile-bitfields
-Wno-error=unused-but-set-variable
-fno-jump-tables
-fno-tree-switch-conversion
-DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1
-std=gnu17
-Wno-old-style-declaration
-D_GNU_SOURCE
-DIDF_VER=\"v5.0\"
-DESP_PLATFORM
-D_POSIX_READER_WRITER_LOCKS
-MD
-MT esp-idf/main/CMakeFiles/__idf_main.dir/events.c.obj
-MF esp-idf/main/CMakeFiles/__idf_main.dir/events.c.obj.d
-o esp-idf/main/CMakeFiles/__idf_main.dir/events.c.obj
-c /Users/clyde/dev/projects/esp/traffix-display/main/events.c