After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782811 - Meson projects need re-configuring
Meson projects need re-configuring
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2017-05-19 00:25 UTC by Miguel Vaello Martínez
Modified: 2017-06-09 15:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meson: Use meson-private/coredata.dat to detect a valid build directory (1.34 KB, patch)
2017-06-09 13:46 UTC, Ting-Wei Lan
committed Details | Review

Description Miguel Vaello Martínez 2017-05-19 00:25:19 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?
Comment 1 Miguel Vaello Martínez 2017-05-19 00:32:23 UTC
Ok, I solved this by pressing the "configure" option, but it should be the first step by default with no "extra" human interacction.
Comment 2 Emmanuele Bassi (:ebassi) 2017-05-19 09:25:19 UTC
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.
Comment 3 Michael Catanzaro 2017-05-19 15:46:45 UTC
There's an existing bug for that, but of course no way to know if this is a duplicate without a build log.
Comment 4 Ting-Wei Lan 2017-06-06 06:14:01 UTC
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.
Comment 5 Ting-Wei Lan 2017-06-09 13:46:55 UTC
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.
Comment 6 Michael Catanzaro 2017-06-09 14:34:04 UTC
Review of attachment 353462 [details] [review]:

Nice!
Comment 7 Ting-Wei Lan 2017-06-09 15:02:25 UTC
Attachment 353462 [details] pushed as b1d2ebd - meson: Use meson-private/coredata.dat to detect a valid build directory