Skip to content

ninja process hanging forever when building esp32 arduino lib builder with component having ${CMAKE_BINARY_DIR} in INCLUDE_DIRS, idf_component_register (IDFGH-14412) #264

Open
@bhcuong2008

Description

@bhcuong2008

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.4

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?

Build successfully

What is the actual behavior?

ninja hanging forever at step [2820/2821] Linking CXX executable arduino-lib-builder.elf

Steps to reproduce.

  1. Install requirements following https://github.com/espressif/esp32-arduino-lib-builder for tag idf-release_v5.4, for example, at folder /esp32/lib5.4
  2. Run initial to install all tools, libraries, esp-idf, and wait until the end
    /esp/lib5.4/build.sh -A idf-release/v5.4 -I release/v5.4 -i v5.4 -t 'esp32s3' -b idf-libs
  3. Create test component in directory components inside lib-builder folder, in this folder /esp32/lib5.4/components with command
    source ../esp-idf/export.sh
    idf.py create-component test
  4. Edit created test/CMakeLists.txt as following:
idf_component_register(
    SRCS "test.c"
    INCLUDE_DIRS "${CMAKE_BINARY_DIR}" "include"
)
  1. Save and go to folder /esp32/lib5.4, run command again with option -s to avoid download tools, libs,...again.
    build.sh -s -A idf-release/v5.4 -I release/v5.4 -i v5.4 -t 'esp32s3' -b idf-libs
  2. The build process will run and hang at 2820/2821
[2819/2821] Building C object CMakeFiles/arduino-lib-builder.elf.dir/project_elf_src_esp32s3.c.obj
[2820/2821] Linking CXX executable arduino-lib-builder.elf
  1. Now, remove "${CMAKE_BINARY_DIR}" in file CMakeLists.txt, and run again, it will be successful.
    build.sh -s -A idf-release/v5.4 -I release/v5.4 -i v5.4 -t 'esp32s3' -b idf-libs

So, why ${CMAKE_BINARY_DIR} or ${BUILD_DIR} causes this hang?

Build or installation Logs.

...
[2799/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ZigbeeHandlers.cpp.obj
[2800/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeDimmableLight.cpp.obj
[2801/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeSwitch.cpp.obj
[2802/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeLight.cpp.obj
[2803/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp.obj
[2804/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeTempSensor.cpp.obj
[2805/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeThermostat.cpp.obj
[2806/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeOccupancySensor.cpp.obj
[2807/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeFlowSensor.cpp.obj
[2808/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeeCarbonDioxideSensor.cpp.obj
[2809/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Zigbee/src/ep/ZigbeePressureSensor.cpp.obj
[2810/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp.obj
[2811/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp.obj
[2812/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp.obj
[2813/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp.obj
[2814/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp.obj
[2815/2821] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/Matter/src/Matter.cpp.obj
[2816/2821] Linking C static library esp-idf/arduino/libarduino.a
[2817/2821] Linking C static library esp-idf/main/libmain.a
[2818/2821] Generating ld/sections.ld
warning: default on the choice symbol SEC_CERT_DAC_PROVIDER (defined at /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:929, /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/components/esp_matter/Kconfig:48) will have no effect, as defaults do not affect choice symbols
warning: the choice symbol SEC_CERT_DAC_PROVIDER (defined at /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:929, /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/components/esp_matter/Kconfig:48) is defined with a prompt outside the choice
info: INFO: Symbol SEC_CERT_DAC_PROVIDER defined in multiple locations (see below). Please check if this is a correct behavior or a random name match:
    /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/components/esp_matter/Kconfig:48
    /cfm/esp32/lib5.4_mp1.24/managed_components/espressif__esp_matter/connectedhomeip/connectedhomeip/config/esp32/components/chip/Kconfig:929
[2819/2821] Building C object CMakeFiles/arduino-lib-builder.elf.dir/project_elf_src_esp32s3.c.obj
[2820/2821] Linking CXX executable arduino-lib-builder.elf

More Information.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions