GNOME Bugzilla – Bug 782811
Meson projects need re-configuring
Last modified: 2017-06-09 15:02:30 UTC
I'm trying to build gnome-dictionary with jhbuild and it throws always the following message when it runs ninja: *** Building gnome-dictionary *** [1/1] ninja ninja: error: loading 'build.ninja': No such file or directory $ ninja --version 1.7.2 So I think that the build file should be included in the project, isn't it?
Ok, I solved this by pressing the "configure" option, but it should be the first step by default with no "extra" human interacction.
The `build.ninja` file is generated by Meson. You should have attached the whole log, not just the last bit; could you find it again? In absence of more information, I assume the issue was that you had an already configured build of GNOME Dictionary, you updated Meson in between, and you got a warning saying that Meson cannot run until you clear out the existing build. In that case, re-configuring is the appropriate solution. In any case, this has nothing to do with GNOME Dictionary, so I'm re-assigning to jhbuild.
There's an existing bug for that, but of course no way to know if this is a duplicate without a build log.
I can reproduce it with gnome-software. $ jhbuild buildone gnome-software *** Checking out gnome-software *** [1/1] git remote set-url origin https://git.gnome.org/browse/gnome-software git remote update origin Fetching origin remote: Counting objects: 29, done. remote: Compressing objects: 100% (16/16), done. remote: Total 16 (delta 14), reused 0 (delta 0) Unpacking objects: 100% (16/16), done. From https://git.gnome.org/browse/gnome-software + 836fed0d...350d7a6c wip/rancell/permissions -> origin/wip/rancell/permissions (forced update) git rebase origin/master Current branch master is up to date. *** Building gnome-software *** [1/1] ninja ninja: error: loading 'build.ninja': No such file or directory *** Error during phase build of gnome-software: ########## Error running ninja *** [1/1] [1] Rerun phase build [2] Ignore error and continue to install [3] Give up on module [4] Start shell [5] Reload configuration [6] Go to phase "wipe directory and start over" [7] Go to phase "configure" choice: 4 $ ls -l total 8 drwxr-xr-x 2 lantw44 lantw44 512 6 6 04:19 meson-logs/ drwxr-xr-x 2 lantw44 lantw44 512 6 6 04:19 meson-private/ The previous run of meson failed, so build.ninja didn't exist. However, meson already created meson-logs and meson-private directories and jhbuild used meson-private to decide whether it should skip the configure phase.
Created attachment 353462 [details] [review] meson: Use meson-private/coredata.dat to detect a valid build directory Meson creates meson-log and meson-private in a build directory even if it fails to generate build files. When the user try to build the failed module again, jhbuild skips configure phase and ninja fails because build.ninja cannot be found. To avoid wrongly skipping configure phase, we should use meson-private/coredata.dat to detect a valid build directory, which is the last file written during build files generation.
Review of attachment 353462 [details] [review]: Nice!
Attachment 353462 [details] pushed as b1d2ebd - meson: Use meson-private/coredata.dat to detect a valid build directory