Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toolset version for VS2017 (should be 14.1) #167

Closed
wants to merge 1 commit into from

Conversation

KindDragon
Copy link
Contributor

@KindDragon KindDragon commented Feb 20, 2017

Related to #157

@teeks99
Copy link
Contributor

teeks99 commented Feb 26, 2017

Just to be clear, the version of the c++ compiler is "15", it is the CRT that is only being incremented to "14.1".

https://build2.org/article/notes-visual-studio-15.xhtml

Copy link
Contributor

@jhunold jhunold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are wrong registry values being queried

@@ -1624,7 +1624,7 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
.version-11.0-reg = "VisualStudio\\11.0\\Setup\\VC" ;
.version-12.0-reg = "VisualStudio\\12.0\\Setup\\VC" ;
.version-14.0-reg = "VisualStudio\\14.0\\Setup\\VC" ;
.version-15.0-reg = "VisualStudio\\15.0\\Setup\\VC" ;
.version-14.1-reg = "VisualStudio\\14.1\\Setup\\VC" ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like classic copy&paste. I don't have any of those registry values. Any hints on the real registry values are welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't have register keys for VS2017. Should I just remove it?
How to support properly VS2017 path detection is still being debated in #157

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is better to remove them in this case. I've taken a look into #157 but I'm not sure which way to go. And I'm still not convinced that we call the thing "14.1"

@@ -1293,7 +1293,7 @@ def first(self):
__version_11_0_reg = "VisualStudio\\11.0\\Setup\\VC"
__version_12_0_reg = "VisualStudio\\12.0\\Setup\\VC"
__version_14_0_reg = "VisualStudio\\14.0\\Setup\\VC"
__version_15_0_reg = "VisualStudio\\15.0\\Setup\\VC"
__version_14_1_reg = "VisualStudio\\14.1\\Setup\\VC"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and copy&paster error, too.

@KindDragon
Copy link
Contributor Author

KindDragon commented Feb 27, 2017

I've taken a look into #157 but I'm not sure which way to go. And I'm still not convinced that we call the thing "14.1"

I think it's similar to VS 2013 - 7.1, so toolset should be 14.1. But for VS2013 IDE version was also 7.1 (IDE version for VS2017 15.0)

@grafikrobot
Copy link
Member

As far as I can remember, we've always used the version of the "VC", aka msvc, aka cl, as the true number. We've never used the CRT nor the IDE version.

@KindDragon
Copy link
Contributor Author

ECHO ### Toolsets supported by this script are: borland, como, gcc, gcc-nocygwin,
ECHO ###     intel-win32, metrowerks, mingw, msvc, vc7, vc8, vc9, vc10, vc11, vc12, vc14

These versions match with ide version or toolset version (crt dll).
Cl.exe version is very different https://build2.org/article/notes-visual-studio-15.xhtml

@grafikrobot
Copy link
Member

grafikrobot commented Feb 27, 2017

I stand corrected then :-) Are we sure the VS top-line version is 14.1 for VS 2017?

PS.. Sorry if I'm late to the comments. Trying to catch up.

@teeks99
Copy link
Contributor

teeks99 commented Feb 27, 2017

The more I look at this, the more I wonder what microsoft was thinking...

The directory that the visual studio tools are installed in is %PROGRAMFILES%\MicrosoftVisualStudio\2017\[Community|Professional|Enterprise]\VC\Tools\MSVC\14.10.24930\bin\HostX[86|64]\x[86|64]\cl.exe
Note that is 14.10, not 14.1!

Looking at the properties of cl.exe, the "File version" is 19.10.24930.0, the "Product version" is 14.10.24930.0.

Looking at the runtime, in %PROGRAMFILES%\MicrosoftVisualStudio\2017\[Community|Professional|Enterprise]\VC\Redist\MSVC\14.10.24930\x[86|64]\Microsoft.VC150.CRT\ you have concrt140.dll, msvcp140.dll, vccorlib140.dll, vcruntime140.dll.

So there is a 14.10 directory, that contains modules (side-by-side assemblies?) labeled with "VC150", containing DLLs that specify "140". I don't think the runtime is generally relevant to us, but this is going to cause major confusion among developers!

Looking at the versions in visual studio under help->about, the displayed info is:
Microsoft Visual Studio Community 2017 RC
VisualStudio/15.0.0-RC.4+26206.0

The actual tool lines such as "Visual C++ 2017 RC" only have some kind of UID next to them that doesn't seem to translate into a version number (just like in VS2015).

I vote we call the toolset "msvc-15.0" and "vc15", as microsoft is loudly trumpeting this as visual studio version "15".

@teeks99
Copy link
Contributor

teeks99 commented Feb 27, 2017

At one point I think there was a link to a microsoft blog post explaining all this posted to the mailing list, does anyone happen to have a link to that? I'm not having much luck finding it.

@teeks99
Copy link
Contributor

teeks99 commented Feb 27, 2017

I've also found this page, updated today, that lists the various build tools as being 15.0.X.

Specifically this line:
Microsoft.VisualStudio.Component.VC.Tools.x86.x64 VC++ 2017 v141 toolset (x86,x64) 15.0.26109.1 Recommended

@KindDragon
Copy link
Contributor Author

I've also found this page, updated today that lists the various build tools as being 15.0.X.

I think this comment related to your question https://www.reddit.com/r/cpp/comments/5ut2bw/visual_studio_2017_isnt_supported_by_boost/ddzgtcm/

Microsoft.VisualStudio.Component.VC.Tools.x86.x64 VC++ 2017 v141 toolset (x86,x64) 15.0.26109.1

It's toolset installer for VS2017, so it should be 15.00. But yes it's confusing

@KindDragon
Copy link
Contributor Author

/cc @AndrewPardoe

@KindDragon
Copy link
Contributor Author

KindDragon commented Feb 27, 2017

Are we sure the VS top-line version is 14.1 for VS 2017?

Toolset version for VS2017 is 14.1. IDE version 15.00 boostorg/config#119 (comment)

@grafikrobot
Copy link
Member

Well.. I see three choices given all the above links to docs:

  1. Follow the "toolset" version, aka version for Microsoft.VisualStudio.Component.VC.Tools.x86.x64.
  2. Follow the "top-line" version, aka what users will "see". Which would be version for Microsoft.VisualStudio.Component.VC.CoreIde (right?).
  3. Follow the "cl.exe" version.

I don't see #1 as having any advantages for ourselves or for users. It's obscure enough to not be relevant. And it doesn't match what users might expect.

#2 has the advantage that it's something users might point to visually when referring to what they have installed. But since it's my understanding that this version will not match the compiler itself, which is what we most care about, I don't see it as a big advantage.

Last, #3.. It has the advantage that it's an easy version number to obtain for users. Also it's not susceptible to marketing version and packaged product versions fluctuations. It does have the disadvantage of producing a jump in the b2 toolset numbers. But I think that's a minor problem, if we don't go trying to back-fix numbers.

So.. Maybe we should make it 19.10 (ie vc1910)?

@KindDragon
Copy link
Contributor Author

But this is the version that would be in dll name, like boost_filesystem-vc140-mt-1_6X.dll.
VS2017 can use dll's from VS2015 or VS2017, so I think they should be named boost_filesystem-vc140-mt-1_6X.dll and boost_filesystem-vc141-mt-1_6X.dll

And we can't change this version for old VS versions

@KindDragon
Copy link
Contributor Author

@KindDragon
Copy link
Contributor Author

IDK why Boost toolset enumeration contains version only for Visual Studio

@MaartenBent
Copy link

Looking at the Platform Toolsets available for a project in Visual Studio 2017, It should indeed be 141:
vs-toolsets

@refack
Copy link
Contributor

refack commented Mar 6, 2017

Do we have a bottom line for me to improve #170?

@KindDragon
Copy link
Contributor Author

Quick voting. Add reaction to this post 👍 if you think toolset should be 14.10, 👎 if you think it should remain 15.00, or 😕 if you uncertain

@refack
Copy link
Contributor

refack commented Mar 7, 2017

Voting with my feet at #170

@grafikrobot
Copy link
Member

Changed it in develop to 1410.

N-Dekker added a commit to SuperElastix/SuperElastix that referenced this pull request Aug 28, 2017
Related SuperElastix ticket: #12 "Bump Boost version"

See also:

"[CMake] MSVC15 variable available for Visual Studio 2017"
http://public.kitware.com/pipermail/cmake/2017-January/064815.html

"Notes on Visual Studio 15"
https://build2.org/article/notes-visual-studio-15.xhtml

"Fix toolset version for VS2017 (should be 14.1)"
boostorg/build#167

boost_1_65_0\boost\config\compiler\visualc.hpp, which says:
#   elif _MSC_VER < 1920
#     define BOOST_COMPILER_VERSION 14.1

C:\Program Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake, which says:
    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1)
@github-actions github-actions bot added the transition Transition to bfgroup/b2 label Oct 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
transition Transition to bfgroup/b2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants