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 654852 - doesn't build against master glib/gobject-introspection (cannot create 'Variant' instances)
doesn't build against master glib/gobject-introspection (cannot create 'Varia...
Status: RESOLVED FIXED
Product: caribou
Classification: Applications
Component: default
git master
Other Linux
: Normal major
: ---
Assigned To: caribou-maint
caribou-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-18 14:31 UTC by Dan Winship
Modified: 2011-09-15 12:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Winship 2011-07-18 14:31:39 UTC
Trying to build caribou against master glib and gobject-introspection gives this error:

  GEN    org.gnome.Caribou.Antler.service
../tools/make_schema.py caribou.settings.CaribouSettings
Traceback (most recent call last):
  • File "../tools/make_schema.py", line 81 in <module>
    maker.create_schemas()
  • File "../tools/make_schema.py", line 21 in create_schemas
    self._create_schema(self.settings, doc, schema)
  • File "../tools/make_schema.py", line 66 in _create_schema
    self._create_schema(s, doc, schemalist)
  • File "../tools/make_schema.py", line 66 in _create_schema
    self._create_schema(s, doc, schemalist)
  • File "../tools/make_schema.py", line 61 in _create_schema
    getattr(setting.gvariant, "print")(False)),
  • File "/home/danw/gshell/caribou/caribou/settings/setting_types.py", line 112 in gvariant
    return GLib.Variant(self.variant_type, self.value)
  • File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 181 in __new__
    (v, rest_format, _) = creator._create(format_string, [value])
  • File "/usr/lib64/python2.7/site-packages/gi/overrides/GLib.py", line 79 in _create
    v = constructor(args[0])
  • File "/usr/lib64/python2.7/site-packages/gi/types.py", line 68 in constructor
    return info.invoke(cls, *args)
TypeError: cannot create 'Variant' instances
make[2]: *** [org.gnome.caribou.gschema.xml.in] Error 1
make[2]: Leaving directory `/home/danw/gshell/caribou/data'



I believe the handling of GVariant changed recently in glib/g-i (bug 646635), so the code here probably needs to be updated for that. Or maybe an update is needed to pygobject? (Building caribou against master pygobject as well does not fix the error.)


To reproduce: install the gnome-shell jhbuild config (http://live.gnome.org/GnomeShell#building), then do "jhbuild buildone glib" "jhbuild buildone gobject-introspection" "jhbuild buildone caribou".

Workaround: when the build fails, type "3" to "Give up on module", then run "make" in caribou/data *from outside the jhbuild environment* (so it uses the system glib/g-i), then "jhbuild buildone -n caribou" to finish up the build.
Comment 1 Eitan Isaacson 2011-07-18 16:56:20 UTC
Can't figure out what alternative API is provided now that they took away g_variant_new, opened a bug for it, bug 654859.
Comment 2 Olav Vitters 2011-09-11 21:56:31 UTC
I'm getting the following error in Mageia Cauldron:

Traceback (most recent call last):
  • File "<string>", line 1 in <module>
  • File "/usr/lib/python2.7/site-packages/caribou/daemon/__init__.py", line 1 in <module>
    from main import CaribouDaemon
  • File "/usr/lib/python2.7/site-packages/caribou/daemon/main.py", line 3 in <module>
    from gi.repository import Gio
  • File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 23 in <module>
    from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))


this is due to the usage of pyatspi. It should use gobject introspection instead. API is quite different, and cannot port it myself.
Comment 3 Eitan Isaacson 2011-09-12 03:21:12 UTC
(In reply to comment #2)
> I'm getting the following error in Mageia Cauldron:
> 
> Traceback (most recent call last):
> 

This is not the same bug (different component, different problem). Maybe it would be more helpful if this was filed against pyatspi2?
Comment 4 Dan Winship 2011-09-15 12:32:51 UTC
this is fixed now