I also stumbled over this issue. In my opinion setting PKG_CONFIG_PATH is wrong for two reasons: * it overwrites the PKG_CONFIG_PATH from the environment * it makes pkg-config still search the non-cross-compile default paths
So for example if I want to cross-compile for mingw-w64 and do not have a cross-compiled version of "libsndfile" but a native version, calling "x86_64-w64-mingw32-pkg-config sndfile ..." will return the info for the native library and compilation will fail at a later step. My suggested fix would be to use PKG_CONFIG_LIBDIR instead, see attached file "pkg-config-crosswrapper.patch" and https://bugs.freedesktop.org/show_bug.cgi?id=3093 ** Bug watch added: freedesktop.org Bugzilla #3093 https://bugs.freedesktop.org/show_bug.cgi?id=3093 ** Patch added: "pkg-config-crosswrapper.patch" https://bugs.launchpad.net/ubuntu/+source/pkg-config/+bug/1352230/+attachment/4508318/+files/pkg-config-crosswrapper.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1352230 Title: PKG_CONFIG_PATH in pkg-config-crosswrapper To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pkg-config/+bug/1352230/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs