Host Environment
To Reproduce
Steps to reproduce the behavior:
vcpkg install boringssl:x86-windows
Failure logs
-- Using cached D:/vcpkg/downloads/google-boringssl-5902657734e2a796a514731e0fd0e80081ae43dc.tar.gz
-- Cleaning sources at D:/vcpkg/buildtrees/boringssl/src/0081ae43dc-6a46c5d035.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/vcpkg/downloads/google-boringssl-5902657734e2a796a514731e0fd0e80081ae43dc.tar.gz
-- Applying patch 0001-vcpkg.patch
-- Using source at D:/vcpkg/buildtrees/boringssl/src/0081ae43dc-6a46c5d035.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: D:/vcpkg/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
Working Directory: D:/vcpkg/buildtrees/boringssl/x86-windows-dbg
See logs for more information:
D:\vcpkg\buildtrees\boringssl\install-x86-windows-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/boringssl/portfile.cmake:45 (vcpkg_install_cmake)
scripts/ports.cmake:76 (include)
Error: Building package boringssl: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: boringssl:x86-windows
Vcpkg version: 2020.06.15-nohash
Additional context
boringssl:x64-windows is work
@ZdDroid Thanks for reporting this issue!
Could you please provide the failure logs?
Thanks.
I have the same problem building boringssl.
I am using Build Tools 16.7.1 MSVC v142 (v14.27)
vcpkg install boringssl:x64-windows-static
Package: boringssl:x64-windows-static
Vcpkg version: 2020.06.15-nohash
Last log entry is:
[416/434] C:\PROGRA~2\BUILDT~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x64\cl.exe /TP -DBORINGSSL_DISPATCH_TEST -DBORINGSSL_IMPLEMENTATION -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-6a46c5d035.clean\third_party\googletest\include -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-6a46c5d035.clean\ssl\..\include -utf-8 -Wall -WX -wd4061 -wd4100 -wd4127 -wd4200 -wd4204 -wd4221 -wd4242 -wd4244 -wd4267 -wd4371 -wd4388 -wd4296 -wd4350 -wd4365 -wd4389 -wd4464 -wd4510 -wd4512 -wd4514 -wd4548 -wd4610 -wd4623 -wd4625 -wd4626 -wd4628 -wd4668 -wd4706 -wd4710 -wd4711 -wd4800 -wd4820 -wd5026 -wd5027 -wd5045 -w44265 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /showIncludes /Fossl\CMakeFiles\ssl_test.dir\ssl_test.cc.obj /Fdssl\CMakeFiles\ssl_test.dir\ /FS -c C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-6a46c5d035.clean\ssl\ssl_test.cc
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
ninja: build stopped: subcommand failed.
@dimdin Could you provide the full log and Visual Studio version?
Thanks.
Thank you very much @JackBoosY for the great job.
I am using Visual Studio Build Tools to Build. Visual Studio Installer displays: _Visual Studio Build Tools 2019 (BuildTools) 16.7.1_
components: _MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.27)
I am running: _.\vcpkg.exe install boringssl:x64-windows-static_
The log file is:
install-x64-windows-static-dbg-out.log
_
The vcpkg command output is:
Computing installation plan...
The following packages will be built and installed:
boringssl[core]:x64-windows-static
Detecting compiler hash for triplet x64-windows-static...
Starting package 1/1: boringssl:x64-windows-static
Building package boringssl[core]:x64-windows-static...
Could not locate cached archive: C:\Users\din\AppData\Local\vcpkg\archives\1d\1d91f483e56af817ea98e3c3aae2122b50997370.zip
-- Using cached C:/Users/din/vcpkg/downloads/google-boringssl-5902657734e2a796a514731e0fd0e80081ae43dc.tar.gz
-- Cleaning sources at C:/Users/din/vcpkg/buildtrees/boringssl/src/0081ae43dc-6a46c5d035.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/din/vcpkg/downloads/google-boringssl-5902657734e2a796a514731e0fd0e80081ae43dc.tar.gz
-- Applying patch 0001-vcpkg.patch
-- Using source at C:/Users/din/vcpkg/buildtrees/boringssl/src/0081ae43dc-6a46c5d035.clean
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:139 (message):
Command failed: C:/Users/din/vcpkg/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
Working Directory: C:/Users/din/vcpkg/buildtrees/boringssl/x64-windows-static-dbg
See logs for more information:
C:\Users\din\vcpkg\buildtrees\boringssl\install-x64-windows-static-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/boringssl/portfile.cmake:45 (vcpkg_install_cmake)
scripts/ports.cmake:79 (include)
Error: Building package boringssl:x64-windows-static 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: boringssl:x64-windows-static
Vcpkg version: 2020.06.15-nohash
Additionally, attach any relevant sections from the log files above.
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-6a46c5d035.clean\decrepit\bio\base64_bio.c(525): error C2220: the following warning is treated as an error
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-6a46c5d035.clean\decrepit\bio\base64_bio.c(525): warning C4065: switch statement contains 'default' but no 'case' labels
Confirmed.
Hi @ZdDroid, could you test my PR #12967?
Thanks.
I applied the patch, and got:
[404/434] C:\PROGRA~2\BUILDT~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x64\cl.exe -DBORINGSSL_DISPATCH_TEST -DBORINGSSL_IMPLEMENTATION -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\third_party\googletest\include -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\..\include -utf-8 -Wall -WX -wd4061 -wd4100 -wd4127 -wd4200 -wd4204 -wd4221 -wd4242 -wd4244 -wd4267 -wd4371 -wd4388 -wd4296 -wd4350 -wd4365 -wd4389 -wd4464 -wd4510 -wd4512 -wd4514 -wd4548 -wd4610 -wd4623 -wd4625 -wd4626 -wd4628 -wd4668 -wd4706 -wd4710 -wd4711 -wd4800 -wd4820 -wd5026 -wd5027 -wd5045 -w44265 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /wx4065 /showIncludes /Fodecrepit\CMakeFiles\decrepit.dir\bio\base64_bio.c.obj /Fddecrepit\CMakeFiles\decrepit.dir\decrepit.pdb /FS -c C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\bio\base64_bio.c
FAILED: decrepit/CMakeFiles/decrepit.dir/bio/base64_bio.c.obj
C:\PROGRA~2\BUILDT~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x64\cl.exe -DBORINGSSL_DISPATCH_TEST -DBORINGSSL_IMPLEMENTATION -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_STL_EXTRA_DISABLED_WARNINGS="4774 4987" -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\third_party\googletest\include -IC:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\..\include -utf-8 -Wall -WX -wd4061 -wd4100 -wd4127 -wd4200 -wd4204 -wd4221 -wd4242 -wd4244 -wd4267 -wd4371 -wd4388 -wd4296 -wd4350 -wd4365 -wd4389 -wd4464 -wd4510 -wd4512 -wd4514 -wd4548 -wd4610 -wd4623 -wd4625 -wd4626 -wd4628 -wd4668 -wd4706 -wd4710 -wd4711 -wd4800 -wd4820 -wd5026 -wd5027 -wd5045 -w44265 /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 /wx4065 /showIncludes /Fodecrepit\CMakeFiles\decrepit.dir\bio\base64_bio.c.obj /Fddecrepit\CMakeFiles\decrepit.dir\decrepit.pdb /FS -c C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\bio\base64_bio.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '/wx4065'
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\bio\base64_bio.c(525): error C2220: the following warning is treated as an error
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-72f74bc822.clean\decrepit\bio\base64_bio.c(525): warning C4065: switch statement contains 'default' but no 'case' labels
Perhaps -wd4065 instead of /wx4065?
@dimdin Oh sorry, you're right!
It builds correctly. But I am trying to figure out how to run the test suite.
found an ssl/ssl_test.exe with 262 tests and all pass.
But I don't think that this is the extended go test suite.
The instructions of ssl/test/README.md guide me to run go test from the ssl/test/runner. Of course when I run it from the sources I am getting:
--- FAIL: TestAll (0.14s)
panic: exec: "../../../build/ssl/test/bssl_shim": file does not exist [recovered]
panic: exec: "../../../build/ssl/test/bssl_shim": file does not exist
Is there some way to run the go test suite? Do I need to combine the sources with the build directory or is there a better way?
I...don't know, maybe we doesn't install that test file.
I found a way. I am describing it here for futures searches.
C:\Users\din\vcpkg\downloads\tools\go\go\bin\go.exe test
0/0/4387/4387/4387
PASS
ok boringssl.googlesource.com/boringssl/ssl/test/runner 43.139s
I am running the go.exe from vcpkg.
The current directory is:
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-e280239335.clean\ssl\test\runner
The folder name after src is random but you can find the correct one from its timestamp.
You need to make the following path by creating build/ssl/test folders.
C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-e280239335.clean\build\ssl\test
And place there a copy of files:
bss_shim.exe
bss_shim.exe.manifest
bss_shim.pdb
from:
C:\Users\din\vcpkg\buildtrees\boringssl\x64-windows-static-rel\ssl\test
The commands to build and run are:
PS C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-e280239335.clean\ssl\test\runner> C:\Users\din\vcpkg\downloads\tools\go\go\bin\go.exe test -c
PS C:\Users\din\vcpkg\buildtrees\boringssl\src\0081ae43dc-e280239335.clean\ssl\test\runner> C:\Users\din\vcpkg\downloads\tools\go\go\bin\go.exe test
0/0/4387/4387/4387
PASS
ok boringssl.googlesource.com/boringssl/ssl/test/runner 43.349s
Running this test suite is essential for a build. Using this kind of library, without running its test suite, is really high risk.
Please consider running the test suites for these kind of libraries (i.e. crypto, compression, protocol parsing) allways when installing using vcpkg install (i.e. by default without a flag).
For boringssl it will take 3 minutes to build instead of 2 and you minimise the risk for broken build systems and faulty patches.
@dimdin Fine, I will add it as a feature, but not by default.
I think it already test it.
From _SOURCE/CMakeLists.txt_ l614:
add_custom_target(
run_tests
COMMAND ${GO_EXECUTABLE} run util/all_tests.go -build-dir
${CMAKE_BINARY_DIR}
COMMAND cd ssl/test/runner &&
${GO_EXECUTABLE} test -shim-path $<TARGET_FILE:bssl_shim>
${HANDSHAKER_ARGS} ${RUNNER_ARGS}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS all_tests bssl_shim handshaker
${MAYBE_USES_TERMINAL})
I cannot believe it, it allready runs the tests when building!
The build problem is solved with your pull request. I am waiting for it to be merged into the master tree.
Thank you very much @JackBoosY