Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
73 stars 54 forks source link

Avoid cryptic Ninja error messages #1693

Open ReinhardKeil opened 1 month ago

ReinhardKeil commented 1 month ago

The Problem To Be Solved

Some examples come without RTE directory content (which is actually a user problem).

But the message that you are getting in CI system is:

FAILED: kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure 
cd /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/1 && /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/.vcpkg/downloads/artifacts/2139c4c6/tools.kitware.cmake/3.28.4/bin/cmake -P /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure-.cmake && /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/.vcpkg/downloads/artifacts/2139c4c6/tools.kitware.cmake/3.28.4/bin/cmake -E touch /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure
CMake Error at /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure-.cmake:49 (message):
  Command failed: 1

   '/home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/.vcpkg/downloads/artifacts/2139c4c6/tools.kitware.cmake/3.28.4/bin/cmake' '-G' 'Ninja' '-S' '/home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55' '-B' '/home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/1' '-DSOLUTION_ROOT=/home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples' '-DCMSIS_PACK_ROOT=/home/runner/.cache/arm/packs' '-DCMSIS_COMPILER_ROOT=/home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/.vcpkg/downloads/artifacts/2139c4c6/tools.open.cmsis.pack.cmsis.toolbox/2.5.0/etc'

  See also

    /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/tmp/kws.Release+AVH-SSE-300-U55/src/kws.Release+AVH-SSE-300-U55-stamp/kws.Release+AVH-SSE-300-U55-configure-*.log

ninja: build stopped: subcommand failed.
error cbuild: exit status 1

This is very cryptic as the root cause are missing files in the RTE directory.

The Error Log of CMake shows:

CMake Error at components.cmake:216 (add_library):
  Cannot find source file:

    /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/device/corstone/RTE/Device/SSE-300-MPS3/startup_SSE300MPS3.c
Call Stack (most recent call first):
  CMakeLists.txt:126 (include)

CMake Error at components.cmake:379 (add_library):
  Cannot find source file:

    /home/runner/work/mlek-cmsis-pack-examples/mlek-cmsis-pack-examples/common/RTE/Machine_Learning/debug_log.cpp
Call Stack (most recent call first):
  CMakeLists.txt:126 (include)

CMake Error at components.cmake:216 (add_library):
  No SOURCES given to target: ARM_Device_Startup_C_Startup_2_0_0
Call Stack (most recent call first):
  CMakeLists.txt:126 (include)

CMake Error at components.cmake:379 (add_library):
  No SOURCES given to target:
  tensorflow_Machine_Learning_TensorFlow_Kernel_Utils_1_23_2
Call Stack (most recent call first):
  CMakeLists.txt:126 (include)

CMake Generate step failed.  Build files cannot be regenerated correctly.

Suggest A Solution

Multiple solutions seem to be possible:

Test Case

See https://github.com/ReinhardKeil/mlek-cmsis-pack-examples/actions/workflows/Test-Version-2.yml - Build Test

ReinhardKeil commented 1 month ago

Similar to #1678 Suggest to test it with PR https://github.com/Open-CMSIS-Pack/cbuild2cmake/pull/166

ReinhardKeil commented 1 month ago

I believe this will be solved by #1694 + #1697 hence remove assigned to CMSIS-Toolbox 2.6.0 for now