You are not logged in.

#1 2019-11-07 02:16:12

ArchDevel
Member
Registered: 2019-02-09
Posts: 3

ninja: error: loading 'build.ninja': No such file or directory

So I have been battling this issue for about a day now. I am hoping that someone could shed some light for me. I installed Ninja as a part of the SDK and development environment setup for the Zephyr Project and for the nrf Connect SDK. I am attempting to utilize the GIT clones of both of these locally to build an app for Zephyr utilizing its meta tool West. However when ever I pass the command:

 west build -b nrf9160_pca20035 samples/bluetooth/hci_uart 

I am greeted with an error of:

--west build: build configuration:
          source directory: /home/rex/.zephyrproject/zephyr/samples/bluetooth/hci_uart
          build directory: /home/rex/.zephyrproject/zephyr/build
          BOARD: nrf9160_pca20035 (origin: CMakeCache.txt)
--west build: building application

ninja: error: loading 'build.ninja' : No such file or directory
ERROR: command exited with status 1: /usr/bin/cmake --build /home/rex/.zephyrproject/zephyr/build

I do not know where to begin here. I have made sure all the dependencies have been met and my system is up to date. Can anyone shed some light?

The tool chain and environment was set with:

export ZEPHYR_TOOLCHAIN_VARIANT=zephyr

Offline

#2 2019-11-08 19:12:28

WSDMatty
Member
Registered: 2019-08-27
Posts: 22

Re: ninja: error: loading 'build.ninja': No such file or directory

Ninja requires a build.ninja file, which is similar to a Makefile. It tells Ninja what to build and how to build it. What that error is telling you, is that there is no build.ninja file present in the directory in which you are trying to run ninja.

I would look at the documentation for that project and see if you missed a step to produce the build file. For one of the projects I work on, Meson is used to produce the build file, then Ninja is used to build. Your project may handle this differently. But if you are meant to use ninja to build it, then somewhere, a build.ninja file must be created telling ninja how and what to build.

Offline

#3 2019-11-09 13:25:05

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: ninja: error: loading 'build.ninja': No such file or directory

BOARD: nrf9160_pca20035 (origin: CMakeCache.txt)

The cmake cache may have incorrect/outdated data, does west build have a parameter to force cmake to reconfigure ?
erasing the build folder often has the same effect.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB