Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 718922 - x11-libs/gtk+:3[-X] with wayland support(?) should set -DEGL_NO_X11=true (?)
Summary: x11-libs/gtk+:3[-X] with wayland support(?) should set -DEGL_NO_X11=true (?)
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-04-22 18:00 UTC by Mathieu Tortuyaux
Modified: 2021-06-21 17:08 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Tortuyaux 2020-04-22 18:00:54 UTC
Hi, 

I'm installing GTK+3 with Wayland support so no X USE flag. Since this commit: https://gitlab.freedesktop.org/mesa/mesa/-/commit/6202a13b71e18dc31ba7e2f4ea915b67eacc1ddb GTK3+ should be built against mesa with `-DEGL_NO_X11=true` to avoid including X11/libs. 

I hardcoded it, but it should be present in the ebuild. 

I can do the fix if needed.
Comment 1 Andreas Sturmlechner gentoo-dev 2020-04-22 19:18:31 UTC
(In reply to mathieu.tortuyaux from comment #0)
> I'm installing GTK+3 with Wayland support so no X USE flag.

Wayland support does not imply no X.
Comment 2 James Le Cuirot gentoo-dev 2020-04-25 14:56:01 UTC
It actually fails to build if you don't have libX11 installed. It's not a hard dependency. I think this is related to bug #718794.

libtool: compile:  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18/gdk/wayland -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DG_LOG_USE_STRUCTURED=1 -DGDK_COMPILATION -I/var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18 -I/var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18/gdk -I../../gdk -fvisibility=hidden -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DGLIB_MIN_REQUIRED_VERSION=GLIB_VERSION_2_56 -DGLIB_MAX_ALLOWED_VERSION=GLIB_VERSION_2_58 -pthread -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/lib/libffi/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -O2 -march=i686 -pipe -Wall -c /var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18/gdk/wayland/gdkglcontext-wayland.c  -fPIC -DPIC -o .libs/gdkglcontext-wayland.o
In file included from /usr/include/epoxy/egl_generated.h:11,
                 from /usr/include/epoxy/egl.h:46,
                 from /var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18/gdk/wayland/gdkglcontext-wayland.h:32,
                 from /var/tmp/portage/x11-libs/gtk+-3.24.18/work/gtk+-3.24.18/gdk/wayland/gdkglcontext-wayland.c:24:
/usr/include/EGL/eglplatform.h:128:10: fatal error: X11/Xlib.h: No such file or directory
  128 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[5]: *** [Makefile:746: gdkglcontext-wayland.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
Comment 3 ashpil@pm.me 2020-06-11 21:44:45 UTC
>> I'm installing GTK+3 with Wayland support so no X USE flag.
> Wayland support does not imply no X.

Yes, however the no X USE flag would imply no X. This along with gtk-engines-adwaita is the only barrier to a mergable Firefox on a Wayland-only system.
Comment 4 f0o 2021-04-10 07:12:21 UTC
> Yes, however the no X USE flag would imply no X. This along with
> gtk-engines-adwaita is the only barrier to a mergable Firefox on a
> Wayland-only system.

I have to agree with this. Specially since the absence of X flag makes ebuild not include libX11 already. At that point the ebuild is just broken.

Either make libX11 to be always be included or append DEGL_NO_X11 option to GTK's configure state.

As it is right now, it's just broken because it leads to a situation that cannot be merged.