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 791293 - Reruns CMake in infinite loop when building Geary
Reruns CMake in infinite loop when building Geary
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-06 04:07 UTC by Michael Catanzaro
Modified: 2018-01-11 07:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
autotools: check for AC_INIT() in configure (2.63 KB, patch)
2018-01-11 06:02 UTC, Christian Hergert
committed Details | Review
code-index: delay builds until CONFIGURE is reached (5.27 KB, patch)
2018-01-11 07:41 UTC, Christian Hergert
committed Details | Review

Description Michael Catanzaro 2017-12-06 04:07:29 UTC
Using the Flatpak nightly channel, I cloned Geary (https://git.gnome.org/browse/geary/tree/), selected New Project in Builder, and picked the Geary directory and tried to build it. But the configure stage never finishes. Builder seems to be re-running CMake again and again in an infinitne loop:

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Icon cache will be updated
-- Desktop database will be updated
-- Generated desktop file will be checked for errors
-- Help translations will be generated and installed
-- xgettext found, version 0.19.8.1
-- Install Contractor contract: ON
-- checking for a minimum Vala version of 0.34.0
--   found Vala, version 0.36.7
-- Found vapigen: /usr/bin/vapigen
-- Unity messaging menu support: OFF
-- Unity launcher support: OFF
-- Vala fatal warnings: ON
-- Reference tracking: OFF
-- POODLE SSLv3 fix: ON
-- GSettings schemas will be compiled.
-- GSettings schemas will be compiled in-place.
-- GSettings schemas will be installed into /app/share/glib-2.0/schemas/
-- Could NOT find Valadoc (missing:  VALADOC_EXECUTABLE) 
-- SQLite FTS3 tokenizer support: ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mcatanzaro/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Geary/builds/org.gnome.Geary.json-084b7b490487294743d71c603a0fed8ffdf9bf5b-local-flatpak-org.gnome.Platform-x86_64-master
Configured.  Type 'make' to build, 'make install' to install.
cmake version 3.7.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Icon cache will be updated
-- Desktop database will be updated
-- Generated desktop file will be checked for errors
-- Help translations will be generated and installed
-- xgettext found, version 0.19.8.1
-- Install Contractor contract: ON
-- checking for a minimum Vala version of 0.34.0
--   found Vala, version 0.36.7
-- Found vapigen: /usr/bin/vapigen
-- Unity messaging menu support: OFF
-- Unity launcher support: OFF
-- Vala fatal warnings: ON
-- Reference tracking: OFF
-- POODLE SSLv3 fix: ON
-- GSettings schemas will be compiled.
-- GSettings schemas will be compiled in-place.
-- GSettings schemas will be installed into /app/share/glib-2.0/schemas/
-- Could NOT find Valadoc (missing:  VALADOC_EXECUTABLE) 
-- SQLite FTS3 tokenizer support: ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mcatanzaro/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Geary/builds/org.gnome.Geary.json-084b7b490487294743d71c603a0fed8ffdf9bf5b-local-flatpak-org.gnome.Platform-x86_64-master
Configured.  Type 'make' to build, 'make install' to install.
cmake version 3.7.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- Icon cache will be updated
-- Desktop database will be updated
-- Generated desktop file will be checked for errors
-- Help translations will be generated and installed
-- xgettext found, version 0.19.8.1
-- Install Contractor contract: ON
-- checking for a minimum Vala version of 0.34.0
--   found Vala, version 0.36.7
-- Found vapigen: /usr/bin/vapigen
-- Unity messaging menu support: OFF
-- Unity launcher support: OFF
-- Vala fatal warnings: ON
-- Reference tracking: OFF
-- POODLE SSLv3 fix: ON
-- GSettings schemas will be compiled.
-- GSettings schemas will be compiled in-place.
-- GSettings schemas will be installed into /app/share/glib-2.0/schemas/
-- Could NOT find Valadoc (missing:  VALADOC_EXECUTABLE) 
-- SQLite FTS3 tokenizer support: ON
-- Configuring done
cmake version 3.7.2
Comment 1 Michael Catanzaro 2017-12-06 04:09:58 UTC
Oh, I just noticed that if I scroll up, there is an actual CMake error:

CMake suite maintained and supported by Kitware (kitware.com/cmake).
-- The C compiler identification is GNU 6.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Icon cache will be updated
-- Desktop database will be updated
-- Generated desktop file will be checked for errors
-- Help translations will be generated and installed
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'sqlite3'
--   Found sqlite3, version 3.14.1
-- Looking for SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
-- Looking for SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER - found
-- xgettext found, version 0.19.8.1
-- Install Contractor contract: ON
-- Found Vala: /usr/bin/valac  
-- checking for a minimum Vala version of 0.34.0
--   found Vala, version 0.36.7
-- Found vapigen: /usr/bin/vapigen
-- Unity messaging menu support: OFF
-- Unity launcher support: OFF
-- Vala fatal warnings: ON
-- Checking for modules 'gthread-2.0;glib-2.0>=2.50.0;gio-2.0>=2.50.0;gtk+-3.0>=3.22.0;libsoup-2.4>=2.48;gee-0.8>=0.8.5;libnotify>=0.7.5;libcanberra>=0.28;sqlite3>=3.7.4;gmime-2.6>=2.6.17;libsecret-1>=0.11;libxml-2.0>=2.7.8;gcr-3>=3.10.1;gobject-introspection-1.0;webkit2gtk-4.0>=2.16;webkit2gtk-web-extension-4.0>=2.16;javascriptcoregtk-4.0>=2.16;enchant>=1.6;libunwind-generic>=1.1'
--   Found gthread-2.0, version 2.55.0
--   Found glib-2.0, version 2.55.0
--   Found gio-2.0, version 2.55.0
--   Found gtk+-3.0, version 3.22.26
--   Found libsoup-2.4, version 2.60.2
--   Found gee-0.8, version 0.20.0
--   Found libnotify, version 0.7.7
--   Found libcanberra, version 0.30
--   Found sqlite3, version 3.14.1
--   Found gmime-2.6, version 2.6.23
--   Found libsecret-1, version 0.18.5
--   Found libxml-2.0, version 2.9.4
--   Found gcr-3, version 3.20.0
--   Found gobject-introspection-1.0, version 1.55.0
--   Found webkit2gtk-4.0, version 2.19.1
--   Found webkit2gtk-web-extension-4.0, version 2.19.1
--   Found javascriptcoregtk-4.0, version 2.19.1
--   Found enchant, version 1.6.0
--   Found libunwind-generic, version 1.3-rc1
-- Reference tracking: OFF
-- POODLE SSLv3 fix: ON
-- GSettings schemas will be compiled.
-- GSettings schemas will be compiled in-place.
-- GSettings schemas will be installed into /app/share/glib-2.0/schemas/
-- Could NOT find Valadoc (missing:  VALADOC_EXECUTABLE) 
-- SQLite FTS3 tokenizer support: ON
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mcatanzaro/.var/app/org.gnome.Builder/cache/gnome-builder/projects/Geary/builds/org.gnome.Geary.json-084b7b490487294743d71c603a0fed8ffdf9bf5b-local-flatpak-org.gnome.Platform-x86_64-master
Configured.  Type 'make' to build, 'make install' to install.
make[2]: *** No rule to make target 'geary-version.vala', needed by 'src/.geary-engine.stamp'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:941: src/CMakeFiles/geary-engine.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
cmake version 3.7.2

OK, so that's a Geary bug. But it should cause Builder to give up, not rebuild continuously.
Comment 2 Michael Catanzaro 2017-12-06 04:13:20 UTC
Hm, actually there is a rule to make geary-version.vala. And it works perfectly fine when running 'cmake .' manually in the source directory. I think Builder might be doing something weird here...?
Comment 3 Michael Catanzaro 2017-12-06 04:36:52 UTC
(In reply to Michael Catanzaro from comment #2)
> Hm, actually there is a rule to make geary-version.vala. And it works
> perfectly fine when running 'cmake .' manually in the source directory. I
> think Builder might be doing something weird here...?

(For some value of "fine." CMake runs fine, but make stage is broken due to bug #791294.)
Comment 4 Christian Hergert 2018-01-11 05:40:44 UTC
Geary has 2 build systems in tree plus a wrapper to make it look like a 3rd. If you modify the JSON manifest, it works with Builder from git.

diff --git a/org.gnome.Geary.json b/org.gnome.Geary.json
index d1de0a42..32d9fbb1 100644
--- a/org.gnome.Geary.json
+++ b/org.gnome.Geary.json
@@ -110,6 +110,8 @@
         },
         {
             "name": "geary",
+            "buildsystem": "cmake",
+            "builddir": true,
             "sources": [
                 {
                     "type": "git",
Comment 5 Christian Hergert 2018-01-11 05:49:54 UTC
Alright, i was able to reproduce after doing a proper build, then forcing it back to using autotools (ie: the wrong build system), clearing my checkout, and doing a new checkout.

The loop is definitely caused by code-indexing trying to advance the pipeline to get build flags (which requires advancing to the CONFIGURE phase).
Comment 6 Christian Hergert 2018-01-11 06:02:51 UTC
Created attachment 366630 [details] [review]
autotools: check for AC_INIT() in configure

If we come across a file that looks like it might be autotools, first
check to see if it has AC_INIT() defined in the file. That way we aren't
fooled by wrapper scripts and dummy files.
Comment 7 Christian Hergert 2018-01-11 06:03:40 UTC
Comment on attachment 366630 [details] [review]
autotools: check for AC_INIT() in configure

Attachment 366630 [details] pushed as 9951e22 - autotools: check for AC_INIT() in configure
Comment 8 Christian Hergert 2018-01-11 07:41:46 UTC
Created attachment 366632 [details] [review]
code-index: delay builds until CONFIGURE is reached

We don't want to spam the system with build requests if we have not yet
advanced the build pipeline far enough. This can happen when the build
system is failed and cannot get past configure.
Comment 9 Christian Hergert 2018-01-11 07:43:05 UTC
Attachment 366632 [details] pushed as fef0e51 - code-index: delay builds until CONFIGURE is reached