c++boostvcpkg

VCPKG failed on boost-thread


I am using Visual Studio 2022 version 17.10.3 and managing Boost dependencies through vcpkg in manifest mode. However, when I build a simple project, I encounter errors specifically related to building the boost-thread library what is the problem?.

    1>CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
1>    Command failed: C:/VCPKG/vcpkg/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j7
1>    Working Directory: C:/VCPKG/vcpkg/buildtrees/boost-thread/x64-windows-dbg
1>    See logs for more information:
1>      C:\VCPKG\vcpkg\buildtrees\boost-thread\install-x64-windows-dbg-out.log
1>
1>Call Stack (most recent call first):
1>  C:/Users/parsiss_admin/source/repos/ConsoleApplication1/vcpkg_installed/x64-windows/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
1>  C:/Users/parsiss_admin/source/repos/ConsoleApplication1/vcpkg_installed/x64-windows/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
1>  C:/Users/parsiss_admin/source/repos/ConsoleApplication1/vcpkg_installed/x64-windows/x64-windows/share/boost-build/boost-modular-build.cmake:139 (vcpkg_cmake_install)
1>  C:/Users/parsiss_admin/AppData/Local/vcpkg/registries/git-trees/f2f50fecd4338161565a0425c3e9b55fdbe68424/portfile.cmake:12 (boost_modular_build)
1>  scripts/ports.cmake:192 (include)
1>
1>
1>EXEC : error : building boost-thread:x64-windows failed with: BUILD_FAILED
1>Elapsed time to handle boost-thread:x64-windows: 9.7 s
1>Please ensure you're using the latest po

And this from building boost-thread log:error: '/boost//C:/Users/parsiss_admin/source/repos/ConsoleApplication1/vcpkg_installed/x64-windows/x64-windows/debug/lib/boost_chrono-vc140-mt-gd.lib' All libraries in debug/lib/ are vc144 libraries


Solution

  • The solution to this issue can be found in https://github.com/microsoft/vcpkg/issues/38980

    The reason you are encountering the issue is because you are mixing a version of boost ports with a msvc version which the boost ports are not aware of/tested with. You can simply update to a newer boost version/baseline or follow the other fixes mentioned in the issue above.