Skip to content

FindPkgConfig not found with empty reason when strawberry perl is in PATH on Windows

Here's the exact error message

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
    Reason given by package: The command
      "C:/strawberry/perl/bin/pkg-config" --version
    failed with output

I have a change ready that enhances the error output, which will end up showing:

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
    Reason given by package: The command
      "C:/strawberry/perl/bin/pkg-config" --version
    failed with output:

    stderr:

    result:
%1 is not a valid Win32 application

The failure is related to #16453 where a non-bat file ends up being found instead of the bat file.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information