GNOME Bugzilla – Bug 678971
Build failures caused by introspection
Last modified: 2012-07-06 16:52:54 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.
Created attachment 217387 [details] [review] Modernize introspection generation Use the m4 macro and makefile snippet provided in gobject-introspection directly.
+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?
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.
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.
Bug 617736 has an earlier patch, and some discussion.
*** Bug 617736 has been marked as a duplicate of this bug. ***
*** Bug 629491 has been marked as a duplicate of this bug. ***
*** Bug 678948 has been marked as a duplicate of this bug. ***
Duplicate of bug 678755 but not sure which patch to prefer.
(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.
+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.
Attachment 217387 [details] pushed as be9af3e - Modernize introspection generation
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?
Ooops, I didn't consider that, and indeed it's broken. New patch to fix it.
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.
Review of attachment 218087 [details] [review]: Thanks!
Attachment 218087 [details] pushed as a0be537 - Libview: fix first time introspection generation