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 705497 - make gnome-shell build two binaries
make gnome-shell build two binaries
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
wayland
Depends on: 705513
Blocks:
 
 
Reported: 2013-08-05 11:53 UTC by Matthias Clasen
Modified: 2013-08-27 07:46 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
MetaShapedTexture: don't include private headers in public ones (6.44 KB, patch)
2013-08-16 15:49 UTC, Giovanni Campagna
committed Details | Review
build: make wayland support unconditional (5.22 KB, patch)
2013-08-16 15:49 UTC, Giovanni Campagna
committed Details | Review
Remove HAVE_WAYLAND ifdefs (15.82 KB, patch)
2013-08-16 15:49 UTC, Giovanni Campagna
committed Details | Review
Remove files no one cares about anymore (3.40 KB, patch)
2013-08-16 15:50 UTC, Giovanni Campagna
committed Details | Review
wayland: make parallel installable with regular mutter (9.82 KB, patch)
2013-08-16 15:50 UTC, Giovanni Campagna
committed Details | Review
Remove the jhbuild wrapper script (9.37 KB, patch)
2013-08-16 15:51 UTC, Giovanni Campagna
committed Details | Review
Implementing building two separate binaries for x11 and wayland (10.85 KB, patch)
2013-08-16 15:51 UTC, Giovanni Campagna
reviewed Details | Review
Implementing building two separate binaries for x11 and wayland (12.82 KB, patch)
2013-08-19 16:36 UTC, Giovanni Campagna
accepted-commit_now Details | Review
Implementing building two separate binaries for x11 and wayland (12.81 KB, patch)
2013-08-21 16:13 UTC, Giovanni Campagna
committed Details | Review

Description Matthias Clasen 2013-08-05 11:53:37 UTC
For 3.10, we want to build two gnome-shell binaries, one linked against libmutter.so and on elinked against libmutter-wayland.so
Comment 1 Giovanni Campagna 2013-08-16 15:49:48 UTC
Created attachment 251898 [details] [review]
MetaShapedTexture: don't include private headers in public ones

Private headers are not installed, so they can't be referenced
from public ones.
Comment 2 Giovanni Campagna 2013-08-16 15:49:52 UTC
Created attachment 251899 [details] [review]
build: make wayland support unconditional

In the wayland branch of mutter, we want to build a wayland version
of the mutter libraries, and that's much easier if we just build
wayland support unconditionally.
The define is kept to avoid a huge diff, but should be removed
in a later patch.
Also, wayland support can still be disable at runtime, by
launching mutter without the --nested switch.
Comment 3 Giovanni Campagna 2013-08-16 15:49:56 UTC
Created attachment 251900 [details] [review]
Remove HAVE_WAYLAND ifdefs

Wayland support is always enabled now.
Comment 4 Giovanni Campagna 2013-08-16 15:50:01 UTC
Created attachment 251901 [details] [review]
Remove files no one cares about anymore

mutter-plugins.pc has been replaced by libmutter.pc, and the
wm properties in the control center are long gone.
Comment 5 Giovanni Campagna 2013-08-16 15:50:06 UTC
Created attachment 251902 [details] [review]
wayland: make parallel installable with regular mutter

Modify all visible instances of mutter with mutter-wayland
(libraries, folders, pkgconfig, etc.), so that the wayland
branch can be installed alongside the usual X11 mutter.
Comment 6 Giovanni Campagna 2013-08-16 15:51:13 UTC
Created attachment 251903 [details] [review]
Remove the jhbuild wrapper script

It's mostly equivalent to "jhbuild run gnome-shell", which is
the preferred way. Also, running from the source tree can't be
supported at this point, and the wrapper is getting in the way
of having two binaries, one for wayland and one for X11.
Comment 7 Giovanni Campagna 2013-08-16 15:51:17 UTC
Created attachment 251904 [details] [review]
Implementing building two separate binaries for x11 and wayland

Build gnome-shell for x11, and gnome-shell-wayland for wayland
(as well as the associated libgnome-shell and libgnome-shell-wayland).
The first one links to libmutter, the second to libmutter-wayland
Comment 8 Matthias Clasen 2013-08-18 21:03:36 UTC
Review of attachment 251898 [details] [review]:

looks fine to me
Comment 9 Matthias Clasen 2013-08-18 21:04:54 UTC
Review of attachment 251899 [details] [review]:

Will this make the eventual merging harder ? I guess that depends which way we'll go in the end. Anyway, looks fine for the branch
Comment 10 Matthias Clasen 2013-08-18 21:10:04 UTC
Review of attachment 251899 [details] [review]:

Will this make the eventual merging harder ? I guess that depends which way we'll go in the end. Anyway, looks fine for the branch
Comment 11 Matthias Clasen 2013-08-18 21:11:42 UTC
Review of attachment 251900 [details] [review]:

same caveat as before - may make the merge harder. But sure, looks fine for the branch
Comment 12 Matthias Clasen 2013-08-18 21:25:04 UTC
Review of attachment 251901 [details] [review]:

sure
Comment 13 Matthias Clasen 2013-08-18 21:30:20 UTC
Review of attachment 251902 [details] [review]:

::: configure.ac
@@ +39,3 @@
 AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
 
+GETTEXT_PACKAGE=mutter-wayland

This will have the unfortunate side-effect of making translators translate the same stuff twice. Not sure we can do much else, though.

::: src/Makefile.am
@@ +227,3 @@
 	$(libmutterinclude_extra_headers)
 
+bin_PROGRAMS=mutter-wayland

Do we actually need this binary anymore

::: src/wayland/meta-wayland-stage.c
@@ -137,3 @@
 
-  filename = g_build_filename (MUTTER_DATADIR,
-                               "mutter/cursors/left_ptr.png",

Do we actually install this file ? I don't see /usr/share/mutter/cursors on my system...
Comment 14 Matthias Clasen 2013-08-18 21:31:35 UTC
Review of attachment 251903 [details] [review]:

this is a gnome-shell patch. Looks ok to me though
Comment 15 Matthias Clasen 2013-08-18 21:31:56 UTC
Review of attachment 251903 [details] [review]:

.
Comment 16 Giovanni Campagna 2013-08-18 21:32:50 UTC
(In reply to comment #13)
> Review of attachment 251902 [details] [review]:
> 
> ::: src/Makefile.am
> @@ +227,3 @@
>      $(libmutterinclude_extra_headers)
> 
> +bin_PROGRAMS=mutter-wayland
> 
> Do we actually need this binary anymore

It's useful to test stuff nested, which is good when hacking on the lower level parts of mutter.

> ::: src/wayland/meta-wayland-stage.c
> @@ -137,3 @@
> 
> -  filename = g_build_filename (MUTTER_DATADIR,
> -                               "mutter/cursors/left_ptr.png",
> 
> Do we actually install this file ? I don't see /usr/share/mutter/cursors on my
> system...

It's only there in the wayland branch.
Comment 17 Matthias Clasen 2013-08-18 21:51:59 UTC
Review of attachment 251904 [details] [review]:

The commit message should also mention that libgnome-shell-menu is broken out.

::: js/ui/main.js
@@ +102,3 @@
+    if (!Meta.is_wayland_compositor)
+        Meta.is_wayland_compositor = function () { return false; };
+

I don't know enough js to know what this does. How will Meta.is_wayland_compositor ever be defined when we get here ? Is this something that mutter exports ? If so, why do you need to replace it with a function ?

::: src/main.c
@@ +389,3 @@
   ctx = meta_get_option_context ();
   g_option_context_add_main_entries (ctx, gnome_shell_options, GETTEXT_PACKAGE);
+  g_option_context_add_group (ctx, g_irepository_get_option_group ());

Is this needed for Shell_0_1_gir_PROGRAM ? This should probably be mentioned in the commit message.
Comment 18 Giovanni Campagna 2013-08-19 08:25:26 UTC
(In reply to comment #10)
> Review of attachment 251899 [details] [review]:
> 
> Will this make the eventual merging harder ? I guess that depends which way
> we'll go in the end. Anyway, looks fine for the branch

I think that if we merge, it will be after we decide to go with wayland by default for gnome in general, at which point having a compile dependency on it should not be a problem.
Comment 19 Giovanni Campagna 2013-08-19 16:36:53 UTC
Created attachment 252262 [details] [review]
Implementing building two separate binaries for x11 and wayland

Build gnome-shell for x11, and gnome-shell-wayland for wayland
(as well as the associated libgnome-shell and libgnome-shell-wayland).
The first one links to libmutter, the second to libmutter-wayland.

libgnome-shell and libgnome-shell-wayland are now compiled from
libgnome-shell-base (with all sources that are independent of mutter),
libgnome-shell-menu (with the copy-pasted gtk sources), plus the
sources that use mutter API
Comment 20 Giovanni Campagna 2013-08-19 16:41:19 UTC
(In reply to comment #17)
> Review of attachment 251904 [details] [review]:
> 
> The commit message should also mention that libgnome-shell-menu is broken out.
> 
> ::: js/ui/main.js
> @@ +102,3 @@
> +    if (!Meta.is_wayland_compositor)
> +        Meta.is_wayland_compositor = function () { return false; };
> +
> 
> I don't know enough js to know what this does. How will
> Meta.is_wayland_compositor ever be defined when we get here ? Is this something
> that mutter exports ? If so, why do you need to replace it with a function ?

If we're in the wayland branch, meta_is_wayland_compositor() is part of the mutter API, and thus accessing Meta.is_wayland_compositor gives the JS wrapper around the C function.
On master, OTOH, the mutter API does not include wayland simbol, so Meta.is_wayland_compositor is undefined. To be able to call it unconditionally, we replace with a JS function that returns false, so that we then follow the non-wayland paths (like we would do with the wayland branch run as an x11 compositor)
Comment 21 Matthias Clasen 2013-08-20 11:29:38 UTC
Review of attachment 251903 [details] [review]:

.
Comment 22 Matthias Clasen 2013-08-20 11:30:46 UTC
Review of attachment 252262 [details] [review]:

Ah, ok. That makes sense
Comment 23 Giovanni Campagna 2013-08-21 08:36:49 UTC
The last patch has a problem: I'm getting symbolc conflicts caused by gtk_action_muxer_get_type (in libgnome-shell-menu.a).

The same does not happen on the x11 version though...
Comment 24 Giovanni Campagna 2013-08-21 16:13:44 UTC
Created attachment 252622 [details] [review]
Implementing building two separate binaries for x11 and wayland

Build gnome-shell for x11, and gnome-shell-wayland for wayland
(as well as the associated libgnome-shell and libgnome-shell-wayland).
The first one links to libmutter, the second to libmutter-wayland.

libgnome-shell and libgnome-shell-wayland are now compiled from
libgnome-shell-base (with all sources that are independent of mutter),
libgnome-shell-menu (with the copy-pasted gtk sources), plus the
sources that use mutter API

I forgot to attach the new patch, the symbol conflicts were caused
by the different lookup rules between -export-dynamic on the process
binary and internal binding of the static library, and were solved
by making libgnome-shell-menu shared again.
Comment 25 Matthias Clasen 2013-08-26 22:36:27 UTC
Review of attachment 252622 [details] [review]:

looks good to me
Comment 26 Matthias Clasen 2013-08-26 22:38:06 UTC
Review of attachment 251902 [details] [review]:

my questions were answered in a later comment, so
Comment 27 Giovanni Campagna 2013-08-27 07:45:17 UTC
Attachment 251898 [details] pushed as 1617323 - MetaShapedTexture: don't include private headers in public ones
Attachment 251899 [details] pushed as 91cdfab - build: make wayland support unconditional
Attachment 251900 [details] pushed as bd3d5df - Remove HAVE_WAYLAND ifdefs
Attachment 251901 [details] pushed as 542a088 - Remove files no one cares about anymore
Attachment 251902 [details] pushed as ea3d2b4 - wayland: make parallel installable with regular mutter
Comment 28 Giovanni Campagna 2013-08-27 07:46:45 UTC
Attachment 251903 [details] pushed as 254efdd - Remove the jhbuild wrapper script
Attachment 252622 [details] pushed as 21a8583 - Implementing building two separate binaries for x11 and wayland