GNOME Bugzilla – Bug 693440
gcr fails after commit 7bdc0b on gobject-introspection
Last modified: 2019-02-22 11:59:11 UTC
Using gobject-introspection from master, I got this error trying to compile gcr: gcr-collection.c:120: Warning: Gcr: gcr_collection_get_objects: Unknown type: 'GLib.Object' gcr-collection.h:37: gcr-collection.h:63: Warning: Gcr: GLib.Object: Unknown type: 'GLib.Object' <unknown>:: Warning: Gcr: (Signal)added: context=Signal('added') GLib.Object: Unknown type: 'GLib.Object' gcr-collection.h:37: gcr-collection.h:63: Warning: Gcr: GLib.Object: Unknown type: 'GLib.Object' <unknown>:: Warning: Gcr: (Signal)removed: context=Signal('removed') GLib.Object: Unknown type: 'GLib.Object' gcr-collection.h:50: Warning: Gcr: GLib.Object: Unknown type: 'GLib.Object' Traceback (most recent call last): File "/opt/gnome3/bin/g-ir-scanner", line 46, in <module> sys.exit(scanner_main(sys.argv)) File "/opt/gnome3/lib64/gobject-introspection/giscanner/scannermain.py", line 460, in scanner_main final.validate() File "/opt/gnome3/lib64/gobject-introspection/giscanner/introspectablepass.py", line 36, in validate self._namespace.walk(self._analyze_node) File "/opt/gnome3/lib64/gobject-introspection/giscanner/ast.py", line 477, in walk node.walk(callback, []) File "/opt/gnome3/lib64/gobject-introspection/giscanner/ast.py", line 559, in walk self._walk(callback, chain) File "/opt/gnome3/lib64/gobject-introspection/giscanner/ast.py", line 1047, in _walk sig.walk(callback, chain) File "/opt/gnome3/lib64/gobject-introspection/giscanner/ast.py", line 554, in walk res = callback(self, chain) File "/opt/gnome3/lib64/gobject-introspection/giscanner/introspectablepass.py", line 185, in _analyze_node self._introspectable_param_analysis(obj, param) File "/opt/gnome3/lib64/gobject-introspection/giscanner/introspectablepass.py", line 82, in _introspectable_param_analysis "Unresolved type: %r" % (node.type.unresolved_string, )) File "/opt/gnome3/lib64/gobject-introspection/giscanner/ast.py", line 88, in unresolved_string assert False AssertionError make[4]: *** [Gcr-3.gir] Error 1 make[4]: Leaving directory `/home/devel/GNOME3/source/gcr/gcr' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/devel/GNOME3/source/gcr/gcr' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/devel/GNOME3/source/gcr/gcr' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/devel/GNOME3/source/gcr' make: *** [all] Error 2 *** Error during phase build of gcr: ########## Error running make -j16 V=1 *** [1/1] Using git bisect, the commit that seems to be causing this is the next one: commit 7bdc0b75872dcff2e154d05121568de54996a947 Author: Jasper St. Pierre <jstpierre@mecheye.net> Date: Sun Feb 3 08:54:16 2013 -0500 transformer: Ensure that types aren't resolved if we can't find them This ensures that things can't try to reference undefined/invalid types without emitting warnings, and that users need to include other GIRs at build time if they want to reference another type. https://bugzilla.gnome.org/show_bug.cgi?id=693098
Seems that the traceback made something wrong with the rest of the formatting of my message. So to be clear: Using git bisect the error started after this commit: commit 7bdc0b75872dcff2e154d05121568de54996a947 Author: Jasper St. Pierre <jstpierre@mecheye.net> Date: Sun Feb 3 08:54:16 2013 -0500 transformer: Ensure that types aren't resolved if we can't find them This ensures that things can't try to reference undefined/invalid types without emitting warnings, and that users need to include other GIRs at build time if they want to reference another type. https://bugzilla.gnome.org/show_bug.cgi?id=693098
From IRC (sorry for the mixed topics): <API_afk> Jasper, fwiw, I recently got this: <API_afk> https://bugzilla.gnome.org/show_bug.cgi?id=693440 <bebot> Bug 693440: normal, Normal, ---, gtkdev, UNCONFIRMED, gcr fails after commit 7bdc0b on gobject-introspection <Jasper> API_afk, ooh, we found a GCR bug! <API_afk> Jasper, well, what I mean <API_afk> if that it started after a commit on gobject-introspection <Jasper> That's very intentional. <API_afk> don't want to blame anyone, but using git bisect lead to you :P <Jasper> I didn't ever think we'd find something like that in the wild, because we compile to typelibs. <API_afk> just added a new comment <Jasper> But GLib/GObject/Gio is a special case I guess <Jasper> API_afk, it's a bug in GCR and I'll fix it, hold on <API_afk> Jasper, ah ok, as started after a gobject-introspection change I thought that was on that module <API_afk> sorry for the wrong module assignment <Jasper> API_afk, if gcc starts emitting new warnings that break your build it's not a bug in gcc <API_afk> well, not always <API_afk> today I also found this: <API_afk> https://bugzilla.gnome.org/show_bug.cgi?id=693412 <bebot> Bug 693412: normal, Normal, ---, vala-maint, UNCONFIRMED, Caribou doesn't compile due duplicate symbols on vala. <API_afk> and in that case I think that is a vala error <API_afk> but I can be wrong twice today <API_afk> everybody has bad days <Jasper> API_afk, no idea about vala, I am not a vala person <ricotz> API_afk, this was fixed <Jasper> API_afk, the issue with GCR is that it should be GObject.Object <Jasper> GLib doesn't have a thing called Object <ricotz> API_afk, just update the vala repo * tacg has quit (Ping timeout: 600 seconds) <API_afk> ricotz, ok thanks, and good to know that this time I got the proper module assigned <API_afk> ricotz, should I close that bug or just wait until some vala person closes it? <ricotz> API_afk, oh, i just saw the xml2.0 buffer problem, which is fixed * anish_ (~anish@219.91.209.235) has joined #gnome-shell <API_afk> ricotz, well, I'm right now compiling caribou, just in case <Jasper> API_afk, anyway, I can't find the module for gcr <ricotz> API_afk, the XA_STRING thing shouldnt happen either <API_afk> Jasper, so a basic jhbuild list gcr doesn't show anything? <Jasper> API_afk, I meant the bugzilla component <API_afk> fwiw, I got this error trying to compile gnome-shell (said the one asking at #gnome-shell channel) <API_afk> ah <API_afk> no idea <API_afk> andre is the bugzilla guy <API_afk> I don't see him connected * wlach (~wlach@modemcable064.24-130-66.mc.videotron.ca) has joined #gnome-shell <API_afk> Jasper: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-keyring <API_afk> Component gcr <Jasper> API_afk, can you reassign? <owen> Jasper: what happened to the -1, MAXSHORT - I thought you said that was correct? <API_afk> ok, I will add your comments on IRC to justify the change <API_afk> thanks So moving to gcr
Created attachment 235575 [details] [review] gcr-collection: Fix build with modern introspection GLib.Object is not a type that's available.
Review of attachment 235575 [details] [review]: Why do we only change these two lines? I see: $ git grep -F 'GLib.Object' gck/gck-misc.c: * @reflist: (element-type GLib.Object): list of Gobject referenc gck/gck-misc.c: * @reflist: (element-type GLib.Object): list of GObject referenc gck/gck-misc.c: * Return value: (transfer full) (element-type GLib.Object): the gcr/gcr-collection.c: * @object: (type GLib.Object): object that was gcr/gcr-collection.c: * @object: (type GLib.Object): object that was gcr/gcr-collection.c: * Returns: (transfer container) (element-type GLib.Object) ui/gcr-collection-model.c: * Returns: (transfer container) (element-type GLib.Ob ui/gcr-collection-model.c: * @selected: (element-type GLib.Object): a list of ob ui/gcr-list-selector.c: * Returns: (transfer container) (element-type GLib.Objec ui/gcr-list-selector.c: * @selected: (element-type GLib.Object): the list of obj ui/gcr-tree-selector.c: * Returns: (transfer container) (element-type GLib.Objec ui/gcr-tree-selector.c: * @selected: (element-type GLib.Object): The list of obj
Because I only grepped through gcr/ and changed what I saw in there. I didn't actually grep through gck/ or ui/. Feel free to do the replacement yourself.
Created attachment 235718 [details] [review] Use GObject.Object instead of GLib.Object in introspection annotations A gobject-introspection change broke the former.
Attachment 235718 [details] pushed as 0b88938 - Use GObject.Object instead of GLib.Object in introspection annotations