ASSUME_PROVIDED and pkg-config-native
Hi,
It seems it's not possible to use pkg-config to find .pc files of all native recipes that are in the ASSUME_PROVIDED list. Is this supposed to work and I'm doing something wrong? I'd appreciate any pointers.
Some background:
I ran into a problem with a recipe using the Meson that had
DEPENDS = "libxcrypt apr-util"
BBCLASSEXTEND = "native"
In the native case, libaprutil.so is linked against host libcrypt.so.1, but this recipe tries to link against libxcrypt.so.2 from libxcrypt-native, causing a conflict.
apr-util does not DEPENDS on virtual/crypt; for target builds, it's pulled in via util-linux. Maybe virtual/crypt should be added to PACKAGECONFIG[crypto], but that's not really the core issue here.
virtual/crypt-native is in ASSUME_PROVIDED. When switching to DEPENDS = "virtual/crypt" Meson's dependency('libxcrypt') can no longer find the .pc file, neither in recipe-sysroot-native nor in /usr/lib/x86_64-linux-gnu/pkgconfig. The pkg-config-native and pkg-config wrappers around pkgconf ensure that system library folders are not searched.
I don't think EXTRA_NATIVE_PKGCONFIG_PATH can be used here. We want the system folders to be searched last, and ideally only for packages listed in ASSUME_PROVIDED. In my case the project depends on several libraries whose options are found using pkg-config. I don't want to accidentaly find a system library for something that is not ASSUME_PROVIDED.
Signature · 1 line
Ola Nilsson
Quoted 4 lines · Ola x Nilsson via lists.openembedded.org
It seems it's not possible to use pkg-config to find .pc files of all native recipes that are in the
ASSUME_PROVIDEDlist. Is this supposed to work and I'm doing something wrong? I'd appreciate any pointers.
It isn't meant to work. The only recipe that has logic to poke into the host's pkgconfig is qemu due to the graphics needs. We ideally keep the needed ASSUME_PROVIDED entries small. Where libraries are needed (e.g. libz), we tend to try and build them ourselves.
Cheers,
Richard