Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: The new mingw32-filesystem-119-1.fc35.noarch build has caused a regression in pkg-config, resulting in mangled paths being reported which cause builds to fail I have done a cross compiled mingw32 build of libvirt, installing it into a scratch directory $ export SCRATCH_DIR="/tmp/scratch" $ export VROOT="$SCRATCH_DIR/vroot" $ export LIBDIR="$VROOT/lib" $ meson build -Ddriver_libvirtd=disabled "--prefix=$VROOT" "--libdir=$LIBDIR" $ ninja -C build install I can see the .pc file correctly poiints the the install location: $ cat /tmp/scratch/vroot/lib/pkgconfig/libvirt.pc prefix=/tmp/scratch/vroot exec_prefix=/tmp/scratch/vroot libdir=/tmp/scratch/vroot/lib includedir=/tmp/scratch/vroot/include datarootdir=/tmp/scratch/vroot/share libvirt_api=/tmp/scratch/vroot/share/libvirt/api/libvirt-api.xml # For compat with older versions - also present # in libvirt-qemu.pc / libvirt-lxc.pc libvirt_qemu_api=/tmp/scratch/vroot/share/libvirt/api/libvirt-qemu-api.xml libvirt_lxc_api=/tmp/scratch/vroot/share/libvirt/api/libvirt-lxc-api.xml Name: libvirt Version: 7.5.0 Description: libvirt library Requires: Libs: -L${libdir} -lvirt Cflags: -I${includedir} The vroot also contains my mingw dlls: $ ls /tmp/scratch/vroot/lib libvirt-admin.dll.a libvirt.dll.a libvirt-lxc.dll.a libvirt-qemu.dll.a pkgconfig The PKG_CONFIG_PATH is set to include this custom install location export PKG_CONFIG_PATH="$LIBDIR/pkgconfig" and now I query libvirt: # i686-w64-mingw32-pkg-config --libs --cflags libvirt -I/usr/i686-w64-mingw32/sys-root/mingw/tmp/scratch/vroot/include -L/usr/i686-w64-mingw32/sys-root/mingw/tmp/scratch/vroot/lib -lvirt We can see that i686-w64-mingw32-pkg-config has decided to arbitrarily add extra directory components onto the paths specified in the .pc file Reverting back down to mingw32-filesystem-118-1.fc35.noarch fixes the problem so i686-w64-mingw32-pkg-config actually honours the paths in the .pc file I provide # i686-w64-mingw32-pkg-config --libs --cflags libvirt -I/tmp/scratch/vroot/include -L/tmp/scratch/vroot/lib -lvirt Version-Release number of selected component (if applicable): mingw32-filesystem-119-1.fc35.noarch How reproducible: Always Steps to Reproduce: 1. Do a mingw32 build installing with an arbitrary custom prefix eg. $HOME/mingw32-vroot or whatever - any directory not under the mingw system location of /usr/i686-w64-mingw32/sys-root 2. 3. Actual results: i686-w64-mingw32-pkg-config prefixes all paths from the .pc file, with the system path /usr/i686-w64-mingw32/sys-root Expected results: i686-w64-mingw32-pkg-config should provide the paths *exactly* as listed in the .pc files with no modification. Additional info:
@ngompa13 Can you have a look at this one?
FYI change was this one: https://src.fedoraproject.org/rpms/mingw-filesystem/pull-request/7
This is https://github.com/pkgconf/pkgconf/issues/213
Urgh. So current pkgconf release is known to be seriously broken, and there's no sign of any patches for that bug for 4 months. IMHO we need to either revert this change in mingw-filesystem, or figure out a workaround to fix it until pkgconf upstream deals with it properly. Note this is blocking libvirt CI for mingw currently, since we rely on being able to install stuff into non-system root prefixes.
Gave it a shot in [1], and proposed upstream [2], let's see what the feedback is. [1] https://src.fedoraproject.org/rpms/pkgconf/pull-request/3 [2] https://github.com/pkgconf/pkgconf/pull/226
Fixed in pkgconf-1.7.4-2.fc35.