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 770647 - mutter-3.21.91 fails to compile without wayland
mutter-3.21.91 fails to compile without wayland
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-08-31 13:27 UTC by john.frankish@outlook.com
Modified: 2016-09-11 03:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
cogl/egl: Fix non-Wayland build (1.00 KB, patch)
2016-09-02 06:21 UTC, Jonas Ådahl
committed Details | Review

Description john.frankish@outlook.com 2016-08-31 13:27:01 UTC
Using mutter-3.21.91

Compiling with:

./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib/mutter --enable-compile-warnings=no --disable-wayland --with-x --disable-wayland-egl-server

make fails with:

winsys/cogl-winsys-egl.c: In function '_cogl_egl_create_image':
winsys/cogl-winsys-egl.c:1032:5: error: "COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT" is not defined [-Werror=undef]
 #if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT

Compiling with:

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib/mutter --enable-compile-warnings=no --disable-wayland --with-x

configure fails with:

checking for WAYLAND_SERVER... no
configure: error: Package requirements (wayland-server >= 1.1.90) were not met:

No package 'wayland-server' found
Comment 1 john.frankish@outlook.com 2016-09-01 06:38:16 UTC
Note that mutter-3.21.90 compiles without problems in the same circumstances.
Comment 2 john.frankish@outlook.com 2016-09-02 06:15:44 UTC
Reversing the following change allows mutter-3.21.91 to compile with X:

$ diff -Nau /usr/src/mutter-3.21.91/cogl/cogl/winsys/cogl-winsys-egl.c /usr/src/mutter-3.21.90/c
ogl/cogl/winsys/cogl-winsys-egl.c
--- /usr/src/mutter-3.21.91/cogl/cogl/winsys/cogl-winsys-egl.c  2016-08-29 22:17:55.000000000 +0000
+++ /usr/src/mutter-3.21.90/cogl/cogl/winsys/cogl-winsys-egl.c  2016-08-09 14:30:37.000000000 +0000
@@ -1029,13 +1029,6 @@
     egl_ctx = EGL_NO_CONTEXT;
   else
 #endif
-#if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
-  /* The WL_bind_wayland_display spec states that EGL_NO_CONTEXT is to be used
-   * in conjunction with the EGL_WAYLAND_BUFFER_WL target */
-  if (target == EGL_WAYLAND_BUFFER_WL)
-    egl_ctx = EGL_NO_CONTEXT;
-  else
-#endif
     egl_ctx = egl_display->egl_context;
 
   return egl_renderer->pf_eglCreateImage (egl_renderer->edpy,
Comment 3 Jonas Ådahl 2016-09-02 06:21:30 UTC
Created attachment 334619 [details] [review]
cogl/egl: Fix non-Wayland build

Use #ifdef instead of #if, otherwise it won't compile when Wayland is
not available.
Comment 4 Florian Müllner 2016-09-02 07:16:40 UTC
Review of attachment 334619 [details] [review]:

Ok
Comment 5 Jonas Ådahl 2016-09-02 09:04:47 UTC
Attachment 334619 [details] pushed as ce7573e - cogl/egl: Fix non-Wayland build
Comment 6 Jeremy Bicha 2016-09-11 03:49:03 UTC
See also https://bugzilla.gnome.org/show_bug.cgi?id=770533