Vcpkg: Building package openssl-windows:x64-windows failed with: BUILD_FAILED

Created on 29 Jul 2018  Β·  11Comments  Β·  Source: microsoft/vcpkg

Hello. I just installed vcpkg and got an error. I have win8.1 with new-ish updates installed, ru-ru locale. Installed english visual studio english package when prompted to. Using VS 2017 Community.

It may be relevant that I got

Error: failed to copy targets file to C:\Program Files (x86)\MSBuild\Microsoft.C
pp\v4.0\V140\ImportBefore\Default\vcpkg.system.props

when trying to do .\vcpkg integrate install, which I manually fixed by creating a vcpkg.system.props folder in the correct path. Am I genius or what?

The issue is that when I try to run a command .\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows, i get this error, the relevant portion of which is:

CMake Error at scripts/cmake/vcpkg_copy_pdbs.cmake:62 (file):
  file COPY cannot find
Call Stack (most recent call first):
  ports/openssl-windows/portfile.cmake:154 (vcpkg_copy_pdbs)
  scripts/ports.cmake:71 (include)


Error: 
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: openssl-windows:x64-windows
  Vcpkg version: 0.0.113-nohash

Am I doing stuff wrong? Thanks for your time <3

repro

Most helpful comment

All 11 comments

The whole console dump looks as follows:

C:\Users\Π“Π΅ΠΎΡ€Π³ΠΈΠΉ\Documents\Node.JS\MyCleverProgram\vcpkg>.\vcpkg.exe install openssl:x6
4-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
The following packages will be built and installed:
    openssl[core]:x64-windows
    openssl[core]:x86-windows
  * openssl-windows[core]:x64-windows
  * openssl-windows[core]:x86-windows
    zlib[core]:x64-windows
    zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Starting package 1/6: openssl-windows:x64-windows
Building package openssl-windows[core]:x64-windows...
-- Applying patch failed. This is expected if this patch was previously applied.

-- Applying patch failed. This is expected if this patch was previously applied.

-- Applying patch failed. This is expected if this patch was previously applied.

-- Configure x64-windows-rel
-- Configure x64-windows-rel done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Configure x64-windows-dbg
-- Configure x64-windows-dbg done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
CMake Error at scripts/cmake/vcpkg_copy_pdbs.cmake:62 (file):
  file COPY cannot find
Call Stack (most recent call first):
  ports/openssl-windows/portfile.cmake:154 (vcpkg_copy_pdbs)
  scripts/ports.cmake:71 (include)


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

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

@TorlanDelta ... by creating a vcpkg.system.props folder in the correct path.

vcpkg.system.props is the file, not a folder.

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- version 1 -->
  <PropertyGroup>
    <VCLibPackagePath Condition="'$(VCLibPackagePath)' == ''">$(LOCALAPPDATA)\vcpkg\vcpkg.user</VCLibPackagePath>
  </PropertyGroup>
  <Import Condition="'$(VCLibPackagePath)' != '' and Exists('$(VCLibPackagePath).targets')" Project="$(VCLibPackagePath).targets" />
</Project>

@TorlanDelta Am I genius or what?

Not yet.

There is most probably a problem with your rights to writing in that folder, run the vcpkg integrate install command from an elevated command-prompt.

@degski So I deleted my created vcpkg.system.props folder, tried to run .\vcpkg integrate install again and got same error again, doing it from administrative command line. D:

Below is console dump BEFORE deleting my vcpkg.system props folder:

C:\Users\Π“Π΅ΠΎΡ€Π³ΠΈΠΉ\Documents\Node.JS\MyCleverProgram\vcpkg>.\vcpkg integrate install
Applied user-wide integration for this vcpkg root.

All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Aai?aee/Documents/No
de.JS/MyCleverProgram/vcpkg/scripts/buildsystems/vcpkg.cmake"

and AFTER the deletion:

C:\Users\Π“Π΅ΠΎΡ€Π³ΠΈΠΉ\Documents\Node.JS\MyCleverProgram\vcpkg>.\vcpkg integrate install
Error: failed to copy targets file to C:\Program Files (x86)\MSBuild\Microsoft.C
pp\v4.0\V140\ImportBefore\Default\vcpkg.system.props

what to do D:

C:\Users\Π“Π΅ΠΎΡ€Π³ΠΈΠΉ
CMAKE_TOOLCHAIN_FILE -- C:/Users/Aai?aee/

с ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΠΎΠΉ Ρ‡Ρ‚ΠΎ Ρ‚ΠΎ Π΅Ρ‰Π΅

@Voskrese maybe it is encoding, but what can I do to fix it?

I've located this solution - https://github.com/Microsoft/vcpkg/issues/1548 - but running chcp 65001 makes my cmd.exe stop working apparently - it says "the system cannot write to this device*. Weird.

@TorlanDelta Π½Π° счСт ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΠΈ это ΠΊ слову, Π° Π½Π΅ устанавливаСтся ΠΏΠΎΡ‚ΠΎΠΌΡƒ Ρ‡Ρ‚ΠΎ Π½Π΅ ΠΌΠΎΠΆΠ΅Ρ‚ Π½Π°ΠΉΡ‚ΠΈ Ρ„Π°ΠΉΠ», ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π²ΠΈΠ΄ΠΈΠΌΠΎ Π½Π΅ сформировался
ports/openssl-windows/portfile.cmake:154 (vcpkg_copy_pdbs) - openssl-windows... . ..pdb

Π½Π° счСт vcpkg.system.props
Ρƒ вас стоит MSVC 2017 = 141150, Π° смотритС Π² ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ MSVC 2015 = 140

MSBuildMicrosoft.Cppv4.0V140

Installed vc pkg to another location and now I get this error when trying to run .vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows .

C:\VCSHET\vcpkg>.\vcpkg.exe install openssl:x64-windows openssl:x86-windows zlib
:x64-windows zlib:x86-windows
The following packages will be built and installed:
    openssl[core]:x64-windows
    openssl[core]:x86-windows
  * openssl-windows[core]:x64-windows
  * openssl-windows[core]:x86-windows
    zlib[core]:x64-windows
    zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Starting package 1/6: openssl-windows:x64-windows
Building package openssl-windows[core]:x64-windows...
-- Downloading http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.
1.1-32bit-portable.zip...
-- Downloading http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.
1.1-32bit-portable.zip... Failed. Status: 6;"Couldn't resolve host name"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:151 (message):

      Failed to download file.
      If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
      variables to "https://user:password@your-proxy-ip-address:port/".
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/is
sues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_find_acquire_program.cmake:217 (vcpkg_download_distfile)
  ports/openssl-windows/portfile.cmake:9 (vcpkg_find_acquire_program)
  scripts/ports.cmake:71 (include)


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

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

Ugh q-q

I got this same error due to having Clink autorun installed. Fix by running clink autorun uninstall. At least temporarily.

Hi all, thanks for posting this issue. This port has been updated to 1.0.2q and I can't reproduce it on my machine now with VS 2017. Please feel free to reopen it if this is still a problem for you.

I run into the same issue. I could solve the problem by making 2commands:
REM 64 bit
.vcpkg.exe install openssl:x64-windows zlib:x64-windows
REM 32 bit
REM .vcpkg.exe install openssl zlib:x86-windows

Was this page helpful?
0 / 5 - 0 ratings