Vcpkg: cannot bootstrap with vc2015 toolchain

Created on 4 Jun 2020  Â·  13Comments  Â·  Source: microsoft/vcpkg

Describe the bug
bootstrap-vcpkg.bat fails when using vc2015 toolchain

Environment

  • OS: Windows
  • Compiler: vc2015

To Reproduce
Steps to reproduce the behavior:

  1. ./bootstrap-vcpkg.bat
  2. See excerpt from building below

Expected behavior
vcpk.exe is built, per default with Metrics disabled (not the other way around)
...
...
..\src\vcpkg\metrics.cpp(44): error C2127: 'write_byte': illegal initialization of 'constexpr' entity with a non-consta
nt expression [C:\robinmi\vcpkg.new\toolsrc\vcpkglib\vcpkglib.vcxproj]
..\src\vcpkg\metrics.cpp(44): note: failure was caused by evaluating a lambda expression
...
...
bootstrap.ps1 : Building vcpkg.exe failed. Please ensure you have installed Visual Studio
with the Desktop C++ workload and the Windows SDK for Desktop C++.
At line:1 char:4

  • & {& 'C:\robinmi\vcpkg.new\scripts\bootstrap.ps1' }
  • ~~~~~~~~~~

    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap.ps1

Additional context
removing the constexpr (which clearly requires a newer compiler than vc14) helps

vcpkg-bug

Most helpful comment

I solved. I omitted the declaration as a constant and compiled Ok-

On 08/06/2020 09:13, Minh Triet Pham Tran wrote:
>

This problem still exists.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vcpkg/issues/11773#issuecomment-640443423,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANMH3PKCQIFIKMFS3RTQHQ3RVSMSVANCNFSM4NSQVQFA.

All 13 comments

This suggests that we need to add bootstrap with 2015 to our PR/CI system

yes, actually most if not all libraries managed by vcpkg go to a great deal of trouble in trying to support older c++ standards (at least back to 'modern' c++11), which IMHO is the whole point of real world, industrial SW. You simply can't always play around only with new toys, you have to earn money and support decent product lifetimes.

What I'm trying to say: if the library manager as an actually non-critical tool prevents you from using a decent library for your mature (old) compiler, then the manger is kind of missing the point.

Another example would be the hack required on centos 7 even with gcc 7/8 to get bootstrap to work.

Same problem (Windows 10, VC2015)

Same problem Windows 10, VC2015. Trying to install NEO.

Will this problem ever solved?

This problem still exists.

I solved. I omitted the declaration as a constant and compiled Ok-

On 08/06/2020 09:13, Minh Triet Pham Tran wrote:
>

This problem still exists.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vcpkg/issues/11773#issuecomment-640443423,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANMH3PKCQIFIKMFS3RTQHQ3RVSMSVANCNFSM4NSQVQFA.

try removing the keyword 'constexpr'.

I also can confirm that removing constexpr from line 44 fix the issue. So

        static const auto write_byte = [](std::string& res, std::uint8_t bits) {
            res.push_back(hex[(bits >> 4) & 0x0F]);
            res.push_back(hex[(bits >> 0) & 0x0F]);
        };

works.

I checked yesterday and this problem was fixed.

Yes, this was fixed by #11891. The bug can be closed

Thanks for posting this issue. This issue has been fixed. So I am closing this issue for now.

If it was fixed I probably shouldn't still be seeing it.

If it was fixed I probably shouldn't still be seeing it.

Either you didn't pick up the change or a newer commit broke the build again. Check it and open another bug in the later case.

Was this page helpful?
0 / 5 - 0 ratings