Email from Richard: We've been seeing AB failures like: https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/2103 which looks like dri needs to be installed on the host but the problem is in fact buildtools. Taking the opensuse154-ty-2 worker where this failed: rpurdie@opensuse154-ty-2:~> pkg-config --variable=dridriverdir dri /usr/lib64/dri but using buildtools: pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build> source buildtools/environment-setup-x86_64-pokysdk-linux pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build> pkg-config --variable=dridriverdir dri Package dri was not found in the pkg-config search path. Perhaps you should add the directory containing `dri.pc' to the PKG_CONFIG_PATH environment variable No package 'dri' found pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build> which pkg-config /home/pokybuild/yocto-worker/oe-selftest/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/bin/pkg-config which means the pkg-config from buildtools isn't falling back to host pc files. We should be able to set PKG_CONFIG_PATH in the sdk to account for this, e.g.: pokybuild@opensuse154-ty-2:~/yocto-worker/oe-selftest/build> PKG_CONFIG_PATH=/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/lib/pkgconfig:/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/share/pkgconfig:/usr/lib64/pkgconfig/ pkg-config dri --variable=dridriverdir /usr/lib64/dri the hard part is figuring out which paths the host pkg-config uses.
https://autobuilder.yoctoproject.org/typhoon/#builders/56/builds/2103/steps/15/logs/stdio oe-selftest opensuse154-ty-2 https://autobuilder.yoctoproject.org/typhoon/#builders/56/builds/2094/steps/15/logs/stdio oe-selftest opensuse154-ty-2 2023-01-12 02:10:06,477 - oe-selftest - INFO - FAIL: runtime_test.TestImage.test_testimage_virgl_headless (subunit.RemotedTestCase) 2023-01-12 02:10:06,478 - oe-selftest - INFO - ---------------------------------------------------------------------- 2023-01-12 02:10:06,478 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oeqa/selftest/cases/runtime_test.py", line 271, in test_testimage_virgl_headless dripath = subprocess.check_output("pkg-config --variable=dridriverdir dri", shell=True) File "/home/pokybuild/yocto-worker/oe-selftest/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.10/subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/pokybuild/yocto-worker/oe-selftest/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'pkg-config --variable=dridriverdir dri' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-worker/oe-selftest/build/meta/lib/oeqa/selftest/cases/runtime_test.py", line 273, in test_testimage_virgl_headless self.fail("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.") File "/home/pokybuild/yocto-worker/oe-selftest/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.10/unittest/case.py", line 675, in fail raise self.failureException(msg) AssertionError: Could not determine the path to dri drivers on the host via pkg-config. Please install Mesa development files (particularly, dri.pc) on the host machine.
Patch: https://lists.openembedded.org/g/openembedded-core/message/175802
I also filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=15007 for the bug in nativesdk-pkgconfig
https://git.yoctoproject.org/poky/commit/?id=c7cbde198b92973e325c66247ef1d514a5e31eeb