microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.91k stars 6.33k forks source link

[boost-thread] Build error on x64-windows #39359

Open gideonr1 opened 3 months ago

gideonr1 commented 3 months ago

Copy issue body from C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/issue_body.md issue_body.md

gideonr1 commented 3 months ago

Package: boost-thread:x64-windows-static@1.77.0

Host Environment

To Reproduce

vcpkg install Failure logs

-- Using cached boostorg-thread-boost-1.77.0.tar.gz.
-- Cleaning sources at C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/src/ost-1.77.0-7bf4191b6c.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/Gideon/AppData/Local/vcpkg/downloads/boostorg-thread-boost-1.77.0.tar.gz
-- Using source at C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/src/ost-1.77.0-7bf4191b6c.clean
-- Including C:/Users/Gideon/AppData/Local/vcpkg/registries/git-trees/1c097a032a997463e15245272e40ea9298554f8b/b2-options.cmake
-- Found external ninja('1.11.0').
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j9
    Working Directory: C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg
    See logs for more information:
      C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\install-x64-windows-static-dbg-out.log

Call Stack (most recent call first):
  C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:102 (vcpkg_execute_build_process)
  C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
  C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/boost-modular-build.cmake:105 (vcpkg_cmake_install)
  C:/Users/Gideon/AppData/Local/vcpkg/registries/git-trees/1c097a032a997463e15245272e40ea9298554f8b/portfile.cmake:15 (boost_modular_build)
  scripts/ports.cmake:175 (include)
C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\install-x64-windows-static-dbg-out.log ``` Change Dir: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg' Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v -v -j9 install [1/2] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\src\ost-1.77.0-7bf4191b6c.clean\build && C:\Code\OTC\otc4-grpc-server\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg/user-config.jam --stagedir=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg/stage --build-dir=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg --disable-icu runtime-link=static link=static address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug /boost/thread//boost_thread --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j8 -sBOOST_ROOT=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage" FAILED: CMakeFiles/boost C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg/CMakeFiles/boost C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\src\ost-1.77.0-7bf4191b6c.clean\build && C:\Code\OTC\otc4-grpc-server\vcpkg_installed\x64-windows\tools\boost-build\b2.exe toolset=msvc --user-config=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg/user-config.jam --stagedir=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg/stage --build-dir=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg --disable-icu runtime-link=static link=static address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug /boost/thread//boost_thread --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j8 -sBOOST_ROOT=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build --debug-configuration --debug-building --debug-generators --ignore-site-config --hash -q debug-symbols=on -d +2 threading=multi stage" notice: found boost-build.jam at C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build/boost-build.jam notice: loading B2 from C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/tools/boost-build/src/kernel/bootstrap.jam notice: Site configuration files will be ignored due to the notice: --ignore-site-config command-line option. notice: Loading explicitly specified user configuration file: C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\x64-windows-static-dbg\user-config.jam notice: Searching 'C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\x64-windows-static-dbg' for user-config configuration file 'user-config.jam'. notice: Loading user-config configuration file 'user-config.jam' from 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/vcpkg/blds/boost-thread/x64-windows-static-dbg'. C:\Code\OTC\otc4-grpc-server\vcpkg_installed\vcpkg\blds\boost-thread\x64-windows-static-dbg\user-config.jam:8: Unescaped special character in argument /machine:x64 notice: will use 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe' for msvc, condition msvc-144 notice: [msvc-cfg] condition: 'msvc-144/x86/32', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86' notice: [msvc-cfg] condition: 'msvc-144//32', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86' notice: [msvc-cfg] condition: 'msvc-144/x86/64', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64' notice: [msvc-cfg] condition: 'msvc-144//64', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64' notice: [msvc-cfg] condition: 'msvc-144/x86/', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64' notice: [msvc-cfg] condition: 'msvc-144//', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat amd64' notice: [msvc-cfg] condition: 'msvc-144/ia64/64', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64' notice: [msvc-cfg] condition: 'msvc-144/ia64/', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_ia64' notice: [msvc-cfg] condition: 'msvc-144/arm/32', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm' notice: [msvc-cfg] condition: 'msvc-144/arm/64', setup: 'C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows/share/boost-build/nothing.bat x86_arm64' Building target '../build/boost_thread' Build request: object(property-set)@373 64 x86 on static static windows win32 multi msvc debug Command line free features: Target requirements: @Jamfile%Jamfile.requirements BOOST_ALL_NO_LIB=1 ../include&&/C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/include /boost/date_time//boost_date_time shared:BOOST_THREAD_BUILD_DLL=1 static:BOOST_THREAD_BUILD_LIB=1 cxxflags:toolset define:link define:target-os threading:runtime-link threading:toolset warnings:toolset @Jamfile%Jamfile.tag windows:BOOST_USE_WINDOWS_H windows:WIN32_LEAN_AND_MEAN multi clang-3.0:-Wno-delete-non-virtual-dtor clang:-Wextra clang:-Wno-long-long clang:-Wno-unused-parameter clang:-Wno-variadic-macros clang:-Wunused-function clang:on darwin-4.6.2:-Wno-delete-non-virtual-dtor darwin-4.7.0:-Wno-delete-non-virtual-dtor darwin-4:-Wno-variadic-macros darwin-5:-Wno-variadic-macros darwin:-Wextra darwin:-Wno-long-long darwin:-Wno-unused-parameter darwin:-Wunused-function darwin:-fpermissive darwin:-pedantic gcc-4:-Wno-variadic-macros gcc-5:-Wno-variadic-macros gcc:-Wextra gcc:-Wno-long-long gcc:-Wno-unused-parameter gcc:-Wunused-function gcc:-pedantic intel:-wd1418 intel:-wd193,304,383,444 intel:-wd2415 intel:-wd593,981 msvc,shared:multi msvc:/wd4100 msvc:/wd4512 msvc:/wd6246 pathscale:-Wno-long-long pathscale:-pedantic all Common properties: 64 x86 off off /wd4100 /wd4512 /wd6246 object on BOOST_ALL_NO_LIB=1 BOOST_THREAD_BUILD_LIB=1 BOOST_THREAD_USES_CHRONO BOOST_THREAD_WIN32 BOOST_USE_WINDOWS_H WIN32_LEAN_AND_MEAN linker on on off true windows ../include&&/C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/include off off /boost/chrono//boost_chrono /boost/date_time//boost_date_time static yes yes off NT on on off cxxflags:toolset define:link define:target-os threading:runtime-link threading:toolset warnings:toolset auto on on static native off false project-relative @Jamfile%Jamfile.tag windows on win32 multi 144 msvc console debug off off all desktop Building target '../boost_chrono' Build request: object(property-set)@398 64 x86 off off object on linker on on off off static yes yes off NT on on off variant on on static native off windows on win32 multi 144 msvc debug off off all desktop Command line free features: Target requirements: BOOST_ALL_NO_LIB=1 /boost//C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/debug/lib/boost_chrono-vc140-mt-gd.lib ../include&&/C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/include /boost/date_time//boost_date_time threading:runtime-link threading:toolset @Jamfile%Jamfile.tag msvc,shared:multi debug Common properties: 64 x86 off off object on BOOST_ALL_NO_LIB=1 linker on on off /boost//C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/debug/lib/boost_chrono-vc140-mt-gd.lib true windows ../include&&/C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/include off off /boost/date_time//boost_date_time static yes yes off NT on on off threading:runtime-link threading:toolset variant auto on on static native off false project-relative @Jamfile%Jamfile.tag windows on win32 multi 144 msvc console debug off off all desktop error: Unable to find file or target named error: '/boost//C:/Code/OTC/otc4-grpc-server/vcpkg_installed/x64-windows-static/debug/lib/boost_chrono-vc140-mt-gd.lib' error: referred to from project at error: '..' ninja: build stopped: subcommand failed. ```

Additional context

vcpkg.json ``` { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", "name": "liborangeip", "version": "0.1.0", "description": [ "Image processing library for project orange" ], "dependencies": [ "boost-log", "boost-test", "numcpp", "gtest", "protobuf", "grpc", "jsoncpp", "openssl", "libzip", "opencv", "minizip-ng" ], "builtin-baseline": "24c6283930aee500f9ae584ebeaf3dc41d02bcd4", "overrides": [ { "name": "numcpp", "version": "2.6.0" } ] } ```
dmiller423 commented 3 months ago

seconded, using clang for build is only difference

It's also ridiculous VS has overridden my VCPKG_ROOT which downloads and build absolutely everything bc some..one thought it was a good idea - now I have a broken mess instead - wonderful, truly

JonLiu1993 commented 3 months ago

@gideonr1, Thanks for posting issue, the latest boost-thread version is 1.85.0, boost-thread can be installed successfully, the version you are using is 1.77.0, do you have any specific requirements?

PS F:\Feature-test\test> ./vcpkg install boost-thread:x64-windows-static --editable
Computing installation plan...
The following packages are already installed:
    boost-thread:x64-windows-static@1.85.0#1
boost-thread:x64-windows-static is already installed
Total install time: 210 us
The package boost-thread is compatible with built-in CMake targets of FindBoost.cmake:

    find_package(Boost REQUIRED COMPONENTS thread)
    target_link_libraries(main PRIVATE Boost::thread)

or the generated cmake configs via:

    find_package(boost_thread REQUIRED CONFIG)
    target_link_libraries(main PRIVATE Boost::thread)

PS F:\Feature-test\test> ./vcpkg --version
vcpkg package management program version 2024-06-10-02590c430e4ed9215d27870138c2e579cc338772
github-actions[bot] commented 2 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

magnesj commented 1 month ago

I can see the same error using GitHubAction with latest release of vcpkg 2024.07.12. Here Ninja is used, and only the release version is build.

I am not able to reproduce on local machine.

image

https://github.com/magnesj/ResInsight/actions/runs/10388006261/job/28806974070#step:23:394

magnesj commented 1 month ago

We use vcpkg as a submodule. I updated the vcpkg submodule to 2024.07.12, and I got the error situation described above. This operation will not use the latest available code in vcpkg submodule, the baseline in vcpkg-configuration.json is also required to be updated.

This operation is a bit hidden and difficult to find in the documentation.

https://github.com/OPM/ResInsight/pull/11614/files

I found the commit to use from here https://github.com/microsoft/vcpkg/tags

gideonr1 commented 1 month ago

Thanks!

From: Magne Sjaastad @.> Sent: Thursday, 15 August 2024 14:21 To: microsoft/vcpkg @.> Cc: gideonr1 @.>; Mention @.> Subject: Re: [microsoft/vcpkg] [boost-thread] Build error on x64-windows (Issue #39359)

We use vcpkg as a submodule. I updated the vcpkg submodule to 2024.07.12, and I got the error situation described above. This operation will not use the latest available code in vcpkg submodule, the baseline in vcpkg-configuration.json is also required to be updated.

This operation is a bit hidden and difficult to find in the documentation.

https://github.com/OPM/ResInsight/pull/11614/files

I found the commit to use from here https://github.com/microsoft/vcpkg/tags

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vcpkg/issues/39359#issuecomment-2291097974, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJLDZXFP6HO7VYSFN6YRTDZRSFIPAVCNFSM6AAAAABJP3UFHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGA4TOOJXGQ. You are receiving this because you were mentioned.Message ID: @.**@.>>