Skip to content

vcpkg_fixup_pkgconfig failed to replace the string when root path contains Upper charactor on windows #12709

@PhoebeHui

Description

@PhoebeHui

vcpkg_fixup_pkgconfig failed to replace the string when the path contains Upper character on windows.

Repro steps:

  1. Git clone https://github.com/microsoft/vcpkg F:\VCPKG\test7
  2. ./bootstrap-vcpkg.bat
  3. ./vcpkg install zlib:x64-windows

Failures:
Starting package 1/1: zlib:x64-windows
Building package zlib[core]:x64-windows...
-- Using cached F:/vcpkg/test7/vcpkg/downloads/zlib1211.tar.gz
-- Cleaning sources at F:/vcpkg/test7/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/vcpkg/test7/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Using source at F:/vcpkg/test7/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig
-- Acquiring MSYS Packages...
-- Acquiring MSYS Packages... OK
-- Fixing pkgconfig - release
-- Checking file: F:/vcpkg/test7/vcpkg/packages/zlib_x64-windows/lib/pkgconfig/zlib.pc
-- Fixing pkgconfig - debug
-- Checking file: F:/vcpkg/test7/vcpkg/packages/zlib_x64-windows/debug/lib/pkgconfig/zlib.pc
-- CHECK_LIB_zlibd_DEBUG:CHECK_LIB_zlibd_DEBUG-NOTFOUND
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:239 (message):
Library "zlibd" was not found! If it is a system library use the
SYSTEM_LIBRARIES parameter for the vcpkg_fixup_pkgconfig call! Otherwise,
correct the *.pc file
Call Stack (most recent call first):
scripts/cmake/vcpkg_fixup_pkgconfig.cmake:351 (vcpkg_fixup_pkgconfig_check_files)
ports/zlib/portfile.cmake:46 (vcpkg_fixup_pkgconfig)
scripts/ports.cmake:79 (include)

Error: Building package zlib:x64-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: zlib:x64-windows
Vcpkg version: 2020.06.15-nohash

More info:

zlib.pc file with debug
prefix=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/debug
exec_prefix=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/debug
libdir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/lib
sharedlibdir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/lib
includedir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/../include

Name: zlib
Description: zlib compression library
Version: 1.2.11

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lzlibd
Cflags: -I${includedir}


zlib.pc file with release
prefix=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows
exec_prefix=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows
libdir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/lib
sharedlibdir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/lib
includedir=F:/VCPKG/test7/vcpkg/packages/zlib_x64-windows/include

Name: zlib
Description: zlib compression library
Version: 1.2.11

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lzlib
Cflags: -I${includedir}

Metadata

Metadata

Labels

category:tool-updateThe issue is with build tool or build script, which requires update or should be executed correctlycategory:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions