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

Library "zlibd" was not found! #12788

Closed
OlafvdSpek opened this issue Aug 6, 2020 · 13 comments
Closed

Library "zlibd" was not found! #12788

OlafvdSpek opened this issue Aug 6, 2020 · 13 comments
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@OlafvdSpek
Copy link
Contributor

PS C:\vc\vcpkg> ./vcpkg install zlib
Computing installation plan...
The following packages will be built and installed:
    zlib[core]:x86-windows
Detecting compiler hash for triplet x86-windows...
Starting package 1/1: zlib:x86-windows
Building package zlib[core]:x86-windows...
Could not locate cached archive: C:\Users\Olaf\AppData\Local\vcpkg\archives\a1\a15cdec8d3dea69fbc5b4d54212ae3606a67762a.zip
-- Using cached C:/vc/vcpkg/downloads/zlib1211.tar.gz
-- Cleaning sources at C:/vc/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vc/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Using source at C:/vc/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Fixing pkgconfig
-- Acquiring MSYS Packages...
-- Acquiring MSYS Packages... OK
-- Fixing pkgconfig - release
-- Checking file: C:/vc/vcpkg/packages/zlib_x86-windows/lib/pkgconfig/zlib.pc
-- Fixing pkgconfig - debug
-- Checking file: C:/vc/vcpkg/packages/zlib_x86-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:348 (vcpkg_fixup_pkgconfig_check_files)
  ports/zlib/portfile.cmake:46 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:79 (include)


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

Additionally, attach any relevant sections from the log files above.
@PhoebeHui
Copy link
Contributor

@OlafvdSpek, thanks for reporting this issue!

Could you attached the zlib.pc for debug and release? I encountered simimar issue, I want to confirm if it's same issue.

@JackBoosY
Copy link
Contributor

JackBoosY commented Aug 7, 2020

Should be fixed by #12774.
Can you test that PR?

Thanks.

@JackBoosY JackBoosY added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Aug 7, 2020
@OlafvdSpek
Copy link
Contributor Author

// C:/vc/vcpkg/packages/zlib_x86-windows/debug/lib/pkgconfig/zlib.pc
prefix=C:/VC/vcpkg/packages/zlib_x86-windows/debug
exec_prefix=C:/VC/vcpkg/packages/zlib_x86-windows/debug
libdir=C:/VC/vcpkg/packages/zlib_x86-windows/lib
sharedlibdir=C:/VC/vcpkg/packages/zlib_x86-windows/lib
includedir=C:/VC/vcpkg/packages/zlib_x86-windows/../include

Name: zlib
Description: zlib compression library
Version: 1.2.11

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

C:/vc/vcpkg/packages/zlib_x86-windows/release doesn't exist

@JackBoosY
Copy link
Contributor

@OlafvdSpek She means C:/vc/vcpkg/packages/zlib_x86-windows/debug/lib/pkgconfig/zlib.pc and C:/vc/vcpkg/packages/zlib_x86-windows/lib/pkgconfig/zlib.pc .

@OlafvdSpek
Copy link
Contributor Author

OlafvdSpek commented Aug 7, 2020

PS C:\vc\vcpkg> git fetch origin pull/12774/head:pr12774
remote: Enumerating objects: 80, done.
remote: Counting objects: 100% (80/80), done.
remote: Total 88 (delta 79), reused 80 (delta 79), pack-reused 8
Unpacking objects: 100% (88/88), 13.05 KiB | 24.00 KiB/s, done.
From https://github.com/microsoft/vcpkg
 * [new ref]             refs/pull/12774/head -> pr12774
PS C:\vc\vcpkg> git checkout pr12774
Switched to branch 'pr12774'
PS C:\vc\vcpkg> .\bootstrap-vcpkg.bat
PS C:\vc\vcpkg> ./vcpkg install zlib
Computing installation plan...
The following packages will be built and installed:
    zlib[core]:x86-windows
Detecting compiler hash for triplet x86-windows...
Starting package 1/1: zlib:x86-windows
Building package zlib[core]:x86-windows...
Could not locate cached archive: C:\Users\Olaf\AppData\Local\vcpkg/archives\a1\a15cdec8d3dea69fbc5b4d54212ae3606a67762a.zip
-- Using cached C:/vc/vcpkg/downloads/zlib1211.tar.gz
-- Cleaning sources at C:/vc/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vc/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Using source at C:/vc/vcpkg/buildtrees/zlib/src/1.2.11-deec42f53b.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Fixing pkgconfig
-- Acquiring MSYS Packages...
-- Acquiring MSYS Packages... OK
-- Fixing pkgconfig - release
-- Checking file: C:/vc/vcpkg/packages/zlib_x86-windows/lib/pkgconfig/zlib.pc
-- Fixing pkgconfig - debug
-- Checking file: C:/vc/vcpkg/packages/zlib_x86-windows/debug/lib/pkgconfig/zlib.pc
-- CHECK_LIB_zlibd_DEBUG:CHECK_LIB_zlibd_DEBUG-NOTFOUND
CMake Error at F:/VC/vcpkg/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):
  F:/VC/vcpkg/scripts/cmake/vcpkg_fixup_pkgconfig.cmake:348 (vcpkg_fixup_pkgconfig_check_files)
  F:/VC/vcpkg/ports/zlib/portfile.cmake:46 (vcpkg_fixup_pkgconfig)
  F:/VC/vcpkg/scripts/ports.cmake:79 (include)


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

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

F:/VC/vcpkg/scripts/cmake/vcpkg_fixup_pkgconfig.cmake:239

c:\vc is a link to f:\vc, could this be an issue? It worked before..

@OlafvdSpek
Copy link
Contributor Author

@OlafvdSpek She means C:/vc/vcpkg/packages/zlib_x86-windows/debug/lib/pkgconfig/zlib.pc and C:/vc/vcpkg/packages/zlib_x86-windows/lib/pkgconfig/zlib.pc .

// C:\VC\vcpkg\packages\zlib_x86-windows\lib\pkgconfig\zlib.pc
prefix=C:/VC/vcpkg/packages/zlib_x86-windows
exec_prefix=C:/VC/vcpkg/packages/zlib_x86-windows
libdir=C:/VC/vcpkg/packages/zlib_x86-windows/lib
sharedlibdir=C:/VC/vcpkg/packages/zlib_x86-windows/lib
includedir=C:/VC/vcpkg/packages/zlib_x86-windows/include

Name: zlib
Description: zlib compression library
Version: 1.2.11

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

@JackBoosY
Copy link
Contributor

I wish #12703 will fix this issue.

@PhoebeHui
Copy link
Contributor

PhoebeHui commented Aug 7, 2020

@OlafvdSpek, could you change the F:\VC to F:\vc and see if this issue still repro? It looks same issue with #12709 , when I change the path to lowercase, it works.

@OlafvdSpek
Copy link
Contributor Author

PS F:\> mkdir B

PS F:\> cd B

PS F:\B> git clone https://github.com/microsoft/vcpkg

PS F:\B> cd vcpkg

PS F:\B\vcpkg> .\bootstrap-vcpkg.bat

PS F:\B\vcpkg> ./vcpkg install zlib

This works so it's not just uppercase that's the issue.

PS F:\> mkdir B


    Directory: F:\


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----          8/7/2020   9:38 AM                B


PS F:\> cd B
PS F:\B> git clone https://github.com/microsoft/vcpkg
Cloning into 'vcpkg'...
remote: Enumerating objects: 48, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 85444 (delta 13), reused 2 (delta 0), pack-reused 85396
Receiving objects: 100% (85444/85444), 25.26 MiB | 16.31 MiB/s, done.
Resolving deltas: 100% (53004/53004), done.
Updating files: 100% (5189/5189), done.
PS F:\B> cd vcpkg
PS F:\B\vcpkg> .\bootstrap-vcpkg.bat

Building vcpkg.exe ...

  pch.cpp
  archives.cpp
  checks.cpp
  chrono.cpp
  cofffilereader.cpp
  downloads.cpp
  enums.cpp
  files.cpp
  hash.cpp
  json.cpp
  machinetype.cpp
  parse.cpp
  strings.cpp
  stringview.cpp
  system.cpp
  system.print.cpp
  system.process.cpp
  unicode.cpp
  binarycaching.cpp
  binaryparagraph.cpp
  build.cpp
  buildenvironment.cpp
  cmakevars.cpp
  commands.autocomplete.cpp
  commands.buildexternal.cpp
  commands.cache.cpp
  commands.ci.cpp
  commands.ciclean.cpp
  commands.contact.cpp
  commands.cpp
  commands.create.cpp
  commands.dependinfo.cpp
  commands.edit.cpp
  commands.env.cpp
  commands.fetch.cpp
  commands.format-manifest.cpp
  commands.hash.cpp
  commands.integrate.cpp
  commands.list.cpp
  commands.owns.cpp
  commands.porthistory.cpp
  commands.portsdiff.cpp
  commands.search.cpp
  commands.setinstalled.cpp
  commands.upgrade.cpp
  commands.version.cpp
  commands.xvsinstances.cpp
  dependencies.cpp
  export.cpp
  export.chocolatey.cpp
  export.ifw.cpp
  export.prefab.cpp
  globalstate.cpp
  help.cpp
  input.cpp
  install.cpp
  platform-expression.cpp
  metrics.cpp
  packagespec.cpp
  paragraphparseresult.cpp
  paragraphs.cpp
  portfileprovider.cpp
  postbuildlint.buildtype.cpp
  postbuildlint.cpp
  remove.cpp
  sourceparagraph.cpp
  statusparagraph.cpp
  statusparagraphs.cpp
  tools.cpp
  triplet.cpp
  update.cpp
  userconfig.cpp
  vcpkgcmdarguments.cpp
  vcpkglib.cpp
  vcpkgpaths.cpp
  versiont.cpp
  visualstudio.cpp
  vcpkglib.vcxproj -> F:\B\vcpkg\toolsrc\windows-bootstrap\msbuild.x86.release\vcpkglib.lib
  vcpkg.cpp
  Generating code
  Previous IPDB not found, fall back to full compilation.
  All 19723 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
  Finished generating code
  vcpkg.vcxproj -> F:\B\vcpkg\toolsrc\windows-bootstrap\msbuild.x86.release\vcpkg.exe
  vcpkgmetricsuploader.cpp
  Generating code
  Previous IPDB not found, fall back to full compilation.
  All 9232 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
  Finished generating code
  vcpkgmetricsuploader.vcxproj -> F:\B\vcpkg\toolsrc\windows-bootstrap\msbuild.x86.release\vcpkgmetricsuploader.exe

Building vcpkg.exe... done.

Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.

Read more about vcpkg telemetry at docs/about/privacy.md
PS F:\B\vcpkg> ./vcpkg install zlib
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
A suitable version of cmake was not found (required v3.17.2). Downloading portable cmake v3.17.2...
Downloading cmake...
  https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-win32-x86.zip -> F:\B\vcpkg\downloads\cmake-3.17.2-win32-x86.zip
Extracting cmake...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> F:\B\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
A suitable version of nuget was not found (required v5.5.1). Downloading portable nuget v5.5.1...
Downloading nuget...
  https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe -> F:\B\vcpkg\downloads\22ea847d-nuget.exe
The following packages will be built and installed:
    zlib[core]:x86-windows
Detecting compiler hash for triplet x86-windows...
A suitable version of powershell-core was not found (required v6.2.1). Downloading portable powershell-core v6.2.1...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip -> F:\B\vcpkg\downloads\PowerShell-6.2.1-win-x86.zip
Extracting powershell-core...
Starting package 1/1: zlib:x86-windows
Building package zlib[core]:x86-windows...
Using cached binary package: C:\Users\Olaf\AppData\Local\vcpkg\archives\a1\a15cdec8d3dea69fbc5b4d54212ae3606a67762a.zip
Building package zlib[core]:x86-windows... done
Installing package zlib[core]:x86-windows...
Installing package zlib[core]:x86-windows... done
Elapsed time for package zlib:x86-windows: 148.7 ms

Total elapsed time: 10.1 s

The package zlib is compatible with built-in CMake targets:

    find_package(ZLIB REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

PS F:\B\vcpkg>

@PhoebeHui
Copy link
Contributor

yes, it's same issue, thanks for your updates!

Close this issue as duplicate to #12709, we will use that issue to track.

@OlafvdSpek
Copy link
Contributor Author

Was a fix merged? I can't repro this anymore after a fresh clone.

@PhoebeHui
Copy link
Contributor

@OlafvdSpek, no, I still repro this issue with latest source, it's not due to the uppercase. I think you could repro this issue in your path F:\VC with latest vcpkg source.

@OlafvdSpek
Copy link
Contributor Author

What is the cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

3 participants