Summary: | x11-libs/gtk+:3 - wayland optionality concerns | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | poncho <poncho> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | alexander, binhost, eschwartz, gentoo, ikorot01, ks, leho, leohdz172, nowa, oescorza, poncho, sam, tout76, unheatedgarage, yaroslav.isakov |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugzilla.gnome.org/show_bug.cgi?id=780544 https://bugs.gentoo.org/show_bug.cgi?id=677494 https://github.com/gentoo/gentoo/pull/21985 https://bugs.gentoo.org/show_bug.cgi?id=680496 https://bugs.gentoo.org/show_bug.cgi?id=873520 https://bugs.gentoo.org/show_bug.cgi?id=927952 https://bugs.gentoo.org/show_bug.cgi?id=865659 https://github.com/gentoo/gentoo/pull/37259 https://gitlab.gnome.org/GNOME/gtk/-/issues/6832 https://bugs.gentoo.org/show_bug.cgi?id=785619 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 937415 | ||
Bug Blocks: | 717146, 665348 | ||
Attachments: | build.log |
Description
poncho
2017-07-14 09:09:04 UTC
3.24.2-optional-wayland.patch must be incomplete then apparently include <gdk/gdkwayland.h> was introduced here: https://git.gnome.org/browse/gnome-control-center/commit/panels/common/gsd-device-manager-udev.c?h=gnome-3-24&id=8f9259ac06db4c2830fa9e79227bb56abdee86ca not sure whether just reverting this commit is the right solution though. I've added a patch that should fix this, but I'm still concerned about the wayland optionality stuff we have here: * If gtk+[wayland] is present, then those codepaths still get used in gnome-control-center and probably other gnome modules due to GDK_WINDOWING_WAYLAND being defined. Our optional-wayland patch here doesn't force GDK_WINDOWING_WAYLAND to undefined, so if you compile gnome-control-center with USE=-wayland but gtk+ happens to be compiled with USE=wayland, it'll still use gdkwayland stuff to some extent, probably thus falling over after gtk+ is recompiled without wayland (as the deps would allow). In fact, I couldn't reproduce the problem or test the fix because of that, as I have gtk+[wayland] - gnome-control-center[-wayland] worked fine for me. * Even with --disable-wayland for our patch passed, I see wacom panel still have -lwayland and co stuff in its LIBS We should think about GDK_WINDOWING_WAYLAND handling for all of GNOME, or maybe consider it's time to hard require wayland to not bother with any of this - at least it's not a plethora of X libs and wayland is the future or something... Re-titling the bug for this, but please test if the gdkwayland fix works for you. You should see a "3.24.2-fix-without-gdkwayland.patch" getting applied if your rsync is caught up. commit f5563dcc576c5a36e990b2d74eafa7e7809cafe7 Author: Mart Raudsepp <leio@gentoo.org> Date: Sat Jul 15 07:12:49 2017 +0300 gnome-base/gnome-control-center: Fix compilation with USE=-wayland without gtk+[wayland] Gentoo-bug: 624960 Package-Manager: Portage-2.3.5, Repoman-2.3.2 gnome-base/gnome-control-center/files/3.24.2-fix-without-gdkwayland.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++ gnome-base/gnome-control-center/gnome-control-center-3.24.2.ebuild | 2 ++ 2 files changed, 49 insertions(+) (In reply to Mart Raudsepp from comment #3) > Re-titling the bug for this, but please test if the gdkwayland fix works for > you. You should see a "3.24.2-fix-without-gdkwayland.patch" getting applied > if your rsync is caught up. The fixed patch works for me, thanks :) *** Bug 627966 has been marked as a duplicate of this bug. *** This issue just bit me. What should I mask so I can safe downgrade gnome so I can reboot? (In reply to Michael Cook from comment #6) > This issue just bit me. What should I mask so I can safe downgrade gnome so > I can reboot? Running ~amd64, I've been getting errors since we got Gnome 3.24--setting wayland globally fixed the problem for me. Also, I had to apply this patch: https://bugs.gentoo.org/show_bug.cgi?id=627960#c4 Issue still exists in 3.24.3. I'll have a look. (In reply to Mart Raudsepp from comment #3) > I've added a patch that should fix this, but I'm still concerned about the > wayland optionality stuff we have here: > > * If gtk+[wayland] is present, then those codepaths still get used in > gnome-control-center and probably other gnome modules due to > GDK_WINDOWING_WAYLAND being defined. Our optional-wayland patch here doesn't > force GDK_WINDOWING_WAYLAND to undefined, so if you compile > gnome-control-center with USE=-wayland but gtk+ happens to be compiled with > USE=wayland, it'll still use gdkwayland stuff to some extent, probably thus > falling over after gtk+ is recompiled without wayland (as the deps would > allow). In fact, I couldn't reproduce the problem or test the fix because of > that, as I have gtk+[wayland] - gnome-control-center[-wayland] worked fine > for me. > > * Even with --disable-wayland for our patch passed, I see wacom panel still > have -lwayland and co stuff in its LIBS > > We should think about GDK_WINDOWING_WAYLAND handling for all of GNOME, or > maybe consider it's time to hard require wayland to not bother with any of > this - at least it's not a plethora of X libs and wayland is the future or > something... Actually, digging into this I remember I made clutter & co USE=wayland locked to the value of gtk+ due to this. > or maybe consider it's time to hard require wayland to not bother with any of this
Yes. Think of all the other useful stuff that could be done with the time/energy it takes to provide clearly difficult to implement options, such as `USE=-wayland`. Could make sense if we had enough manpower or it was technically trivial. Both pre-conditions evaluate to a strictly typed `false` value.
Looking forward to reaching 3.26 sometime soon.
Retitling to be more about the gdkx.h issue as already meant. This is now regarding globally for GDK_WINDOWING_X11 guards, not just about gnome-control-center. I also removed gnome-terminal gtk+[X] dep for now, as it works fine with pure wayland and we have users that want it for such purpose. The problem is the changing of this on gtk+ after the fact, and not only just for gnome-terminal or gnome-control-center. Could use a USE subslot, eh. gtk+:3[X:=,wayland:=] or something without exposing it in IUSE - rebuild if the USE flag setting changes :D Can we please get this added to the app-i18n/ibus ebuilds as x11-libs/gtk+:3[=wayland] DEPENDs. app-i18n/ibus suffers from the same problem and must be (re-)built to correspond with gtk+:3 'wayland' USE state. Example break: 1. USE=wayland emerge -1 x11-libs/gtk+:3 app-i18n/ibus 2. USE=-wayland emerge -1 x11-libs/gtk+:3 * Updating gtk3 input method module cache ... Cannot load module /usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so: /usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so: undefined symbol: gdk_wayland_display_get_type *** Bug 736974 has been marked as a duplicate of this bug. *** *** Bug 811372 has been marked as a duplicate of this bug. *** I keep meaning to add a pkg_postinst based on if USE=wayland changed in gtk+ at least to warn about this. *** Bug 882623 has been marked as a duplicate of this bug. *** *** Bug 885051 has been marked as a duplicate of this bug. *** *** Bug 914907 has been marked as a duplicate of this bug. *** *** Bug 928300 has been marked as a duplicate of this bug. *** The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78658acbd51f6965cd11fd39dc3e9877f23cf221 commit 78658acbd51f6965cd11fd39dc3e9877f23cf221 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-06-20 03:03:40 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-08-02 00:36:19 +0000 gui-libs/gtk: add a "poison" macro support to disable X/wayland Many packages perform automagic dependencies on gdk's backend implementations by checking if the macro is defined and then using the code it unlocks, rather than having a buildsystem option such as -Dwayland=true. It's unfeasible to patch every such package's source code to add configure options and respect them. Instead add a truly filthy hack and permit gtk itself to selectively show or hide the windowing system in use. Bug: https://bugs.gentoo.org/624960 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/37259 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> ...add-a-poison-macro-to-hide-GDK_WINDOWING_.patch | 91 ++++++++ gui-libs/gtk/gtk-4.12.5-r2.ebuild | 240 +++++++++++++++++++++ .../{gtk-4.14.3.ebuild => gtk-4.14.3-r1.ebuild} | 8 + .../{gtk-4.14.4.ebuild => gtk-4.14.4-r1.ebuild} | 8 + 4 files changed, 347 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2295182d1609bc0e1c781334ae046e1d2c8990f4 commit 2295182d1609bc0e1c781334ae046e1d2c8990f4 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-06-20 04:06:03 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-08-02 00:36:11 +0000 x11-libs/gtk+: add a "poison" macro support to disable X/wayland Many packages perform automagic dependencies on gdk's backend implementations by checking if the macro is defined and then using the code it unlocks, rather than having a buildsystem option such as -Dwayland=true. It's unfeasible to patch every such package's source code to add configure options and respect them. Instead add a truly filthy hack and permit gtk itself to selectively show or hide the windowing system in use. Bug: https://bugs.gentoo.org/624960 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/37259 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> ...add-a-poison-macro-to-hide-GDK_WINDOWING_.patch | 90 +++++++++ x11-libs/gtk+/gtk+-3.24.41-r1.ebuild | 205 +++++++++++++++++++++ ...{gtk+-3.24.42.ebuild => gtk+-3.24.42-r1.ebuild} | 5 + 3 files changed, 300 insertions(+) See also https://public-inbox.gentoo.org/gentoo-dev/20240623173646.3368935-1-eschwartz93@gmail.com/ for background on the above. As discussed with leio, going ahead carefully but keeping an eye out for fallout. We also need to speak with upstream more still. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec63c55db0dded229ba78395830af7fb7e0bed0 commit cec63c55db0dded229ba78395830af7fb7e0bed0 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-05-19 18:01:45 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-08-06 00:18:30 +0000 xfce-base/libxfce4ui: prevent automagically building against gtk[wayland] The upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This means that libxfce4ui built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime regardless of USE flag. This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland and arbitrarily restrict libxfce4ui[-wayland] to only build and install on a system with gtk+[-wayland]. But we recently added a hack to gtk itself which allows hiding the automagic macros entirely. Inject this via append-cflags if the USE flags aren't set, to simulate building on a system with more minimal gtk packages. Fixed upstream in: https://gitlab.xfce.org/xfce/libxfce4ui/-/commit/967359624e408365b4c027bab66e737063af604b and hence only worked around for 4.18. Bug: https://bugs.gentoo.org/624960 Closes: https://bugs.gentoo.org/873520 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> xfce-base/libxfce4ui/libxfce4ui-4.18.6-r1.ebuild | 79 ++++++++++++++++++++++++ 1 file changed, 79 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efaf2366cea9a37456b75eaa2081e7339edd38ea commit efaf2366cea9a37456b75eaa2081e7339edd38ea Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-05-05 20:51:41 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-08-06 00:18:29 +0000 x11-libs/wxGTK: prevent automagically building against gtk[X,wayland] The upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This despite that wxGTK has a wayland USE flag, and checks it in the build system -- just not for this. This means that when built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime regardless of USE flag. This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland and arbitrarily restrict wxGTK[-wayland] to only build and install on a system with gtk+[-wayland]. But we recently added a hack to gtk itself which allows hiding the automagic macros entirely. Inject this via append-cflags if the USE flags aren't set, to simulate building on a system with more minimal gtk packages. Bug: https://bugs.gentoo.org/624960 Closes: https://bugs.gentoo.org/927952 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> x11-libs/wxGTK/wxGTK-3.2.2.1-r5.ebuild | 262 +++++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14f4be4038afc5a9ffd1a6693469b930cba8f67c commit 14f4be4038afc5a9ffd1a6693469b930cba8f67c Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-05-05 20:44:33 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2024-08-06 00:18:24 +0000 net-libs/gtk-vnc: prevent automagically building against gtk[X,wayland] e.g. the upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This means that gtk-vnc built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime. This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland (and X), and in the process, arbitrarily restrict gtk-vnc[-wayland] to only build and install on a system with gtk+[-wayland]. But we recently added a hack to gtk itself which allows hiding the automagic macros entirely. Inject this via append-cflags if the USE flags aren't set, to simulate building on a system with more minimal gtk packages. Bug: https://bugs.gentoo.org/624960 Closes: https://bugs.gentoo.org/865659 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> net-libs/gtk-vnc/gtk-vnc-1.3.1-r1.ebuild | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) *** Bug 928300 has been marked as a duplicate of this bug. *** The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0fad0f4611efabdb614a93b304cf52aab8e06cc commit a0fad0f4611efabdb614a93b304cf52aab8e06cc Author: Eli Schwartz <eschwartz@gentoo.org> AuthorDate: 2025-01-29 00:28:40 +0000 Commit: Eli Schwartz <eschwartz@gentoo.org> CommitDate: 2025-02-02 05:28:45 +0000 app-i18n/ibus: correctly depend on gtk interfaces to wayland/X The upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. We must unconditionally depend on the gdk X11 backend, since the code unconditionally tries to use it (even when headers themselves are conditional, which they aren't always). We can now solve this using a special Gentoo macro to hide these automagic macros to simulate building on a system with more minimal gtk packages. Bug: https://bugs.gentoo.org/624960 Closes: https://bugs.gentoo.org/910646 Closes: https://bugs.gentoo.org/921671 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> app-i18n/ibus/ibus-1.5.29-r1.ebuild | 236 +++++++++++++++++++++ .../{ibus-1.5.30.ebuild => ibus-1.5.30-r1.ebuild} | 9 +- .../{ibus-1.5.31.ebuild => ibus-1.5.31-r1.ebuild} | 9 +- profiles/arch/alpha/package.use.mask | 1 + profiles/features/big-endian/package.use.mask | 3 +- 5 files changed, 251 insertions(+), 7 deletions(-) |