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 739017 - unable to build without a DISPLAY
unable to build without a DISPLAY
Status: RESOLVED FIXED
Product: clutter-gst
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-22 15:47 UTC by William Jon McCann
Modified: 2014-11-10 15:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Do not require DISPLAY to be set for introspection (1.03 KB, patch)
2014-10-22 15:55 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
build: Do not initialize Clutter when generating introspection data (1012 bytes, patch)
2014-10-23 17:29 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description William Jon McCann 2014-10-22 15:47:21 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.
Comment 1 Emmanuele Bassi (:ebassi) 2014-10-22 15:55:20 UTC
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.
Comment 2 Lionel Landwerlin 2014-10-23 17:18:15 UTC
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
Comment 3 Emmanuele Bassi (:ebassi) 2014-10-23 17:28:38 UTC
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.
Comment 4 Emmanuele Bassi (:ebassi) 2014-10-23 17:29:20 UTC
Created attachment 289216 [details] [review]
build: Do not initialize Clutter when generating introspection data

Only GStreamer requires to be initialized.
Comment 5 Emmanuele Bassi (:ebassi) 2014-11-10 15:28:45 UTC
Attachment 289216 [details] pushed as 8f7889a - build: Do not initialize Clutter when generating introspection data