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 623889 - wrong gtk used by mutter gir scanner while building Shell gir leads to failure of build
wrong gtk used by mutter gir scanner while building Shell gir leads to failur...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: building
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-07-08 21:47 UTC by Alban Browaeys
Modified: 2010-07-09 20:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[configure] Check that mutter was compiled with GTK+-3.0 (1.21 KB, patch)
2010-07-09 13:44 UTC, Florian Müllner
reviewed Details | Review
[configure] Check that mutter was compiled with GTK+-3.0 (1.04 KB, patch)
2010-07-09 16:12 UTC, Florian Müllner
committed Details | Review

Description Alban Browaeys 2010-07-08 21:47:05 UTC
(mutter:15312): GLib-GObject-WARNING **: specified class size for type `ShellEmbeddedWindow' is smaller than the parent type's `GtkWindow' class size 
: GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
Invalid GType: 'shell_embedded_window_get_type'

Command '['mutter', '--mutter-plugins=/home/nuno/work/gnome-shell/source/gnome-shell/src/libgnome-shell.la', '--introspect-dump=/tmp/tmp-introspect_vP5yM/types.txt,/tmp/tmp-introspect_vP5yM/dump.xml']' returned non-zero exit status -11
make[3]: *** [Shell-0.1.gir] Error 1


this is while compiling gnome-shell against a set of gtk+-3 libs into /usr/local. All configured with defaults. 
I fixed this one by rebuilding mutter with ./configure --with-gtk=3.0 instead of the current 2.0 default. As the GtkWindowClass that this SellEmbeddedWindowClass inherit from are not the same this mismatch is detected and abort the build.

There needs some way to detect the version of gtk mutter was build against. This will fix this bug.
Comment 1 Florian Müllner 2010-07-09 13:44:36 UTC
Created attachment 165557 [details] [review]
[configure] Check that mutter was compiled with GTK+-3.0

If mutter was compiled with GTK+-2.0, the build will fail with a
rather cryptic message - better fail early during configure with
a proper error message.

This approach uses a javascript test to check the Gtk-version of the Meta-typelib - I think that's quite realistic. It should be possible to come up with a C test if this approach is too hackish.
Comment 2 Colin Walters 2010-07-09 14:47:43 UTC
Review of attachment 165557 [details] [review]:

::: configure.ac
@@ +168,3 @@
+  imports.gi.versions.Gtk = '3.0';
+cat >conftest.js <<_ACEOF
+AC_MSG_CHECKING([if mutter was compiled with GTK+-3.0])

Eeek.  "pkg-config --print-requires mutter-plugins | grep gtk+-3" makes more sense to me.
Comment 3 Florian Müllner 2010-07-09 15:00:11 UTC
(In reply to comment #2)
> Eeek.  "pkg-config --print-requires mutter-plugins | grep gtk+-3" makes more
> sense to me.

That would require a patch to mutter though ...
Comment 4 Colin Walters 2010-07-09 15:04:02 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Eeek.  "pkg-config --print-requires mutter-plugins | grep gtk+-3" makes more
> > sense to me.
> 
> That would require a patch to mutter though ...

Yes.  But the current mutter-plugins.pc file is wrong anyways; in reality you need gtk+ and clutter.
Comment 5 Florian Müllner 2010-07-09 16:12:53 UTC
Created attachment 165563 [details] [review]
[configure] Check that mutter was compiled with GTK+-3.0

What walters said, but using libmutter-private instead of mutter-plugins (as the former already has a gtk+ dependency).
Comment 6 Colin Walters 2010-07-09 16:15:24 UTC
Review of attachment 165563 [details] [review]:

::: configure.ac
@@ +156,3 @@
 AC_SUBST(mutter)
+if $PKG_CONFIG --print-requires libmutter-private | grep gtk+-3 >/dev/null; then
+AC_MSG_CHECKING([if mutter was compiled with GTK+-3.0])

I personally prefer grep -q over redirecting to /dev/null, but either way fine by me.
Comment 7 Florian Müllner 2010-07-09 16:32:19 UTC
Attachment 165563 [details] pushed as d9eb470 - [configure] Check that mutter was compiled with GTK+-3.0

OK (grep -q keeps the line length under 80 characters, so I changed that before pushing ;) )
Comment 8 Owen Taylor 2010-07-09 17:16:20 UTC
The autoconf manual actually says:

     Some of the options required by Posix are not portable in practice.
     Don't use `grep -q' to suppress output, because many `grep'
     implementations (e.g., Solaris) do not support `-q'.

No idea if that applies to versions of Solaris from this millenium.
Comment 9 Florian Müllner 2010-07-09 17:53:19 UTC
(In reply to comment #8)
> The autoconf manual actually says:
> 
>      Some of the options required by Posix are not portable in practice.
>      Don't use `grep -q' to suppress output, because many `grep'
>      implementations (e.g., Solaris) do not support `-q'.
> 
> No idea if that applies to versions of Solaris from this millenium.

Apparently[0] yes. Should I update the patch?



[0] http://docs.sun.com/app/docs/doc/816-5165/grep-1?a=view
Comment 10 Owen Taylor 2010-07-09 18:04:02 UTC
I'd say just fix it quickly, since we're thinking about it now and have done the research, and it might get cut-and-pasted somewhere else if we don't change it.
Comment 11 asubedi 2010-07-09 20:06:54 UTC
I am using Ubuntu Lucid and I get the following error:

checking if mutter was compiled with GTK+-3.0... --print-requires: unknown option

This causes the building of gnome-shell to fail. 

I also removed this check from configure.ac. It still complains about g_varaint_new_bytestring.
Comment 12 Florian Müllner 2010-07-09 20:31:13 UTC
(In reply to comment #11)
> checking if mutter was compiled with GTK+-3.0... --print-requires: unknown
> option

Yeah, sorry - this assumed a more recent version of pkg-config. It's fixed in master.

> I also removed this check from configure.ac. It still complains about
> g_varaint_new_bytestring.

That's bug 623952 - no idea what's happening there though :(