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 729490 - [regression] Can't turn off wayland
[regression] Can't turn off wayland
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.13.x
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
: 728185 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-05-04 04:26 UTC by David Ronis
Modified: 2014-09-22 17:54 UTC
See Also:
GNOME target: 3.14
GNOME version: ---


Attachments
The extra patch I use to get the above result (547 bytes, patch)
2014-08-27 15:58 UTC, Ting-Wei Lan
none Details | Review

Description David Ronis 2014-05-04 04:26:24 UTC
I'm trying to  build 3.13.1 on a slackware/linux box as part of a full gnome update.  I don't have wayland installed and need to build mutter in order to have libmutter which is needed for gnome-shell.  As far as I can tell mutter's configure doesn't recognize --without-wayland etc..
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-05-04 15:27:35 UTC
Yeah, this will be fixed before the end of the 3.14 cycle. Right now we're focused on getting Wayland working, and then we'll clean it up and make it optional. It would be too much of a mess otherwise.
Comment 2 David Ronis 2014-05-04 17:14:29 UTC
It's not just a mutter issue.  gnome-shell 3.13.1 has libmutter >= 3.13.1; gnome-terminal depends on gnome-shell,  etc.   In short,  GNOME breaks.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-05-06 02:16:29 UTC
Use GNOME 3.12 for now. Stuff will be broken for a bit. Although gnome-terminal should not depend on gnome-shell. That seems suspect.
Comment 4 drago01 2014-05-06 12:16:08 UTC
(In reply to comment #3)
> Use GNOME 3.12 for now. Stuff will be broken for a bit. Although gnome-terminal
> should not depend on gnome-shell. That seems suspect.

That's probably because of the search provider.
Comment 5 André Klapper 2014-08-12 16:20:24 UTC
David: Have you tried building a more recent version lately and is this still a problem?
Comment 6 Ting-Wei Lan 2014-08-12 16:33:30 UTC
gnome-terminal does not need the latest gnome-shell. Using gnome-shell 3.12 can also make gnome-terminal successfully built.
Comment 7 David Ronis 2014-08-12 17:55:02 UTC
(In reply to comment #5)
> David: Have you tried building a more recent version lately and is this still a
> problem?

I just tried building the git/master.  I generate configure properly, but when I configure I get:

checking for gobject-introspection... yes
checking for wayland-scanner... no
configure: error: Could not find wayland-scanner in your PATH
else
  required for parsing wayland extension protocols
Comment 8 Matthias Clasen 2014-08-26 23:15:55 UTC
Jasper pushed a fix for the wayland-scanner check
Comment 9 Ting-Wei Lan 2014-08-27 04:46:47 UTC
libinput is only available for Linux, so mutter is still broken on FreeBSD.
Comment 10 Ting-Wei Lan 2014-08-27 04:59:30 UTC
#include <gbm.h> is used in sources, but configure.ac does not check for it.
Comment 11 Matthias Clasen 2014-08-27 13:16:37 UTC
It might be best to open individual bugs for these issues, that makes it easier to track whats fixed
Comment 12 Ting-Wei Lan 2014-08-27 14:37:11 UTC
*** Bug 728185 has been marked as a duplicate of this bug. ***
Comment 13 Jasper St. Pierre (not reading bugmail) 2014-08-27 14:40:00 UTC
I pushed another update this morning. Does it work now?
Comment 14 Ting-Wei Lan 2014-08-27 15:56:12 UTC
No, it does not work.


gmake[4]: Entering directory `/home/lantw44/gnome/source/mutter/src'
  CC       backends/meta-cursor.lo
backends/meta-cursor.c:59:14: error: no member named 'bo' in 'MetaCursorImage'
  if (image->bo)
      ~~~~~  ^
backends/meta-cursor.c:60:5: warning: implicit declaration of function 'gbm_bo_destroy' is invalid in C99 [-Wimplicit-function-declaration]
    gbm_bo_destroy (image->bo);
    ^
backends/meta-cursor.c:60:28: error: no member named 'bo' in 'MetaCursorImage'
    gbm_bo_destroy (image->bo);
                    ~~~~~  ^
backends/meta-cursor.c:143:43: warning: declaration of 'struct gbm_device' will not be visible outside of this function [-Wvisibility]
meta_cursor_image_load_gbm_buffer (struct gbm_device *gbm,
                                          ^
backends/meta-cursor.c:157:7: warning: implicit declaration of function 'gbm_device_is_format_supported' is invalid in C99 [-Wimplicit-function-declaration]
  if (gbm_device_is_format_supported (gbm, gbm_format,
      ^
backends/meta-cursor.c:158:39: error: use of undeclared identifier 'GBM_BO_USE_CURSOR_64X64'
                                      GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE))
                                      ^
backends/meta-cursor.c:158:65: error: use of undeclared identifier 'GBM_BO_USE_WRITE'
                                      GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE))
                                                                ^
backends/meta-cursor.c:163:14: error: no member named 'bo' in 'MetaCursorImage'
      image->bo = gbm_bo_create (gbm, 64, 64,
      ~~~~~  ^
backends/meta-cursor.c:163:19: warning: implicit declaration of function 'gbm_bo_create' is invalid in C99 [-Wimplicit-function-declaration]
      image->bo = gbm_bo_create (gbm, 64, 64,
                  ^
backends/meta-cursor.c:164:46: error: use of undeclared identifier 'GBM_BO_USE_CURSOR_64X64'
                                 gbm_format, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE);
                                             ^
backends/meta-cursor.c:164:72: error: use of undeclared identifier 'GBM_BO_USE_WRITE'
                                 gbm_format, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE);
                                                                       ^
backends/meta-cursor.c:170:7: warning: implicit declaration of function 'gbm_bo_write' is invalid in C99 [-Wimplicit-function-declaration]
      gbm_bo_write (image->bo, buf, 64 * 64 * 4);
      ^
backends/meta-cursor.c:170:28: error: no member named 'bo' in 'MetaCursorImage'
      gbm_bo_write (image->bo, buf, 64 * 64 * 4);
                    ~~~~~  ^
backends/meta-cursor.c:205:16: error: use of undeclared identifier 'GBM_FORMAT_ARGB8888'
  gbm_format = GBM_FORMAT_ARGB8888;
               ^
backends/meta-cursor.c:226:40: warning: incompatible pointer types passing 'struct gbm_device *' to parameter of type 'struct gbm_device *'
      [-Wincompatible-pointer-types]
    meta_cursor_image_load_gbm_buffer (gbm,
                                       ^~~
backends/meta-cursor.c:143:55: note: passing argument to parameter 'gbm' here
meta_cursor_image_load_gbm_buffer (struct gbm_device *gbm,
                                                      ^
6 warnings and 9 errors generated.
gmake[4]: *** [backends/meta-cursor.lo] Error 1
Comment 15 Ting-Wei Lan 2014-08-27 15:58:10 UTC
Created attachment 284619 [details] [review]
The extra patch I use to get the above result
Comment 16 Ting-Wei Lan 2014-08-27 16:02:35 UTC
I get gbm-10.2.4 installed from experimental ports now.
Comment 17 Jasper St. Pierre (not reading bugmail) 2014-08-27 16:03:05 UTC
Yeah, I'd just recommend building with gbm enabled. Is that acceptable to you?
Comment 18 Ting-Wei Lan 2014-08-27 16:14:49 UTC
gbm is OK although the ports are untested and gbm does not exist in the official FreeBSD ports.
Comment 19 Jasper St. Pierre (not reading bugmail) 2014-08-27 16:18:36 UTC
Removing gbm is going to be a bit difficult until we can rewrite our cursor system. Hopefully this is acceptable for now.
Comment 20 Ting-Wei Lan 2014-08-27 16:33:13 UTC
After patching the first error, I get another error:

diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index b52a85b..586bdc1 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -82,7 +82,9 @@
 
 #include "backends/x11/meta-backend-x11.h"
 
+#ifdef HAVE_WAYLAND
 #include "wayland/meta-wayland-private.h"
+#endif
 
 static gboolean
 is_modal (MetaDisplay *display)



gmake[4]: Entering directory `/home/lantw44/gnome/source/mutter/src'
  CC       compositor/meta-window-actor.lo
In file included from compositor/meta-window-actor.c:40:
./wayland/meta-wayland-surface.h:23:10: fatal error: 'wayland-server.h' file not found
#include <wayland-server.h>
         ^
1 error generated.
gmake[4]: *** [compositor/meta-window-actor.lo] Error 1
Comment 21 David Ronis 2014-08-27 16:53:57 UTC
I think that it's still broken.

I just tried building the git/master.   It fails with:

   CC       compositor/meta-shaped-texture.lo
In file included from compositor/compositor.c:85:0:
./wayland/meta-wayland-private.h:23:28: fatal error: wayland-server.h: No such file or directory
 #include <wayland-server.h>
 
The generated config.h contains:

/* Define if you want to enable Wayland support */
/* #undef HAVE_WAYLAND */

So configure seems to have gotten it right.

I tried protecting the include as:

#ifdef HAVE_WAYLAND
#include "meta-surface-actor-wayland.h"

#include "wayland/meta-wayland-surface.h"
#endif

In some places this worked, but still fails at:

  CC       compositor/meta-window-actor.lo
compositor/meta-window-actor.c: In function ‘meta_window_actor_update_surface’:
compositor/meta-window-actor.c:411:36: error: dereferencing pointer to incomplete type
     surface_actor = window->surface->surface_actor;
                                    ^
make[5]: *** [compositor/meta-window-actor.lo] Error 1
Comment 22 Ting-Wei Lan 2014-09-15 08:02:53 UTC
Mutter does not build without wayland again ...
It seems mutter-test-runner requires wayland. I get the following error:

tests/test-runner.o: In function `test_client_new':
/home/lantw44/gnome/source/mutter/src/tests/test-runner.c:189: undefined reference to `meta_wayland_compositor_get_default'
/home/lantw44/gnome/source/mutter/src/tests/test-runner.c:192: undefined reference to `meta_wayland_get_wayland_display_name'
/home/lantw44/gnome/source/mutter/src/tests/test-runner.c:195: undefined reference to `meta_wayland_get_xwayland_display_name'
Comment 23 Jasper St. Pierre (not reading bugmail) 2014-09-15 15:13:30 UTC
I pushed a small fix to disable the test framework when Wayland is disabled. Sorry about that!
Comment 24 Ting-Wei Lan 2014-09-22 02:19:17 UTC
It seems linux/input.h is another problem ...

core/keybindings.c:43:10: fatal error: 'linux/input.h' file not found
#include <linux/input.h>
         ^
1 error generated.
gmake[4]: *** [core/keybindings.lo] Error 1


I did not find it before because v4l_compat provides this file.
Comment 25 Florian Müllner 2014-09-22 17:54:58 UTC
(In reply to comment #24)
> It seems linux/input.h is another problem ...
> 
> core/keybindings.c:43:10: fatal error: 'linux/input.h' file not found

That's not related to wayland at all - filed as bug 737135.