There is a bug in how gtk 3 and gtk 4 are built against by other
packages. GTK supports optionally enabling X and wayland support -- when
you do so, the ABI of GTK changes.
It is historically common for X11 packages to check for a macro provided
by GTK that says "built with X11 support". This goes back to the days
when X11 was the only backend shipped with GTK, and the main use of the
macro was to check whether to use X11 or rather to use, say, the win32
or Quartz (macOS) backends. The pattern has continued now that Linux has
two backends.
The result of this is that many packages really need to support their
own IUSE="X wayland" (because they can conditionally build code for
that) and also need to make sure that USE flag is actually respected.
Failure to do this means that when rebuilding GTK with different USE
flags, all applications linking to GTK need to be rebuilt too, but
portage doesn't know that.
It also means that binhosts -- such as the one officially hosted by
Gentoo -- have bad binaries that don't actually match the packages users
have installed. This is particularly bad since it breaks expectations
and is quite hard to debug. This has hit people a bunch of times when
trying to install the xfce desktop environment, in particular.
- What I propose in this patchset. Hack a custom gentoo feature into the
GTK headers. GTK normally behaves exactly as it's supposed to
upstream, but we add the ability to pass a define via `append-cflags`
that makes the GTK headers tell an outright lie and claim its API
doesn't exist. Which is what we want -- we want packages to be able to
compile *as if* GTK wasn't built with support for a given backend.
This disables the automagic as if option 1 (implementing configure
options) was carried out. Advantage: automatically support proper
control of features. Disadvantage: requires patching GTK and
then still adding workarounds for each package that needs it.
There is a bug in how gtk 3 and gtk 4 are built against by other
packages. GTK supports optionally enabling X and wayland support -- when
you do so, the ABI of GTK changes.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 17:44:37 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,090 |