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

find_program to find pkg-config use REQUIRED #12662

Closed
mllw opened this issue Jul 31, 2020 · 2 comments
Closed

find_program to find pkg-config use REQUIRED #12662

mllw opened this issue Jul 31, 2020 · 2 comments
Assignees
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@mllw
Copy link

mllw commented Jul 31, 2020

Describe the bug
A clear and concise description of what the bug is.

Environment

  • OS: Windows
  • Compiler: Visual studio 2019

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install boost
  2. See error
    Additional packages (*) will be modified to complete this operation.
    Detecting compiler hash for triplet x86-windows...
    Starting package 1/90: bzip2:x86-windows
    Building package bzip2[core]:x86-windows...
    Could not locate cached archive: C:\Users\sp\AppData\Local\vcpkg\archives\ca\ca870ac55962fdf2d70d629065a53de5e6be0169.zip
    -- Using cached E:/github/cxx/vcpkg/downloads/bzip2-1.0.6.tar.gz
    -- Cleaning sources at E:/github/cxx/vcpkg/buildtrees/bzip2/src/1.0.6-8838f21f8e.clean. Use --editable to skip cleaning for the packages you specify.
    -- Extracting source E:/github/cxx/vcpkg/downloads/bzip2-1.0.6.tar.gz
    -- Applying patch fix-import-export-macros.patch
    -- Applying patch fix-windows-include.patch
    -- Using source at E:/github/cxx/vcpkg/buildtrees/bzip2/src/1.0.6-8838f21f8e.clean
    -- Configuring x86-windows
    -- Building x86-windows-dbg
    -- Building x86-windows-rel
    -- Fixing pkgconfig
    CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:279 (find_program):
    Could not find PKGCONFIG using the following names: pkg-config
    Call Stack (most recent call first):
    ports/bzip2/portfile.cmake:51 (vcpkg_fixup_pkgconfig)
    scripts/ports.cmake:79 (include)

Error: Building package bzip2:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: bzip2:x86-windows
Vcpkg version: 2020.06.15-nohash

Additionally, attach any relevant sections from the log files above.

at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:279
find_program(PKGCONFIG pkg-config PATHS "bin" "/usr/bin" "/usr/local/Cellar/pkg-config/0.29.2_3" REQUIRED)

use REQUIRED will not goto vcpkg_acquire_msys to get msys

if(NOT PKGCONFIG)
find_program(PKGCONFIG pkg-config PATHS "bin" "/usr/bin" "/usr/local/Cellar/pkg-config/0.29.2_3" REQUIRED)
if(NOT PKGCONFIG AND CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES pkg-config)
find_program(PKGCONFIG pkg-config PATHS "${MSYS_ROOT}/usr/bin" REQUIRED)
endif()
debug_message("Using pkg-config from: ${PKGCONFIG}")
if(NOT PKGCONFIG AND NOT _vfpkg_SKIP_CHECK)
message(WARNING "Unable to find pkg-config to validate *.pc files. Skipping checkes!")
set(_vfpkg_SKIP_CHECK TRUE)
endif()
endif()

@GuacoIV
Copy link

GuacoIV commented Jul 31, 2020

I just got the same error trying to install cairo...following!

@PhoebeHui PhoebeHui added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Jul 31, 2020
@PhoebeHui PhoebeHui self-assigned this Jul 31, 2020
@PhoebeHui
Copy link
Contributor

This issue would be fixed by PR #12569.

Close this issue as duplicate to #12565.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

No branches or pull requests

3 participants