[build] VC++ 2017 version number?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[build] VC++ 2017 version number?

Boost - Dev mailing list
Boost.build in develop is treating VC++2017 RTW (aka RTM) as msvc-14.1.

Yet the Visual Studio 2017 RTW Help "About Microsoft Visual Studio" shows
the version as "15.0.0-RTW+26228.4"

Shouldn't boost.build follow Microsoft's numbering? Seems like calling 2017
RTW anything except 15.0 is a recipe for confusion.

--Beman

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
The standard libraries are still 14, not 15. We're still linking with msvcp140.dll, for example.


As far as the compiler and standard libraries are concerned, VS 2017 is a VS 2015 update release.


Billy3

________________________________
From: Boost <[hidden email]> on behalf of Beman Dawes via Boost <[hidden email]>
Sent: Monday, March 13, 2017 12:34:52 PM
To: Boost Developers List
Cc: Beman Dawes
Subject: [boost] [build] VC++ 2017 version number?

Boost.build in develop is treating VC++2017 RTW (aka RTM) as msvc-14.1.

Yet the Visual Studio 2017 RTW Help "About Microsoft Visual Studio" shows
the version as "15.0.0-RTW+26228.4"

Shouldn't boost.build follow Microsoft's numbering? Seems like calling 2017
RTW anything except 15.0 is a recipe for confusion.

--Beman

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On Mon, Mar 13, 2017 at 2:34 PM, Beman Dawes via Boost <
[hidden email]> wrote:

> Boost.build in develop is treating VC++2017 RTW (aka RTM) as msvc-14.1.
>
> Yet the Visual Studio 2017 RTW Help "About Microsoft Visual Studio" shows
> the version as "15.0.0-RTW+26228.4"
>
> Shouldn't boost.build follow Microsoft's numbering? Seems like calling 2017
> RTW anything except 15.0 is a recipe for confusion.
>

First, the toolset number that has been chosen is 14.10, not 14.1. Thus,
you need to enter `b2 toolset=msvc-14.10` to build.

I agree with Beman that not calling it 15.0 when microsoft is so clearly
calling the release Visual Studio "15" is going to cause confusion.
Additionally, when you have multiple projects (and multiple versions of the
boost library), you want to use a visual studio environment variable to
select the correct libraries. In our internal projects (and the visual
studio binaries that we publish on sourceforge) we package the libraries in
directories like "lib64-msvc-14.0", this can be accessed with the visual
studio variable string
`lib$(PlatformArchitecture)-msvc-$(VisualStudioVersion)`.
In 2017 the VisualStudioVersion variable went to 15.0, and there is no
available variable that gives 14.10 (or 14.1).

On the other hand, the "toolset" that microsoft sets the compilers to is
"v141".  (Open a solution, right click on project, properties ->
Configuration Properties -> General -> Platform Toolset -> Defaults to:
"Visual Studio 2017 (v141)". This variable is then used to setup the build
environment so that the correct compiler/linker, includes, libraries, etc
are used. The version of the compiler (cl.exe) is actually 19.10, whereas
the Visual Studio 2015 (msvc-14.0) was 19.00, it has typically been +5
compared to the vc/vs version. This was all done to signify some kind of
abi compatibility (I haven't investigated what the practical applications
of this are, or why one would care...does this mean we can link a build of
boost made with msvc-14.0 with c++ application code compiled with
msvc-14.10?).

One can only hope that the toolset that ships with Visual Studio 2019(ish),
visual studio 16.0 is v160.

In short, Microsoft really screwed up the version numbering of this release
(if you think this is bad, don't ask what you have to do to programatically
find the compiler on disk, it requires COM calls now!), and we don't have a
*good* option.

As I said before, for my opinion, I think we should move to msvc-15.0 for
the toolset, as that will be *less* confusion for the end-users.

However, either way we go, we need to document this a lot better than we do
now. It needs to be loud and clear in both the boost build documentation as
well as the boost getting started docs.

Tom

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
[Tom Kent]
> This was all done to signify some kind of abi compatibility (I haven't investigated what the practical applications of this are, or why one would care...does this mean we can link a build of boost made with msvc-14.0 with c++ application code compiled with msvc-14.10?).

People really, really care about this one. VS 2015's toolset (RTM and all Updates) is binary-compatible with VS 2017's toolset (RTM and all future Updates), meaning that they can be freely mixed during linking. It's still best to compile everything consistently with the latest available version, to get all correctness/performance fixes.

> As I said before, for my opinion, I think we should move to msvc-15.0 for the toolset, as that will be *less* confusion for the end-users.

I disagree - 15 is the IDE's version number. The IDE can host multiple toolsets (already it can install v140 and v141; expect more in the future).

Another approach would be to give up on the 14.x version numbers entirely (admittedly it is confusing to have the v141 toolset linking against msvcp140.dll for bincompat). Instead, use _MSC_VER as the toolset identifier - this is 1900 for VS 2015 (RTM/Updates) and 1910 for VS 2017 RTM, and will increase in a fairly predictable, monotonic way in the future.

STL

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
Tom Kent wrote:

> On the other hand, the "toolset" that microsoft sets the compilers to is
> "v141".

Yes, and we use msvc-14.10 instead of msvc-14.1, to make sure we don't match
anything. Plus, using msvc-14.1 as the toolset fails with "cl not found" as
if we don't support 2017 yet.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
On Mon, Mar 13, 2017 at 5:25 PM, Peter Dimov via Boost <
[hidden email]> wrote:

> Tom Kent wrote:
>
> On the other hand, the "toolset" that microsoft sets the compilers to is
>> "v141".
>>
>
> Yes, and we use msvc-14.10 instead of msvc-14.1, to make sure we don't
> match anything. Plus, using msvc-14.1 as the toolset fails with "cl not
> found" as if we don't support 2017 yet.
>

I believe there's a PR to fix that that someone is working on. Do note that
AFAIK the version is "14.10". That Microsoft uses both 14.10 and 141 in
various places to refer to the same thing just piles more on the cr@p heap
that users will face. I seriously considered abandoning the current scheme
and going with Beman's suggestion of 19.10 at one point.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net
-- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
Rene Rivera wrote:

> I seriously considered abandoning the current scheme and going with
> Beman's suggestion of 19.10 at one point.

19.10 is certainly unambiguous but the problem with it is that no normal
person remembers which VC++ is which _MSC_VER.

Although no normal person remembers that VC++ 2008 is msvc-9.0 either.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
On 14/03/2017 12:51, Peter Dimov via Boost wrote:
> 19.10 is certainly unambiguous but the problem with it is that no normal
> person remembers which VC++ is which _MSC_VER.
>
> Although no normal person remembers that VC++ 2008 is msvc-9.0 either.

I think you learn that one pretty quick -- all it takes is a trip to the
installation directory.  I agree that nobody remembers the _MSC_VER,
however.

Whatever $(PlatformToolsetVersion) resolves to seems like a good choice
to me; I've often used this in build scripts and props files for folder
names or components of library names to disambiguate between multiple VC
versions, and at least for prior VC versions it matches the convention
used for Boost DLL names...



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On Mon, Mar 13, 2017 at 10:58 PM, Stephan T. Lavavej via Boost
<[hidden email]> wrote:
>> As I said before, for my opinion, I think we should move to msvc-15.0 for the toolset, as that will be *less* confusion for the end-users.
>
> I disagree - 15 is the IDE's version number. The IDE can host multiple toolsets (already it can install v140 and v141; expect more in the future).

In the past IDE and toolset version numbers were equal weren't they?

> Another approach would be to give up on the 14.x version numbers entirely (admittedly it is confusing to have the v141 toolset linking against msvcp140.dll for bincompat). Instead, use _MSC_VER as the toolset identifier - this is 1900 for VS 2015 (RTM/Updates) and 1910 for VS 2017 RTM, and will increase in a fairly predictable, monotonic way in the future.

Can't MS use a single version number for the compiler *and* the toolset?


--
Olaf

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
[Olaf van der Spek]
> In the past IDE and toolset version numbers were equal weren't they?

Yes (the IDE gained multitargeting powers a while back, but it involved having an older IDE installed).

> Can't MS use a single version number for the compiler *and* the toolset?

The compiler is part of the toolset (which includes the linker and the libraries). The IDE is distinct from the toolset.

At the moment, the compiler and the libraries march in lockstep - you can't use an older compiler with newer libraries (that will never work, ever) and we don't support using a newer compiler with older libraries. The toolset is versioned (according to the IDE) as v141 while the compiler is versioned at 19.1, but we consider them to be the same thing, really.

The libraries themselves don't have a distinct version macro, yet. They'll gain one in the future when our binary-incompatible branch is available.

The compiler's version number has the most seniority and is the most readily available to C++ programs via _MSC_VER, so it makes a lot of sense to test.

STL

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
On 14 March 2017 at 22:26, Stephan T. Lavavej via Boost
<[hidden email]> wrote:
> [Olaf van der Spek]
>
>> Can't MS use a single version number for the compiler *and* the toolset?
>
> The compiler is part of the toolset (which includes the linker and the libraries). The IDE is distinct from the toolset.
>
> At the moment, the compiler and the libraries march in lockstep - you can't use an older compiler with newer libraries (that will never work, ever) and we don't support using a newer compiler with older libraries. The toolset is versioned (according to the IDE) as v141 while the compiler is versioned at 19.1, but we consider them to be the same thing, really.

Digression:
After day spent on updating fairly large build configuration to
VS2017, what a dance of versions:

MSBuild:    PlatformToolset=v141
Boost:   bootstrap.bat vc1410
Boost:   b2 toolset=msvc-14.10
IncrediBuild:   BuildConsole.exe /vsversion="vc15" (notice, "vs" in
switch vs "vc" in value)
CMake:   Visual Studio 15 2017


Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
On 16 March 2017 at 23:09, Mateusz Loskot via Boost <[hidden email]>
wrote:

> CMake:   Visual Studio 15 2017


Note that from CMake's pov this is the target IDE with the v141 toolset by
default, see :
https://cmake.org/cmake/help/v3.8/generator/Visual%20Studio%2015%202017.html
Because VS can be used with different compilers (as STL and others
clarified before), you can also
tell CMake to use another toolset using CMAKE_GENERATOR_TOOLSET  as
specified in this link.
The GUI will also present a command line flag in case you do not want to
use the default toolset.

So basically it's "Visual Studio 15 2017" with "v141" toolset to be
precise, which mean that they get the choice of version name right if I
follow STL's advice.

Joël Lamotte

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

mloskot
In reply to this post by Boost - Dev mailing list
Boost - Dev mailing list wrote
[Tom Kent]
> As I said before, for my opinion, I think we should move to msvc-15.0 for the toolset, as that will be *less* confusion for the end-users.

I disagree - 15 is the IDE's version number. The IDE can host multiple toolsets (already it can install v140 and v141; expect more in the future).

Another approach would be to give up on the 14.x version numbers entirely (admittedly it is confusing to have the v141 toolset linking against msvcp140.dll for bincompat). Instead, use _MSC_VER as the toolset identifier - this is 1900 for VS 2015 (RTM/Updates) and 1910 for VS 2017 RTM, and will increase in a fairly predictable, monotonic way in the future.
BTW, I'm trying out the VS2017's Clang with Microsoft CodeGen and I'm quite surprised that both,
CL.EXE and Clang.exe identify themselve as Microsoft Compiler, via _MSC_VER

F:\>cat test.cpp
#ifdef  _MSC_VER
#error CL with Clang.exe here
#endif
int main() { return 0; }

F:\>cl /nologo test.cpp
test.cpp
test.cpp(2): fatal error C1189: #error:  CL with Clang.exe here

F:\>"c:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\ClangC2\14.10.25903\bin\HostX86\clang.exe"  test.cpp
test.cpp:2:2: error: CL with Clang.exe here
#error CL with Clang.exe here
 ^
1 error generated.

F:\>

This table at [1] seems to confirm that too.

Is that a temporary (alpha/beta state?). Hopefully.

Versioning two different compilers under the same _MSC_VER is clearly going to add up
to the overall confusion and toolset version fiasco.


[1] Identifying your Platform and Toolset
https://blogs.msdn.microsoft.com/vcblog/2015/12/04/clang-with-microsoft-codegen-in-vs-2015-update-1/

--
Regards,
Mateusz Loskot
--
Mateusz Loskot, http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
[Mateusz Loskot]
> BTW, I'm trying out the VS2017's Clang with Microsoft CodeGen
> and I'm quite surprised that both, CL.EXE and Clang.exe
> identify themselve as Microsoft Compiler, via _MSC_VER

Removing this behavior has been on the compiler team's todo list for a while. First the libraries had to be cleaned up (there were some places where we always assumed _MSC_VER would be defined); I am not aware of any remaining work in the libraries. I'll ping our compiler devs again.

Thanks,
STL

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
I submitted a patch to CMake to treat 19.10 as '-vc150' in
FindBoost.CMake months ago, see:
https://gitlab.kitware.com/cmake/cmake/merge_requests/314

Now I think additional patch might be required due to recent change in
Boost.build.

On Fri, Mar 17, 2017 at 6:09 AM, Mateusz Loskot via Boost
<[hidden email]> wrote:

> On 14 March 2017 at 22:26, Stephan T. Lavavej via Boost
> <[hidden email]> wrote:
>> [Olaf van der Spek]
>>
>>> Can't MS use a single version number for the compiler *and* the toolset?
>>
>> The compiler is part of the toolset (which includes the linker and the libraries). The IDE is distinct from the toolset.
>>
>> At the moment, the compiler and the libraries march in lockstep - you can't use an older compiler with newer libraries (that will never work, ever) and we don't support using a newer compiler with older libraries. The toolset is versioned (according to the IDE) as v141 while the compiler is versioned at 19.1, but we consider them to be the same thing, really.
>
> Digression:
> After day spent on updating fairly large build configuration to
> VS2017, what a dance of versions:
>
> MSBuild:    PlatformToolset=v141
> Boost:   bootstrap.bat vc1410
> Boost:   b2 toolset=msvc-14.10
> IncrediBuild:   BuildConsole.exe /vsversion="vc15" (notice, "vs" in
> switch vs "vc" in value)
> CMake:   Visual Studio 15 2017
>
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [build] VC++ 2017 version number?

Boost - Dev mailing list
On 24 March 2017 at 02:45, Vic Luo via Boost <[hidden email]> wrote:
> I submitted a patch to CMake to treat 19.10 as '-vc150' in
> FindBoost.CMake months ago, see:
> https://gitlab.kitware.com/cmake/cmake/merge_requests/314
>
> Now I think additional patch might be required due to recent change in
> Boost.build.

I have been trying to take care of it:

Take one: vc150 -> vc1410  (merged)
https://gitlab.kitware.com/cmake/cmake/merge_requests/590
Take two: vc1410->vc141 (accepted, merge pending)
https://gitlab.kitware.com/cmake/cmake/merge_requests/607

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...