Open jwinarske opened 2 years ago
A work around could be to have Yocto meson.bbclass generate a wrapper script similar to Example 4.4 in this link: https://autotools.io/pkgconfig/cross-compiling.html
As Yocto currently points to bare pkg-config, and PKG_CONFIG_SYSROOT_DIR is ignored.
Regardless of the potential workaround, meson should properly honor/pass PKG_CONFIG* variables to pkg-config.
Narrowed down pkg-config
versus pkgconfig
behavior. Yocto currently uses pkg-config
for building.
STAGING_DIR_TARGET=/b/github-ci/_work/meta-flutter/rpi4-drm-honister-latest/raspberrypi4-64/tmp/work/cortexa72-poky-linux/vkmark/git-r0/recipe-sysroot
Using pkgconfig 0.29.2
$ PKG_CONFIG_SYSROOT_DIR=$STAGING_DIR_TARGET /home/linuxbrew/.linuxbrew/bin/pkg-config --variable=includedir glesv2
/usr/include
Using pkg-config 1.7.3
PKG_CONFIG_SYSROOT_DIR=$STAGING_DIR_TARGET /usr/bin/pkg-config --variable=includedir glesv2
/b/github-ci/_work/meta-flutter/rpi4-drm-honister-latest/raspberrypi4-64/tmp/work/cortexa72-poky-linux/vkmark/git-r0/recipe-sysroot/usr/include
https://gitlab.freedesktop.org/pkg-config/pkg-config https://github.com/pkgconf/pkgconf
What flavor is used for meson cross compilation validation?
So this works correctly if you use pkgconf
, and it is broken if you use the freedesktop pkg-config
?
I just confirmed Yocto is using pkg-config
.
I haven't isolated between the two yet. Behavior difference was just discovered today.
That said I would only expect the freedesktop flavor to work correctly based on example above, as the pkgconf flavor ignores PKG_CONFIG_SYSROOT_DIR.
Discussed in https://github.com/mesonbuild/meson/discussions/9673
PKGCONFIG* variables are not being exposed to
pkg-config
.