GNOME Bugzilla – Bug 770647
mutter-3.21.91 fails to compile without wayland
Last modified: 2016-09-11 03:49:03 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
Note that mutter-3.21.90 compiles without problems in the same circumstances.
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,
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.
Review of attachment 334619 [details] [review]: Ok
Attachment 334619 [details] pushed as ce7573e - cogl/egl: Fix non-Wayland build
See also https://bugzilla.gnome.org/show_bug.cgi?id=770533