public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <ross.burton@arm.com>, <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 5/8] classes/pkgconfig: rationalise variable usage
Date: Thu, 29 Jan 2026 07:17:42 +0100	[thread overview]
Message-ID: <DG0URCTB99Y6.27GWCKK8DHC5T@bootlin.com> (raw)
In-Reply-To: <DG09C8YCPE02.3IOO2264O7DUQ@bootlin.com>

On Wed Jan 28, 2026 at 2:30 PM CET, Mathieu Dubois-Briand wrote:
> On Fri Jan 23, 2026 at 7:04 PM CET, Ross Burton via lists.openembedded.org wrote:
>> Our PKG_CONFIG_* variables were a bit of a mess.
>>
>> First, PKG_CONFIG_DIR is not used by either pkg-config or pkgconf.  It's
>> set to (approximately) ${libdir}/pkgconfig but we also want to search
>> ${datadir}/pkgconfig so it isn't actually useful as an intermediate
>> variable.
>>
>> Remove PKG_CONFIG_DIR and replace with the neatest expression for the
>> value we want: ${STAGING_LIBDIR}/pkgconfig.
>>
>> Second, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR shouldn't be set to the
>> same paths. The semantics of these variables is that PKG_CONFIG_PATH is
>> searched first, followed by either PKG_CONFIG_LIBDIR or the default paths
>> compiled into the pkg-config binary.
>>
>> Currently we set PKG_CONFIG_PATH to (approx.) ${libdir}:${datadir} and
>> PKG_CONFIG_LIBDIR to ${libdir}, so we search libdir twice.
>>
>> Also the default paths embedded in the binary will be incorrect as they
>> point to pkgconfig-native's sysroot, so we absolutely need to set
>> PKG_CONFIG_LIBDIR.
>>
>> Instead, set PKG_CONFIG_LIBDIR to ${libdir}:${datadir} so that the
>> default search path is correct. We can then leave PKG_CONFIG_PATH empty,
>> if a recipe has specific needs it can set that but normally it is not
>> needed anymore.
>>
>> Then bubble these changes out to the few places where the variables are
>> used directly:
>>
>> - Kernel/kconfig interaction where 'pkg-config' needs to read the
>> native files, not target.
>>
>> - The class classes (native, etc) which redefine the values.  However,
>> as the values are defined in terms of sysroot variables, we can
>> typically remove assignments from those classes as they are redundant.
>>
>> Signed-off-by: Ross Burton <ross.burton@arm.com>
>> ---
>
> Hi Ross,
>
> This patch is almost fine on the autobuilder, with one little exception:
> it breaks runtime_test.TestImage.test_testimage_virgl_gtk_sdl on some
> hosts. Or to go further, when qemu-system-native is compiled with "gtk+"
> PACKAGECONFIG, the it will have a dependency on host glib version and
> might complain it is too old:
>
> ERROR: qemu-system-native-10.2.0-r0 do_configure: Execution of '/srv/pokybuild/yocto-worker/oe-selftest-debian/build/build-st-2977320/tmp/work/x86_64-linux/qemu-system-native/10.2.0/temp/run.do_configure.845525' failed with exit code 1
> ...
> | ../sources/qemu-10.2.0/meson.build:1951:8: ERROR: Dependency lookup for gtk+-3.0 with method 'pkgconfig' failed: Could not generate cflags for gtk+-3.0:
> | Package 'pango' requires 'glib-2.0 >= 2.82' but version of glib-2.0 is 2.66.8
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3105
>
> This can be reproduced by either running
> runtime_test.TestImage.test_testimage_virgl_gtk_sdl selftest, or just
> building qemu-system-native with:
> PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
>
> Can you have a look at what is going wrong here?
>
> Thanks,
> Mathieu

Hi Ross,

I note this is also breaking meta-intel builds:

ERROR: libvpl-2.14.0-r0 do_configure: Execution of '/srv/pokybuild/yocto-worker/meta-intel/build/build/tmp/work/corei7-64-poky-linux/libvpl/2.14.0/temp/run.do_configure.2633134' failed with exit code 1
...
| -- Checking for module 'libva>=1.2'
| --   No package 'libva' found
| -- Checking for module 'libva-drm>=1.2'
| --   No package 'libva-drm' found
| CMake Error at examples/api2x/hello-vpp/CMakeLists.txt:78 (message):
|   libva not found: set LIBVA_SUPPORT=OFF to build hello-vpp without libva
|   support

https://autobuilder.yoctoproject.org/valkyrie/#/builders/41/builds/2937

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2026-01-29  6:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 18:04 [PATCH 0/8] Rationalise the pkg-config variables Ross Burton
2026-01-23 18:04 ` [PATCH 1/8] pkgconfig: inherit the pkgconfig class Ross Burton
2026-01-23 18:04 ` [PATCH 2/8] perf: " Ross Burton
2026-01-23 18:04 ` [PATCH 3/8] python3-numpy: backport a Meson patch to fix pkg-config lookups Ross Burton
2026-01-23 18:04 ` [PATCH 4/8] classes/pkgconfig: move variable exports to the class Ross Burton
2026-01-23 18:04 ` [PATCH 5/8] classes/pkgconfig: rationalise variable usage Ross Burton
2026-01-28 13:30   ` [OE-core] " Mathieu Dubois-Briand
2026-01-29  6:17     ` Mathieu Dubois-Briand [this message]
2026-02-06 10:29       ` Ross Burton
2026-01-23 18:04 ` [PATCH 6/8] pkgconf: small cleanups Ross Burton
2026-01-23 18:04 ` [PATCH 7/8] pkgconf: add pkg-config-native to the nativesdk package Ross Burton
2026-01-23 18:04 ` [PATCH 8/8] kernel: remove pkg-config variables for old (<5.15) kernels Ross Burton
2026-01-23 18:07 ` [OE-core] [PATCH 0/8] Rationalise the pkg-config variables Ross Burton

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=DG0URCTB99Y6.27GWCKK8DHC5T@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@arm.com \
    /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