Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake cannot find PkgConfig on windows-latest images after the 20240407 update #9693

Closed
3 of 13 tasks
GregDomzalski opened this issue Apr 15, 2024 · 4 comments
Closed
3 of 13 tasks

Comments

@GregDomzalski
Copy link

Description

Our builds have suddenly started failing once the 20240407 Windows image update was pushed. Things were working fine on the 20240403 build.

I've filed an issue with vcpkg as well, in case it is their issue. However I have looked at the diffs between the commits used by each image and saw nothing that jumped out at me. microsoft/vcpkg#38200

The build that succeeded has a mention of Strawberry Perl:

-- Found PkgConfig: C:/Strawberry/perl/bin/pkg-config.bat (found version "0.26")

This does not exist in the failed logs from 20240407 builds.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240407.1.0

Is it regression?

Yes; 20240403.1.0

Expected behavior

PkgConfig is found and the CMake / vcpkg build can complete.

Actual behavior

CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.29/Modules/FindPkgConfig.cmake:114 (find_package_handle_standard_args)
  C:/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package)
  CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!

Repro steps

Please see repro steps in the linked vcpkg issue: microsoft/vcpkg#38200

@MaksimZhukov
Copy link
Contributor

Hello @GregDomzalski!
Thank you for reporting the problem!
Is it possible for you to provide a link to the public repository where the issue occurs?

@GregDomzalski
Copy link
Author

Thanks for your replies. As this was originally from a private repository, it took me a little time to build a minimal repro.

Repro repository here: https://github.com/GregDomzalski/vcpkg-github-repro-20240407

A failed build run is here: https://github.com/GregDomzalski/vcpkg-github-repro-20240407/actions/runs/8710631351/job/23892943452

It looks to be specific to the *-windows-static triplets. I was unable to reproduce it with just x64-windows, for example - as seen here: https://github.com/GregDomzalski/vcpkg-github-repro-20240407/actions/runs/8709845222/job/23890424011

Both runs are on the new 20240414 GitHub Actions runner image with CMake 3.29.2...

It's unclear to me where the issue really is. All that I know was that things were working on the 20240403 build. Now they are not working 😄. I'm sure it's not the image itself per-se and probably a newer version of "something" that got pulled in. But I figured I would post this here for visibility and any help/ideas for narrowing the issue down.

@sergei-pyshnoi
Copy link
Contributor

Hello @GregDomzalski . We do not installing PkgConfig on windows images by itself. Only like dependence for other packages. Also Its kind weird situation when find_package(PkgConfig REQUIRED) finds PkgConfig in perl dir. Anyway, as workaround you can download and install PkgConfig in runtime. For example using for it choco install pkgconfiglite . Here is your repro with successful build.

@GregDomzalski
Copy link
Author

Thanks for reporting a workaround. I can fall back on this for the time being. It's looking like this may be an issue contained within the vcpkg ecosystem now that I've ruled out the CMake version and this can be reproduced outside of GitHub Actions.

Given this, I'm going to close this issue as it does not seem related to the runner image specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants