-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ninja: error: loading 'build.ninja': No such file or directory #67927
Comments
Looks like this is not fixed yet. I did a fresh clone of the mainline today, and it is still there... |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
I am experiencing this issue too, is there some plan to investigate it? |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
This is not a Incremental builds are done using For example:
As described in the issue, then fixing the issue and trying to do an incremental build results in:
same with
|
I did not say it was a west issue. I added the "area: Build System" label. @thedjnK changed it to "area: West". This is a DX issue that should be addressed, so I'll reopen this. |
@alwa-nordic you also wrote:
When you refer to So the solution to your issue is to use
Use |
and just to make it clear, from
|
@alwa-nordic , can this issue be closed? |
I still think it's a
Doesn't seem like rocket science to me, and would solve this UX issue. |
because it's a wrapper then This is exactly why So what you're basically asking is that CMake should re-run itself when there is a CMake cache but no build file, but such request is better placed at CMake, not west. |
you're welcome to open a proposal, just remember that such change must continue to work with other generators besides ninja, and not suddenly start re-running CMake because ninja files are missing when one of the Makefile based generators is used: https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#cmake-generators And remember to maintain whatever changes you introduce and post additional fixes in case a given generator is not working as expected. Personally I consider this to be a design decision in how But although not being a bug, then you can still consider it an enhancement. |
I was not aware of that, and the comments before hinted that |
I actually tried to avoid such misunderstanding in my first comment here: #67927 (comment)
|
Ok, so from a purely DX-perspective, the issue is thus: It appears There is an argument that in CMake, the underlying system, the configure and build tasks are entirely separate. Counterargument: Since these are not separate steps in West, this should be hidden as an implementation detail if possible. Especially since the resulting error is not good (it's not instructive for new users). How does the "configure when needed" work today?: Internally, there two separate triggers for starting the configure: West does it when there is no build folder yet. And the generated Makefile has deps on the CMake files and reruns the configure step when those change. How does it fail?: A failure during the configure step will leave a build folder, but not a Makefile. West only checks for the presence of the build folder to determine if the Makefile can take the responsibility of "configuring when needed". But with no Makefile, the make program does not take this responsibility. Solutions:
|
Solution:
|
If a pristine build fails during CMake configure, it leaves a build folder that breaks incremental building. The telltale log message is
ninja: error: loading 'build.ninja': No such file or directory
. This problem does not appear in vanilla non-Zephyr CMake.To Reproduce
Steps to reproduce the behavior:
this_is_not_defined()
.west build -b native_posix
. (Selected board is irrelevant.)west build
for incremental build.ninja: error: loading 'build.ninja': No such file or directory
.The workaround is to delete the build folder.
Impact
User confusion, major annoyance.
The text was updated successfully, but these errors were encountered: