• Re: [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayla

    From James Le Cuirot@21:1/5 to Eli Schwartz on Sun Jun 23 20:40:01 2024
    On Sun, 2024-06-23 at 13:35 -0400, Eli Schwartz wrote:
    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.

    <snip>

    - 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.

    Nice trick! I like it. Good work. :)

    -----BEGIN PGP SIGNATURE-----

    iQJFBAABCAAvFiEEPxcZ3tkwcedKm2a8EiZBXQDdMTcFAmZ4apcRHGNoZXdpQGdl bnRvby5vcmcACgkQEiZBXQDdMTcIBg//U6WrNP0l8PbT4QHKcL3V/KQckF3vuag1 leeW3+cuxOs8L/0l7brrB+IO0L3Gq0gzy28AlSvD/E8JQolCyKxaVQvOd2Kw6EKa ynj91gifWlAcTULp6HuYv9QeEqNif1k+MNJPvFFM7hfH+hMtvGda344Y6d/Gke6M vZ+v3K76WIXTJLXIUmUSfHDoasweJXl0kf9DHicsl7A69i1RhMGdcUWqvbwI0RGC l29D41e4b3naWm1b8+qL5NR4Gs6xgFw2FfBkBBsNCmf07wUkej4GPjWCBHZge33d 5b2oEV5TDbuG1ouq4puNjTJxsAGAQxVd6KVdpnJjMo1ztDYqanJNU90sJOJWB14+ NUF4fHDZJ3yalGEJkFsvmAiLoI1roIH5kOHQZGjOHKfcwywRilkv2wQ07wBUXENv 89Sz+LsAsIgduP1BfQfkhw0ZV8WUV8nl5ns8TOwIqv07y5yBoNiCctGOoV6mxKCy po5IQ0VKCRZCQq6GKrW0QyS4TAR56HweAu8DBHdAkRyUAoWJeuN29H3gW/McZU65 Ogkao6dS3gGAkFGXiCgDpz75h//fSLoEZ1ADReRIKWBXtYeoAocQRMcEUXQIBS/m ySTjL3dlLuCG7v93r54iDzIqPNKmSi4ULe7d1+3mA5mRQCGxxZhtossP91bhLAQg
    +uYnj5ojlaA=
    =g9Wl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to Eli Schwartz on Wed Jun 26 11:10:02 2024
    Eli Schwartz <eschwartz93@gmail.com> writes:

    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.

    The series looks good to me, but I'd like leio to ack it before we merge
    it.

    It's not ideal, of course, but I think it's the best option we have and
    the status quo is pretty bad.

    thanks,
    sam

    -----BEGIN PGP SIGNATURE-----

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZnvZJV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZDcjwD/awPR6rW1Gu9oqULYanat2WuaIe7vuhvMkCbW GhLtRI4BALnjtJqed3lbE4dyTwzSPeMZjhDU3Z6PahyCKQMIBqUL
    =ZInp
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)