Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 873520 - xfce-base/libxfce4ui: does not have wayland USE flag despite potentially using Wayland-only symbols from GTK
Summary: xfce-base/libxfce4ui: does not have wayland USE flag despite potentially usin...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: XFCE Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-29 20:35 UTC by Kacper Słomiński
Modified: 2022-09-30 21:30 UTC (History)
4 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 Kacper Słomiński 2022-09-29 20:35:17 UTC
libxfce4ui will potentially do Wayland-specific things if GDK_WINDOWING_WAYLAND is defined by Gdk, which happens if Gtk is built with the wayland USE flag. Despite this, it's missing a wayland USE flag of it's own (and the associated dependency on the wayland flag for Gtk). This means that the following sequence of events will produce a broken libxfce4ui (which will for example prevent launching Xfce):
1. Add wayland to your USE flags
2. Run "emerge --deep --verbose --newuse @world"
3. Install Xfce or any program that uses libxfce4ui
4. Remove wayland from your USE flags
5. Run "emerge --deep --verbose --newuse @world"

After that, libxfce4ui-2.so will still refer to the "gdk_wayland_display_get_type" symbol, which will no longer exists due to Gtk not having the wayland USE flag set anymore.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 06:42:11 UTC
I don't see any configure option that would be relevant to this.  This is an upstream bug then, isn't it?
Comment 2 Kacper Słomiński 2022-09-30 07:04:53 UTC
There is no configure option, but it does check for the define that Gdk defines (GDK_WINDOWING_WAYLAND), which seems good enough to me in this case.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 07:10:08 UTC
(In reply to Kacper Słomiński from comment #2)
> There is no configure option, but it does check for the define that Gdk
> defines (GDK_WINDOWING_WAYLAND), which seems good enough to me in this case.

I don't see how to use that to prevent the breakage if libxfce4ui[-wayland] is built against gtk+[wayland].
Comment 4 Kacper Słomiński 2022-09-30 07:14:52 UTC
(In reply to Michał Górny from comment #3)
> I don't see how to use that to prevent the breakage if libxfce4ui[-wayland]
> is built against gtk+[wayland].

Hmm, good point. I was thinking of having libfxce4ui depend on gtk+ having the same state of the wayland USE flag. Also probably worth noting, the Wayland detection is only there to disable some functionality that's broken under Wayland:

#ifdef GDK_WINDOWING_WAYLAND
  if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
    {
      if (startup_notify == TRUE)
        {
          /* 'sn_display_new' crashes when used via wayland, so no startup notification support here */
          g_warning ("startup notification not supported for wayland sessions");
          startup_notify = FALSE;
        }
    }
#endif
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 07:39:07 UTC
Sounds like they're working around some bug in startup-notification then.  Any idea if this bug is still valid?  I suppose it kinda sucks to add a dep on conditional symbols over something like this.
Comment 6 Kacper Słomiński 2022-09-30 21:21:38 UTC
Not sure what do to about this. Looking at the source code for libsn, sn_display_new crashes because it unconditionally uses the given X11 display (and immediately goes to work querying atoms without checking if it's valid), so it's not easy to fix there probably, considering the whole lib looks pretty X11-specific.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-30 21:30:42 UTC
Just for some further reading: there's all sorts of problems similar to this, unfortunately, see bug 624960 (although the XFCE issue here is actually something concrete instead of gcr etc)