From: Randolph Sapp <rs@ti.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
<alex.kanavin@gmail.com>,
<openembedded-core@lists.openembedded.org>,
"Ryan Eatmon" <reatmon@ti.com>,
Denys Dmytriyenko <denys@konsulko.com>, <cordlandwehr@kde.org>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>
Subject: Re: [oe-core] [RFC] meson.bbclass: pkg-config vs pkgconf
Date: Mon, 3 Jun 2024 17:02:45 -0500 [thread overview]
Message-ID: <D1QPZCIWWJOK.1SUMCYPNQHXTS@ti.com> (raw)
In-Reply-To: <648acd46523f9be85df778aa235d082312ead1ff.camel@linuxfoundation.org>
On Mon Jun 3, 2024 at 4:22 PM CDT, Richard Purdie wrote:
> On Mon, 2024-06-03 at 13:02 -0500, Randolph Sapp wrote:
> > Forgive my ignorance, but is there any particular reason why pkg-
> > config is preferred over pkgconf for meson related recipes?
>
> Yes, as to try and mix both pkg-config and pkgconf would be a path to
> madness.
Fair enough.
> > It seems the two treat the usage of the PKG_CONFIG_SYSROOT_DIR
> > variable differently, resulting in issues when build scripts
> > attempting to use package config variables directly.
>
> Right, this is basically the problem. We have a long history of using
> pkg-config, we worked with upstream to merge sysroot support and it is
> the standard we built around.
>
> pkgconf then came along and decided it would be a great idea to have
> some slightly different behaviour. We did originally plan to have a
> switchable virtual/ provider but due to the differences in behaviour it
> doesn't work.
>
> Things are bad enough that there are two standards. Saying "if building
> with meson, it behaves differently again" would be a nightmare.
>
> I have been asked to switch everything to pkgconf however I suspect
> that would also involve carrying patches and would end up as ton of
> work to be incompatible with a different set of software. I'm therefore
> not keen on that either.
Also fair, I can understand not wanting to switch to a newer tool after spending
time to get sysroots accepted upstream. The virtual provider thing is doable
though.
Both pkg-config providers can be passed --define-prefix to yield something
usable to Yocto. It makes both assume the value of "prefix" based on the path to
the current package config file, which will work with current sysroot structure
Yocto uses. If that structure ever changes, though, this will no longer work. A
wrapper would be able to ensure both follow the standard.
> > If there's not an explicit reason we're preferring pkg-config, would
> > anyone be opposed to switching it out for pkgconf for meson related
> > packages? Of course, with a note about this behavior discrepancy. It
> > would reduce these Yocto specific patches and align meson behavior
> > with distros that currently default to pkgconf.
>
> Personally, I think it would just confuse things even more. xcb-proto
> might get used by meson or non-meson software. Mesa might get used by
> either too. Keeping it simple and saying "pkg-config behaviour"
> everywhere is simpler IMO.
>
> Cheers,
>
> Richard
Fair enough. Would the wrapper be a useful solution (if applied globally), or
would this be too much of a deviation from expected default behavior as well...
- Randolph
prev parent reply other threads:[~2024-06-03 22:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 18:02 [oe-core] [RFC] meson.bbclass: pkg-config vs pkgconf Randolph Sapp
2024-06-03 21:22 ` Richard Purdie
2024-06-03 21:32 ` Marko Lindqvist
2024-06-03 21:37 ` Richard Purdie
2024-06-03 21:54 ` Randolph Sapp
2024-06-03 22:02 ` Randolph Sapp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D1QPZCIWWJOK.1SUMCYPNQHXTS@ti.com \
--to=rs@ti.com \
--cc=alex.kanavin@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=cordlandwehr@kde.org \
--cc=denys@konsulko.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=reatmon@ti.com \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox