Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937632 - x11-wm/mutter-46.7: fails to build on a system without wayland present: meta-wayland-text-input.h:22:10: fatal error: wayland-server.h: No such file or directory
Summary: x11-wm/mutter-46.7: fails to build on a system without wayland present: meta-...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://gitlab.gnome.org/GNOME/mutter...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-09 16:42 UTC by poncho
Modified: 2025-03-10 21:25 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log with error (build.log,473.17 KB, text/x-log)
2024-08-09 16:42 UTC, poncho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description poncho 2024-08-09 16:42:16 UTC
Created attachment 899708 [details]
build.log with error

FAILED: src/libmutter-14.so.0.0.0.p/compositor_meta-compositor-server.c.o 
x86_64-pc-linux-gnu-gcc -Isrc/libmutter-14.so.0.0.0.p -Isrc -I../mutter-46.4/src -I. -I../mutter-46.4 -Iclutter -I../mutter-46.4/clutter -Iclutter/clutter -I../mutter-46.4/clutter/clutter -Imtk -I../mutter-46.4/mtk -Imtk/mtk -I../mutter-46.4/mtk/mtk -Icogl -I../mutter-46.4/cogl -Icogl/cogl -I../mutter-46.4/cogl/cogl -Isrc/meta -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/gio-unix-2.0 -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/uuid -I/usr/include/json-c -I/usr/include/blkid -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/pixman-1 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/gsettings-desktop-schemas -I/usr/include/colord-1 -I/usr/include/gnome-settings-daemon-45 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/include/libei-1.0 -I/usr/include/gnome-desktop-4.0 -I/usr/include/libxml2 -I/usr/include/gudev-1.0 -I/usr/include/startup-notification-1.0 -I/usr/include/gobject-introspection-1.0 -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -D_GNU_SOURCE -march=native -O2 -pipe -fPIC -pthread -D_REENTRANT -mfpmath=sse -msse -msse2 -DCOGL_ENABLE_MUTTER_API -DSN_API_NOT_YET_FROZEN=1 '-DGETTEXT_PACKAGE="mutter"' -DWITH_VERBOSE_MODE '-DG_LOG_DOMAIN="libmutter"' -MD -MQ src/libmutter-14.so.0.0.0.p/compositor_meta-compositor-server.c.o -MF src/libmutter-14.so.0.0.0.p/compositor_meta-compositor-server.c.o.d -o src/libmutter-14.so.0.0.0.p/compositor_meta-compositor-server.c.o -c ../mutter-46.4/src/compositor/meta-compositor-server.c
In file included from ../mutter-46.4/src/wayland/meta-wayland.h:28,
                 from ../mutter-46.4/src/compositor/meta-compositor-server.c:26:
../mutter-46.4/src/wayland/meta-wayland-text-input.h:22:10: fatal error: wayland-server.h: No such file or directory
   22 | #include <wayland-server.h>
      |          ^~~~~~~~~~~~~~~~~~


Something like this should fix the issue:

diff --git a/src/compositor/meta-compositor-server.c b/src/compositor/meta-compositor-server.c
index e3c4a1ccc..b95f736b9 100644
--- a/src/compositor/meta-compositor-server.c
+++ b/src/compositor/meta-compositor-server.c
@@ -22,8 +22,11 @@
 #include "compositor/meta-compositor-server.h"
 #include "compositor/meta-compositor-view.h"
 #include "core/display-private.h"
+
+#ifdef HAVE_WAYLAND
 #include "meta/meta-wayland-compositor.h"
 #include "wayland/meta-wayland.h"
+#endif
 
 G_DEFINE_TYPE (MetaCompositorServer, meta_compositor_server, META_TYPE_COMPOSITOR)


Mentioned to upstream at https://gitlab.gnome.org/GNOME/mutter/-/issues/3446#note_2089556 but never got an answer.
Comment 1 Pacho Ramos gentoo-dev 2024-11-29 11:13:16 UTC
Can you open a separate bug upstream providing the patch for fixing the compilation issue? That will probably get more attention.

Thanks
Comment 2 poncho 2024-11-29 11:23:58 UTC
I no longer have a system with wayland disabled.
Comment 3 Agostino Sarubbo gentoo-dev 2024-12-02 08:06:39 UTC
ci has reproduced this issue with version 46.7 - Updating summary.
Comment 4 Stefan 2024-12-23 20:26:33 UTC
Still an issue with x11-wm/mutter-46.7 on systems with `-wayland` USE flag.

Patching the sources manually using the patch provided above solves the issue. Since there is no reaction from the upstream developers for months, can we have an ebuild including the patch, please? Otherwise, Gnome desktops on systems not using wayland are broken.
Comment 5 Stefan 2024-12-23 22:35:46 UTC
UPDATE regarding my last post: Patching the sources let me compile the ebuild, but after restarting my Gnome session, I was not able to launch any apps, so this seems to be a bigger issue.

Workaround (for a non-wayland setup) is to enable 'wayland' for the x11-wm/mutter package only. Afterwards, I was able to compile without patching and start apps in a Gnome/X11 session again.
Comment 6 J. Watson 2024-12-31 20:16:29 UTC
If this helps anyone, I had to option to build dev-libs/wayland after x11-mutter today when emerging and it still failed, so I manually installed dev-libs/wayland first and it all built fine.
Comment 7 m1027 2025-01-15 09:40:06 UTC
I can confirm:

> emerge dev-libs/wayland

before installing mutter helps.
Comment 8 Agostino Sarubbo gentoo-dev 2025-01-20 11:04:01 UTC
tinderbox-stable has reproduced this issue in a STABLE environment with version 46.7-r1
Comment 9 Larry the Git Cow gentoo-dev 2025-01-26 17:32:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e559cfe18b0ed98f657bfea67df91e60b8bb3dc

commit 9e559cfe18b0ed98f657bfea67df91e60b8bb3dc
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2025-01-26 16:27:18 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2025-01-26 16:40:10 +0000

    x11-wm/mutter: wayland is always needed at build time
    
    Due to https://gitlab.gnome.org/GNOME/mutter/-/issues/3446#note_2089556
    
    Bug: https://bugs.gentoo.org/937632
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 x11-wm/mutter/mutter-47.4.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 10 Marco Moreno Garijo 2025-03-10 21:25:11 UTC
I have reproduced this bug today while trying to install x11-wm/mutter without wayland on my system. Had to enable the wayland USE flag on mutter for it to work.