GNOME Bugzilla – Bug 723438
jhbuild buildone glib gtk+ fails with `HAVE_INTROSPECTION does not appear in AM_CONDITIONAL`
Last modified: 2014-03-02 08:55:15 UTC
log: ... autoreconf: running: automake --add-missing --copy --force-missing configure.ac:141: installing 'build-aux/compile' configure.ac:32: installing 'build-aux/config.guess' configure.ac:32: installing 'build-aux/config.sub' configure.ac:68: installing 'build-aux/install-sh' configure.ac:68: installing 'build-aux/missing' demos/gtk-demo/Makefile.am: installing 'build-aux/depcomp' gdk/Makefile.am:194: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL gtk/Makefile.am:1324: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL gtk/Makefile.am:558: warning: source file 'deprecated/gtkactivatable.c' is in a subdirectory, gtk/Makefile.am:558: but option 'subdir-objects' is disabled ... autoreconf: automake failed with exit status: 1 *** Error during phase configure of gtk+: ########## Error running ./autogen.sh --prefix /home/knocte/jhbuild/install --libdir '/home/knocte/jhbuild/install/lib64' --enable-x11-backend --enable-wayland-backend --enable-broadway-backend --enable-installed-tests --disable-static --disable-gtk-doc *** [2/2] [1] Rerun phase configure ... Patch coming...
Created attachment 267811 [details] [review] Proposed patch Inspired on anjuta developer's approach for bgo #622526: https://git.gnome.org/browse/anjuta/commit/?id=ec82284
Review of attachment 267811 [details] [review]: I don't like this approach -- gobject-introspection should be a hard dependency of autogen-ing gtk. I'd much rather a pkg-config check in autogen.sh that gives a more descriptive error message in case we can't find gobject-introspection.
Ok thanks for the review. I'll paste the chat log here (so I don't forget) and I'll cook a new patch soon. 16:39 <knocte> mclasen: hey, you mind reviewing https://bugzilla.gnome.org/show_bug.cgi?id=723438 ? 16:40 <mclasen> knocte: not super-happy with that 16:40 <mclasen> I'll let desrt take that on 17:01 <desrt> mclasen: introspection issues in gtk pop up and you think about me? :) 17:01 <mclasen> the bug has a patch for glib configure.ac, I thought ? 17:01 <mclasen> I may be misremembering 17:01 <desrt> glib doesn't depend on introspection... 17:01 <desrt> if you want my 2¢, though, i don't like the patch 17:01 <desrt> introspection should be a hard dependency of gtk-from-git 17:02 <desrt> even if you disable it for the build, it should be required for bootstrapping 17:02 <knocte> desrt, mclasen: then should I change it to give an error instead of assigning false to HAVE_INTROSPECTION? 17:03 <desrt> afaik there is absolutely no reason not to build it other than wanting to save some time.... and you don't save much time because it's not that big... 17:03 <desrt> knocte: this is a check for building from tarballs 17:03 <desrt> and/or if you want to disable the introspection during the build 17:03 <mclasen> same feeling here 17:03 <desrt> the issue is that you need an m4 sniplet in order for this check to work in the first place... and that's why you need introspection around at autogen time 17:04 <desrt> some projects get around this by putting the introspection m4 in their own version control but i don't like that much either 17:04 <desrt> so +1 vote for wontfix from me.... :/ 17:04 <knocte> then why not simply fail with an AC_MSG_ERR() saying "introspection required cause introspection.m4 is needed" 17:05 <desrt> knocte: because that would be an error message if ./configure failed 17:05 <knocte> wontfix? so a person that just wants to build gtk+ from jhbuild will get that error always? 17:05 <desrt> it's autogen here that's failing 17:05 <desrt> knocte: a patch to improve the output of autogen failing with a more helpful error message would indeed be welcome 17:05 <amigadave> gnome-autogen.sh has some macro checks, so that autogen.sh will fail, rather than getting a cryptic error from configure or automake 17:05 <desrt> maybe talk to walters about what he thinks would be best for that... 17:06 <desrt> amigadave: good to know.... 17:06 <amigadave> e.g. https://git.gnome.org/browse/gnome-common/tree/macros2/gnome-autogen.sh#n277 17:06 <knocte> so then the patch should go to gnome-common? 17:06 <amigadave> glib doesn't use gnome-common :-) 17:06 <amigadave> and shouldn't, i think 17:06 <desrt> amigadave: also doesn't seem to mention introspection here... :) 17:06 <amigadave> ooh, a feature request! 17:07 <desrt> knocte: so i'd suggest some sort of check in autogen.sh for gobject-introspection's pkg-config. if that fails, a helpful message about "gobject-introspection is a requirement to autogen gtk..." would help 17:08 <desrt> along with a descriptive git log message (or even comment in the file) about what we've just been discussing.... 17:08 <knocte> desrt: so, a PKG_CHECK_MODULES? 17:08 <desrt> knocte: that's auto-fu 17:09 <desrt> autogen.sh is just a shellscript 17:09 <knocte> oh right 17:09 <desrt> so more like if pkg-config --exists ... 17:09 <knocte> then just a `pkg-config` call 17:09 <knocte> ok, and in what autogen.sh? gnome-common or gtk? 17:09 <desrt> both :) 17:09 <knocte> wat 17:09 <amigadave> yeah, i would happily accept a gnome-common patch 17:09 <desrt> to solve your immediate issue, gtk 17:10 <desrt> but amigadave wants a gnome-common patch to do the same, now that you raise the issue :) 17:10 <knocte> ok fair enough 17:10 <knocte> thanks guyus 17:10 <knocte> guys* 17:10 <desrt> (although for that case you would want to conditionalise it on the module actually using introspection.... in gtk's case we know in advance)
Created attachment 269809 [details] [review] Proposed patch v2 Addressed comments above, now the approach is checking in autogen.sh
Oh, ccing previous reviewer. See comment#4 please. Thanks.
Review of attachment 269809 [details] [review]: ::: autogen.sh @@ +29,3 @@ +fi + +pkg-config --print-errors gobject-introspection-1.0 Probably want to use $PKGCONFIG here ?
Review of attachment 269809 [details] [review]: ::: autogen.sh @@ +24,3 @@ +PKGCONFIG=`which pkg-config` +if test -z $PKGCONFIG; then I'd quote this just in case you are in some bizarro universe where the user has a space in the $PATH @@ +29,3 @@ +fi + +pkg-config --print-errors gobject-introspection-1.0 Would be exactly the same either way, considering he just used which... ...unless the space-in-path case, in which case $PKGCONFIG would break, but (quoted) $PKGCONFIG would be okay -- but when just plain pkg-config would always work fine.
Created attachment 270662 [details] [review] Proposed patch v3 (In reply to comment #6) > Review of attachment 269809 [details] [review]: > > ::: autogen.sh > @@ +29,3 @@ > +fi > + > +pkg-config --print-errors gobject-introspection-1.0 > > Probably want to use $PKGCONFIG here ? If which worked, then calling pkg-config should work too. Also see Ryan comment: "but when just plain pkg-config would always work fine". (In reply to comment #7) > Review of attachment 269809 [details] [review]: > > ::: autogen.sh > @@ +24,3 @@ > > +PKGCONFIG=`which pkg-config` > +if test -z $PKGCONFIG; then > > I'd quote this just in case you are in some bizarro universe where the user has > a space in the $PATH Done. > @@ +29,3 @@ > +fi > + > +pkg-config --print-errors gobject-introspection-1.0 > > Would be exactly the same either way, considering he just used which... > > ...unless the space-in-path case, in which case $PKGCONFIG would break, but > (quoted) $PKGCONFIG would be okay -- but when just plain pkg-config would > always work fine. Left plain 'pkg-config'.
Review of attachment 270662 [details] [review]: Looks fine. Thanks!
Thanks! pushed