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 664233 - introspection check in configure phase is broken
introspection check in configure phase is broken
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Backend: X11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-11-16 23:23 UTC by Andrés G. Aragoneses (IRC: knocte)
Modified: 2012-01-19 03:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrés G. Aragoneses (IRC: knocte) 2011-11-16 23:23:33 UTC
I just got the following while trying to autogen.sh in master:

gdk/Makefile.am:185: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
gtk/Makefile.am:1028: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL
autoreconf: automake failed with exit status: 1
*** Error during phase configure of gtk+: ########## Error running ./autogen.sh --prefix /home/andres121/opt/gnome --libdir '/home/andres121/opt/gnome/lib'  --with-gdktarget=broadway  *** [1/1]
Comment 1 Matthias Clasen 2011-11-19 19:06:02 UTC
AM_CONDITIONAL(HAVE_INTROSPECTION...

is part of the expansion of GOBJECT_INTROSPECTION_CHECK

maybe you don't have introspection.m4 where aclocal can find it ?
Comment 2 Andrés G. Aragoneses (IRC: knocte) 2011-11-30 13:02:40 UTC
(In reply to comment #1)
> AM_CONDITIONAL(HAVE_INTROSPECTION...
> 
> is part of the expansion of GOBJECT_INTROSPECTION_CHECK
> 
> maybe you don't have introspection.m4 where aclocal can find it ?

Wait a second, what appears to be happening is that the check for the introspection is not working. autogen.sh or configure should complain if gobject-introspection is not installed in the system, and right now it's not doing it, so then it's logical that introspection.m4 is not found (and not run), and then getting the error at compilation time.

I'll try to dig a bit more.
Comment 3 Andrés G. Aragoneses (IRC: knocte) 2011-11-30 13:06:26 UTC
Ok, this is the problem:

andres121@linux-nvjb:~/checkout/gnome64> grep GOBJECT_INTROSPECTION_CHECK -r ./gtk+/
./gtk+/autom4te.cache/output.0:GOBJECT_INTROSPECTION_CHECK(0.10.1)
./gtk+/autom4te.cache/output.1:GOBJECT_INTROSPECTION_CHECK(0.10.1)
./gtk+/autom4te.cache/output.2:GOBJECT_INTROSPECTION_CHECK(0.10.1)
./gtk+/configure.ac:GOBJECT_INTROSPECTION_CHECK(introspection_required_version)
./gtk+/configure:GOBJECT_INTROSPECTION_CHECK(0.10.1)

That is, introspection.m4 was somehow removed from the m4 subfolder, why??
Comment 4 Andrés G. Aragoneses (IRC: knocte) 2011-11-30 13:10:43 UTC
Looked at the log, and the removal was done to fix bug 652991. I've asked Javier for info.
Comment 5 Matthias Clasen 2011-11-30 13:33:39 UTC
You need gobject-introspection in your tree when running autogen.sh
Comment 6 Andrés G. Aragoneses (IRC: knocte) 2011-11-30 13:35:41 UTC
(In reply to comment #5)
> You need gobject-introspection in your tree when running autogen.sh

Where is that documented?

I'm using "jhbuild buildone glib gtk+".

If the above doesn't work or doesn't give a clear indication of what are the pre-requisites for it to build, YouAreDoingItWrongTM :)
Comment 7 Emmanuele Bassi (:ebassi) 2011-11-30 13:42:39 UTC
if you don't know the dependencies of gtk+, use:

  jhbuild build gtk+
Comment 8 Andrés G. Aragoneses (IRC: knocte) 2012-01-18 12:46:46 UTC
(In reply to comment #7)
> if you don't know the dependencies of gtk+, use:

Are we going backwards rather than forward? The configure phase exists so the developer can check quickly if he has met the build pre-requisites without being a core developer who knows what are the deps at all times.
Comment 9 Emmanuele Bassi (:ebassi) 2012-01-18 13:02:51 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > if you don't know the dependencies of gtk+, use:
> 
> Are we going backwards rather than forward? The configure phase exists so the
> developer can check quickly if he has met the build pre-requisites without
> being a core developer who knows what are the deps at all times.

this is a configure-time dependency: in order to generate the configure you *need* gobject-introspection installed — until such a time when g-i is moved inside glib itself.

it's the exact same role as having installed autotools and gtk-doc: you need those dependencies satisfied if you're building from scratch and not from a tarball.

if you're a developer *using* gtk+ you don't have to care: you can continue using tarballs, which will ship with a defined build environment.

if you're a developer *building* gtk+ then you should always know what dependencies gtk+ has, or gets, because that's your job.
Comment 10 Andrés G. Aragoneses (IRC: knocte) 2012-01-18 13:22:23 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > if you don't know the dependencies of gtk+, use:
> > 
> > Are we going backwards rather than forward? The configure phase exists so the
> > developer can check quickly if he has met the build pre-requisites without
> > being a core developer who knows what are the deps at all times.
> 
> this is a configure-time dependency: in order to generate the configure you
> *need* gobject-introspection installed — until such a time when g-i is moved
> inside glib itself.
> 
> it's the exact same role as having installed autotools and gtk-doc: you need
> those dependencies satisfied if you're building from scratch

Try building without autotools and gtk-doc: the error you get is developer-friendly, not like in this case.

> if you're a developer *using* gtk+ you don't have to care: you can continue
> using tarballs, which will ship with a defined build environment.
> 
> if you're a developer *building* gtk+ then you should always know what
> dependencies gtk+ has, or gets, because that's your job.

You may want to build gtk+ even if it's not your job: for instance, to get debug symbols, or to test something against last git master when you there are no daily tarballs generated.
Comment 11 Andrés G. Aragoneses (IRC: knocte) 2012-01-18 13:22:54 UTC
s/you there/there/
Comment 12 Colin Walters 2012-01-19 03:49:05 UTC
So introspection and gtk-doc are exactly the same here in that both install a .m4 file that the glib autogen.sh needs.

What's desired here?

1) A better error message out of autogen.sh
2) Be able to run autogen.sh without gobject-introspection

If it's just 1) that's pretty easy...we can check for g-ir-scanner I guess.

We could consider moving gobject-introspection.m4 into glib.  That way any project above glib can optionally use these (widely spread) addons without requiring them to be installed.

The problem is for gtk-doc you still need to call gtkdocize to symlink the makefile into your current directory.  Well, I guess introspection has the same thing,