GNOME Bugzilla – Bug 739017
unable to build without a DISPLAY
Last modified: 2014-11-10 15:29:01 UTC
It seems that it is not possible to generate the GIR without a display. This is problematic for things like gnome-continuous and building from the command line on remote systems. If a display is set but not able to initialize clutter then /opt/gnome/bin/g-ir-scanner just hangs in waitpid while the subprocess hangs in glXQueryVersion. If the $DISPLAY is not set the process gives: Clutter-CRITICAL **: Unable to initialize Clutter: Unable to open display. You have to set the DISPLAY environment variable, or use the --display command line argument I asked walters about it and he mentioned bug 696457.
Created attachment 289144 [details] [review] build: Do not require DISPLAY to be set for introspection We can initialize Clutter (and thus Cogl) without opening a display connection.
Can't we use the defer display setup stuff? : https://git.gnome.org/browse/clutter/tree/clutter/clutter-main.c?h=clutter-1.20#n2037
the "defer display" is for the GOptionGroup API, which allows you to defer the initialization of Clutter until the post_parse callback of a GOptionContext. clutter_base_init() does not do much, these days, so I'm not entirely sure why it's even needed. you definitely don't need to call clutter_init() when generating Clutter's own introspection data; if I try to remove the initialization call to Clutter/GStreamer, I get this: process:18214): GLib-GObject-CRITICAL **: g_param_spec_boxed: assertion 'G_TYPE_IS_BOXED (boxed_type)' failed the only boxed GParamSpec is a ClutterGstVideoTexture:idle-material. I just tried, and remove the Clutter init, and apparently it's GStreamer that needs to be initialized at all.
Created attachment 289216 [details] [review] build: Do not initialize Clutter when generating introspection data Only GStreamer requires to be initialized.
Attachment 289216 [details] pushed as 8f7889a - build: Do not initialize Clutter when generating introspection data