Vcpkg: boost compiled *.libs have incorrect toolset version and missing boost version

Created on 5 Nov 2019  路  3Comments  路  Source: microsoft/vcpkg

Describe the bug
The boost compiled *.lib files found in the x64-windows/installed/lib, x64-windows/installed/debug/lib and corresponding packages folders have the incorrect vc toolset version (all have v140) and are missing the boost version (current is 1.71) although the x64-windows/bin, x64-windows/installed/debug/bin and corresponding packages folders *.pdb and *.dll files have the correct toolset (v141 or v142) and boost version.

Reviewing the corresponding build folders for each the build and stage files all have the correct toolset and boost version.

It seems somewhere in the copy process from the build folder to the installed and packages folder the *.lib files all get the toolset changed to v140 even though they have been compiled with v141 in VS 2017 and v142 in VC 2019.

Environment

  • OS: Windows 10 Pro 1903 (OS Build 18362.449) x64
  • Compiler: VC 2017 v15.9.17 Toolset v141 and VC 2019 16.3.7 Toolset v142

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install boost-atomic (or any boost library that creates a dll)
  2. No errors - compiles cleanly
    Repro code when

Expected behavior
The lib files should be copied from the build folder to the installed and packages folders with their filenames intact and not altered.

Failure logs
No failure logs during the vcpkg install process, but the lib files have the incorrect filenames no longer matching their counterpart in the bin folders.

Additional context
From the build folder for boost-atomic:
Directory of D:\Git\vs2017\buildtrees\boost-atomic\x64-windows-dbg\boost\build\3b5884c1d1f69371a4c182d85379c63c

11/04/2019 17:00

BUILTIN\Administrators .
11/04/2019 17:00 BUILTIN\Administrators ..
11/04/2019 17:00 16,384 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.dll
11/04/2019 17:00 381 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.dll.manifest
11/04/2019 17:00 119 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.dll.rsp
11/04/2019 17:00 1,703 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.exp
11/04/2019 17:00 3,576 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.lib
11/04/2019 17:00 348,160 BUILTIN\Administrators boost_atomic-vc141-mt-gd-x64-1_71.pdb

From installed bin for boost-atomic:
Directory of D:\Git\vs2017\installed\x64-windows\bin

11/04/2019 17:00 9,728 BUILTIN\Administrators boost_atomic-vc141-mt-x64-1_71.dll
11/04/2019 17:00 307,200 BUILTIN\Administrators boost_atomic-vc141-mt-x64-1_71.pdb

From install lib for boost-atomic:
Directory of D:\Git\vs2017\installed\x64-windows\lib

11/04/2019 17:00 3,530 BUILTIN\Administrators boost_atomic-vc140-mt.lib

The same is true for the debug versions and the corresponding packages folders.

port-bug

All 3 comments

@JackBoosY @ras0219 - FYI - I think I found where this happens, but not sure why it happens - in the boost-modular-build.cmake file, starting at line 346 thru 369, there is manipulation of the boost library filenames.
Since I'm far from being an expert, I wouldn't begin to rationalize why only the filename libs and not the symbol and link libraries are not?
Thanks and have a wonderful day/evening.

@timautry , see the background why the lib rename to '-vc140'.

Ok, thanks for the information, but I'm not sure they are all the same, as even MS says there are differences in how the code is interpreted and handled between VC versions and toolsets for the building, compiling and linking.
I myself have compared output files from stand-alone builds of boost libraries, specifying VS2015, VS2017 and VS2019 and their respective toolsets vc140, vc141 and vc142 and there is obvious file differences in the dlls, libs and pdbs.
I may just maintain those either outside of vcpkg or in a custom triplet of my own.
Thank you for the hard work :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jack17529 picture jack17529  路  3Comments

PhilLab picture PhilLab  路  3Comments

medilies picture medilies  路  3Comments

tzbo picture tzbo  路  3Comments

grandprixgp picture grandprixgp  路  3Comments