Subject: Re: [bug#68813] [core-updates PATCH 08/20] gnu: pkg-config: Alias to pkgconf-as-pkg-config.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 24 Feb 2024 15:34:31 -0500

Hi Ludovic,

Ludovic Courtès <[email-masked]> writes:

> Hi!
>
> Maxim Cournoyer <[email-masked]> skribis:
>
>> This switches the default pkg-config implementation used in Guix to pkgconf.
>
> I didn’t follow discussions and I learned about ‘pkgconf’ only recently.
> I’m afraid that adding this to ‘core-updates’ would further postpone its
> merger, which was already being discussed beginning of January.

Was it in a good shape to be merged back then?  It seems to me we are
still ironing things fairly low in the tree such as a glibc upgrade by
jpoiret (for security reasons), which leaves the opportunity to tackle
well tested changes to it, which this one is.

> Should it instead be done on a separate branch?

I've manually rebuilt a good chunk of the world (mpv and plasmatube)
using pkgconf, and haven't seen any breakage caused by it.  You can try
do build these patches on top of current core-updates on the
hydra-guix-129 machine, which should still have it in its store.

> (Aside: where should I read about the rationale of the pkg-config ->
> pkgconf move?)

It all started with f3fdb4e041cb5740ba0b38b9ad017571f8414d33 ("gnu: mpv:
Propagate most libraries."), which was probably triggered by mpv newly
using Requires.static fields in their pkg-config files (Meson knows to
do that).  Looking for nicer alternatives to propagating these, pkgconf
picked my interested as it's supposed to fix some of the pkg-config long
time "bugs" that upstream is not too keen to fix (for backward
compatibility, I think), such as this Requires.static behavior:

Current guix, with above f3fdb4e041cb5740ba0b38b9ad017571f8414d33 commit
reverted:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix shell --pure pkg-config mpv \
        -- pkg-config --print-errors --short-errors --exists mpv
Package 'wayland-client', required by 'mpv', not found
$ echo $?
1
--8<---------------cut here---------------end--------------->8---

Compare with:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix shell --pure pkg-config pkgconf mpv \
        -- pkgconf --print-errors --short-errors --exists mpv
$ echo $?
0
--8<---------------cut here---------------end--------------->8---

The above demonstrates that pkgconf's behavior is to consider *.private
fields only when provided the --static option, which is what we want.

I hope this helps understanding the rationale.

-- 
Thanks,
Maxim