Bug 15007 - nativesdk-pkgconfig doesn't work
Summary: nativesdk-pkgconfig doesn't work
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.2 M2
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2023-01-13 14:32 UTC by Richard Purdie
Modified: 2023-02-09 16:02 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2023-01-13 14:32:17 UTC
If you try and use pkg-config from buildtools-tarball, you find it is searching host paths:

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> strace -f pkg-config --variable=dridriverdir dri

will show it searched:

/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

We'll need to set PKG_CONFIG_PATH to search the sysroot, then the host locations within the SDK environment.
Comment 1 Ross Burton 2023-01-19 15:51:47 UTC
Note that when this is resolved we should be able to revert "selftest/virgl: use pkg-config from the host".
Comment 2 Ross Burton 2023-01-19 17:06:52 UTC
Reproducer: install buildtools tarball, source the env, run "pkg-config --cflags drm".  The search path is "suboptimal".
Comment 3 Ross Burton 2023-01-20 12:49:57 UTC
buildtools-tarball-extended, that is.  Normal buildtools has no pkgconfig.
Comment 4 Ross Burton 2023-01-26 14:36:49 UTC
Patch on the list to add PKG_CONFIG_LIBDIR to the buildtools environment script.
Comment 5 Ross Burton 2023-02-09 16:02:15 UTC
Fixed in 8f768a3f4c7ff477e994d60800e5a1b83891615a.