Infinite build loop with some examples, dirty build.ninja

With multiple of the provided samples with the SDK, I'm getting a repeated build loop that ultimately fails due to a remaining "dirty build.ninja". This is primarily with some Edge Impulse samples, so I've posted there as well, but these samples are provided in the nRF SDK.

The build output is as follows, from the Wrapper sample using a custom replication of the FOMO sample:

[143/158] No update step for 'edge_impulse_project'
[144/158] Performing patch step for 'edge_impulse_project'
[145/158] Performing configure step for 'edge_impulse_project'
-- 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: /opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build/edge_impulse/src/edge_impulse_project-build
[145/158] Performing build step for 'edge_impulse_project'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build/edge_impulse/src/edge_impulse_project-build
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build/edge_impulse/src/edge_impulse_project-build
[0/1] Re-running CMake...

....

[0/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build/edge_impulse/src/edge_impulse_project-build
ninja: error: manifest 'build.ninja' still dirty after 100 tries

FAILED: edge_impulse/src/edge_impulse_project-stamp/edge_impulse_project-build edge_impulse/src/edge_impulse_project-build/libedge_impulse.a
cd /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build/edge_impulse/src/edge_impulse_project-build && /opt/nordic/ncs/toolchains/20d68df7e5/Cellar/cmake/3.20.5/bin/cmake --build .
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/20d68df7e5/bin/cmake --build /opt/nordic/ncs/v2.5.2/nrf/samples/edge_impulse/wrapper_2/build


If anyone has seen this before or has a guess of how to fix it, that'd be greatly appreciated.
Parents Reply Children
  • So its might sound a bit strange, but are you sure your computer time is correct? I found a issue at ninjas github where people wrote adjusting the computers/sync it fixed their error. Other solutions  was path length, but that should not be an issue for OSX as far as I know or if you have any special symbols in your path. 

    Have you tried to delete the build folder and create a new config and build it? It often fixes strange problems

    Regards

  • I'm pretty sure my clock is correct, I've checked that a few times. I'm on macOS so the path issue should exist here, my time is set to time.apple.com but I've tried updating from ntp as well. The weirder part is that yesterday morning, I had two almost identical projects setup and one worked just fine and the other did not (had this issue), but I can't find any relevant file differences that would seem to cause it. I know the main difference is out of scope for here but it's a somewhat commonly used same provided by nRF so I thought maybe someone here had seen this problem before.

  • Now I'm getting a new/diff error that be more nRF related:

    /opt/nordic/ncs/v2.5.2/nrf/lib/edge_impulse/ei_wrapper.cpp: At global scope:
    /opt/nordic/ncs/v2.5.2/nrf/lib/edge_impulse/ei_wrapper.cpp:56:31: error: static assertion failed
    56 | BUILD_ASSERT(DATA_BUFFER_SIZE > INPUT_WINDOW_SIZE);
    /opt/nordic/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:70:50: note: in definition of macro 'BUILD_ASSERT'
    70 | #define BUILD_ASSERT(EXPR, MSG...) static_assert(EXPR, "" MSG)
    | ^~~~
    /opt/nordic/ncs/v2.5.2/nrf/lib/edge_impulse/ei_wrapper.cpp:56:31: note: the comparison reduces to '(2500 > 9216)'
    56 | BUILD_ASSERT(DATA_BUFFER_SIZE > INPUT_WINDOW_SIZE);
    /opt/nordic/ncs/v2.5.2/zephyr/include/zephyr/toolchain/gcc.h:70:50: note: in definition of macro 'BUILD_ASSERT'
    70 | #define BUILD_ASSERT(EXPR, MSG...) static_assert(EXPR, "" MSG)

    Is this an EI or nRF issue? I'm not sure where I could modify the DATA_BUFFER_SIZE value and it appears to be provided by nRF code.

  • I honestly don't know. I tried to build just the forwarder example on my end and everything was working. I would presume this is when you are uploading an EI generated code?

    Regards

    Runar

  • I haven't tried the data_forwarder example as I have no sensors so I'm only using the Wrapper example. It was only reproducible with EI generated code for certain types of projects.

    I ended up figuring it out finally. I'll add that here or edit the original post so anyone else in the future can fix it as well.

Related