Vcpkg: libzip build failure - Applying patch failed!!

Created on 5 Nov 2019  路  6Comments  路  Source: microsoft/vcpkg

Host Environment

  • OS: Windows 10 Pro 1903 (OS Build 18362.449) x64
  • Compiler: VC 2017 v15.9.17 Toolset v141 and VC 2019 16.3.7 Toolset v142

To Reproduce
Steps to reproduce the behavior:
.\vcpkg install libzip[bzip2,core,openssl]:x64-windows

Failure logs
-Cut and past the appropriate build messages from the console output.

The following packages will be built and installed:
libzip[bzip2,core,openssl]:x64-windows
Starting package 1/1: libzip:x64-windows
Building package libzip[bzip2,core,openssl]:x64-windows...
-- Using cached E:/Git/vcpkg.downloads/nih-at-libzip-rel-1-5-2.tar.gz
-- Extracting source E:/Git/vcpkg.downloads/nih-at-libzip-rel-1-5-2.tar.gz
-- Applying patch avoid_computation_on_void_pointer.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:52 (message):
Applying patch failed. Patch needs to be updated to work with source being
used by vcpkg!

Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:134 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:114 (vcpkg_extract_source_archive_ex)
ports/libzip/portfile.cmake:2 (vcpkg_from_github)
scripts/ports.cmake:94 (include)

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

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

-Please attach any additional failure logs mentioned in the console output.
patch-x64-windows-0-err.log

Additional context
No other information.

port-bug

Most helpful comment

@timautry Please unzip this patch and replace it with _VCPKG_PATH/ports/libzip/avoid_computation_on_void_pointer.patch_ :
avoid_computation_on_void_pointer.zip

Thanks.

All 6 comments

Hi @timautry, thanks for reporting this issue.
Sadly, I cannot repro it on my machine. Please update vcpkg with command git pull, remove folder _VCPKG_PATH/buildtrees/libzip/src_ and try to rebuild libzip.

Thanks.

I created a fresh/clean vcpkg, clone from website, bootstrap with -win64 option, and then 'vcpkg install libzip' with the same result.

"GIT" did upgrade itself to v2.24.0-64-bit earlier today.

Here is all the console output - nothing was installed at the time.

SYSTEM@ANDROMEDA 11/04/2019 21:11:42 D:\Git\vs2017
->vcpkg install libzip
The following packages will be built and installed:

bzip2[core]:x64-windows
libzip[bzip2,core,openssl]:x64-windows
openssl[core]:x64-windows
openssl-windows[core]:x64-windows
zlib[core]:x64-windows
Additional packages (*) will be modified to complete this operation.
Starting package 1/5: zlib:x64-windows
Building package zlib[core]:x64-windows...
-- Using cached E:/Git/vcpkg.downloads/zlib1211.tar.gz
-- Extracting source E:/Git/vcpkg.downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Using source at D:/Git/vs2017/buildtrees/zlib/src/1.2.11-f690224aeb
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: D:/Git/vs2017/packages/zlib_x64-windows/share/zlib/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package zlib[core]:x64-windows... done
Installing package zlib[core]:x64-windows...
Installing package zlib[core]:x64-windows... done
Elapsed time for package zlib:x64-windows: 12.33 s
Starting package 2/5: openssl-windows:x64-windows
Building package openssl-windows[core]:x64-windows...
-- Using cached E:/Git/vcpkg.downloads/openssl-1.0.2s.tar.gz
-- Extracting source E:/Git/vcpkg.downloads/openssl-1.0.2s.tar.gz
-- Applying patch ConfigureIncludeQuotesFix.patch
-- Applying patch STRINGIFYPatch.patch
-- Applying patch EnableWinARM32.patch
-- Applying patch EmbedSymbolsInStaticLibsZ7.patch
-- Applying patch EnableWinARM64.patch
-- Using source at D:/Git/vs2017/buildtrees/openssl-windows/src/openssl-1-c41872ef97
-- Copying openssl release source files...
-- Copying openssl release source files... done
-- Configure x64-windows-rel
-- Configure x64-windows-rel done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Copying openssl debug source files...
-- Copying openssl debug source files... done
-- Configure x64-windows-dbg
-- Configure x64-windows-dbg done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
-- Installing: D:/Git/vs2017/packages/openssl-windows_x64-windows/share/openssl-windows/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package openssl-windows[core]:x64-windows... done
Installing package openssl-windows[core]:x64-windows...
Installing package openssl-windows[core]:x64-windows... done
Elapsed time for package openssl-windows:x64-windows: 5.885 min
Starting package 3/5: openssl:x64-windows
Building package openssl[core]:x64-windows...
-- Installing: D:/Git/vs2017/packages/openssl_x64-windows/share/openssl//usage
-- Performing post-build validation
-- Performing post-build validation done
Building package openssl[core]:x64-windows... done
Installing package openssl[core]:x64-windows...
Installing package openssl[core]:x64-windows... done
Elapsed time for package openssl:x64-windows: 31.55 s
Starting package 4/5: bzip2:x64-windows
Building package bzip2[core]:x64-windows...
-- Using cached E:/Git/vcpkg.downloads/bzip2-1.0.6.tar.gz
-- Extracting source E:/Git/vcpkg.downloads/bzip2-1.0.6.tar.gz
-- Applying patch fix-import-export-macros.patch
-- Using source at D:/Git/vs2017/buildtrees/bzip2/src/1.0.6-8d81d2ad2b
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Performing post-build validation
-- Performing post-build validation done
Building package bzip2[core]:x64-windows... done
Installing package bzip2[core]:x64-windows...
Installing package bzip2[core]:x64-windows... done
Elapsed time for package bzip2:x64-windows: 20.31 s
Starting package 5/5: libzip:x64-windows
Building package libzip[bzip2,core,openssl]:x64-windows...
-- Using cached E:/Git/vcpkg.downloads/nih-at-libzip-rel-1-5-2.tar.gz
-- Extracting source E:/Git/vcpkg.downloads/nih-at-libzip-rel-1-5-2.tar.gz
-- Applying patch avoid_computation_on_void_pointer.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:52 (message):
Applying patch failed. Patch needs to be updated to work with source being
used by vcpkg!
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:134 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:114 (vcpkg_extract_source_archive_ex)
ports/libzip/portfile.cmake:2 (vcpkg_from_github)
scripts/ports.cmake:94 (include)
Error: Building package libzip: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: libzip:x64-windows
Vcpkg version: 2019.09.12-nohash

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

@timautry Please unzip this patch and replace it with _VCPKG_PATH/ports/libzip/avoid_computation_on_void_pointer.patch_ :
avoid_computation_on_void_pointer.zip

Thanks.

@JackBoosY Worked fine, was able to install libzip on both VS2017 and VS2019 environments without any issues. Thank you very much for a quick turnaround.

Have a wonderful evening/day!!!

I will close this PR after my PR merge.

Close this issue via #8918 merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pakdel picture pakdel  路  3Comments

oahzuw picture oahzuw  路  3Comments

ThinkalVB picture ThinkalVB  路  3Comments

angelmixu picture angelmixu  路  3Comments

jasjuang picture jasjuang  路  3Comments