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 678971 - Build failures caused by introspection
Build failures caused by introspection
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other All
: Normal blocker
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 617736 629491 678948 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-06-27 11:26 UTC by Giovanni Campagna
Modified: 2012-07-06 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modernize introspection generation (6.86 KB, patch)
2012-06-27 11:26 UTC, Giovanni Campagna
committed Details | Review
Libview: fix first time introspection generation (1.70 KB, patch)
2012-07-05 13:53 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-06-27 11:26:36 UTC
I've seen build failures because introspection building references
an unknown make variable, so I decided to rewrite the introspection
rules to follow what the other modules do.
Comment 1 Giovanni Campagna 2012-06-27 11:26:40 UTC
Created attachment 217387 [details] [review]
Modernize introspection generation

Use the m4 macro and makefile snippet provided in gobject-introspection
directly.
Comment 2 Christian Persch 2012-06-27 11:43:24 UTC
+if HAVE_INTROSPECTION
+
+-include $(INTROSPECTION_MAKEFILE)

If we do have introspection support, the include is needed, so remove the '-'.

Is there any diff between pre-patch generated girs and those generated with the patch?
Comment 3 Giovanni Campagna 2012-06-27 12:08:36 UTC
The - cannot be removed, or the include will be processed by automake

No significant diffs are present in the gir files, if you include a small fix to the patch for EvinceView. I can attach the updated version if needed.
Comment 4 Christian Persch 2012-06-27 12:35:36 UTC
I'd like to see the diff, yes.

Why is the automake thing a problem? We rely on the .m4 being present, so we can just as well rely on the Makefile.introspection being present, too.
Comment 5 Christian Persch 2012-06-27 12:42:50 UTC
Bug 617736 has an earlier patch, and some discussion.
Comment 6 Christian Persch 2012-06-27 12:43:08 UTC
*** Bug 617736 has been marked as a duplicate of this bug. ***
Comment 7 Christian Persch 2012-06-27 12:43:14 UTC
*** Bug 629491 has been marked as a duplicate of this bug. ***
Comment 8 Christian Persch 2012-06-27 12:43:23 UTC
*** Bug 678948 has been marked as a duplicate of this bug. ***
Comment 9 André Klapper 2012-06-27 12:59:49 UTC
Duplicate of bug 678755 but not sure which patch to prefer.
Comment 10 Giovanni Campagna 2012-06-27 14:17:10 UTC
(In reply to comment #4)
> I'd like to see the diff, yes.
> 
> Why is the automake thing a problem? We rely on the .m4 being present, so we
> can just as well rely on the Makefile.introspection being present, too.

--- EvinceView-3.0.gir	2012-06-27 14:04:51.030013345 +0200
+++ libview/EvinceView-3.0.gir	2012-06-27 14:07:33.436826561 +0200
@@ -18,11 +18,10 @@
   <include name="Pango" version="1.0"/>
   <include name="cairo" version="1.0"/>
   <include name="xlib" version="2.0"/>
-  <package name="evince-document-3.0"/>
   <package name="evince-view-3.0"/>
   <namespace name="EvinceView"
              version="3.0"
-             shared-library="libevdocument3.so.4,libevview3.so.3"
+             shared-library="libevview3.so.3"
              c:identifier-prefixes="Ev"
              c:symbol-prefixes="ev">
     <class name="DocumentModel"

The diff is right: symbols from EvinceView must come from libevview3.so.3, not libevdocument3.so.4, and the evince-document-3.0 pkg-config reference is implied by the GIR dependency on EvinceDocument.

The automake thing is not actually a problem. I don't know, it gave warnings in other projects. Bah, revised patch coming.

(In reply to comment #9)
> Duplicate of bug 678755 but not sure which patch to prefer.

The other patch is smaller, and probably safer for the 3.5.3 release. This one is more of a longer term cleanup.
Comment 11 Christian Persch 2012-06-29 10:16:01 UTC
+GOBJECT_INTROSPECTION_CHECK([1.0])

There is one problem with this macro: it is automagic. So I think you should do sth like this (copied from gucharmap):

# No automagic please!
if test -z "$enable_introspection"; then
  enable_introspection=no
fi

GOBJECT_INTROSPECTION_CHECK([1.0])

Although it may be time to set the default to 'yes' ... 

And let's also add --enable-introspection to DISTCHECK_CONFIGURE_FLAGS in the toplevel Makefile.am, so this problem doesn't recur.

With those fixed, ok to commit.
Comment 12 Giovanni Campagna 2012-06-29 18:06:47 UTC
Attachment 217387 [details] pushed as be9af3e - Modernize introspection generation
Comment 13 Christian Persch 2012-07-04 23:31:44 UTC
One important point in the old way to create the gir was that it set PKG_CONFIG_PATH=$(top_builddir):$$PKG_CONFIG_PATH so that the intra-project uninstalled EvinceDocument pc file was found. Have you checked that with this patch, gir generation of EvinceView gir still works if there's no EvinceDocument*.pc in the system pkg-config dirs installed?
Comment 14 Giovanni Campagna 2012-07-05 13:51:33 UTC
Ooops, I didn't consider that, and indeed it's broken.
New patch to fix it.
Comment 15 Giovanni Campagna 2012-07-05 13:53:24 UTC
Created attachment 218087 [details] [review]
Libview: fix first time introspection generation

Generating EvinceView was relying on an already installed
evince-document pkgconfig file. Fix it by looking at uninstalled
data.
Comment 16 Carlos Garcia Campos 2012-07-05 15:46:09 UTC
Review of attachment 218087 [details] [review]:

Thanks!
Comment 17 Giovanni Campagna 2012-07-06 16:52:49 UTC
Attachment 218087 [details] pushed as a0be537 - Libview: fix first time introspection generation