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

[boost-coroutine] Build error with LLVM/Clang #35369

Closed
DKGH opened this issue Nov 28, 2023 · 1 comment
Closed

[boost-coroutine] Build error with LLVM/Clang #35369

DKGH opened this issue Nov 28, 2023 · 1 comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@DKGH
Copy link

DKGH commented Nov 28, 2023

I am using LLVM/Clang that comes with Visual Studio 2022. I have tested with Pro and Community versions. While other boost libs compile correctly, boost-coroutine build fails while looking for a cl.exe like boost-context.

Package: boost-coroutine:x64-windows-custom -> 1.83.0

Host Environment

  • Host: x64-windows
  • Compiler: Clang 16.0.5
  • vcpkg-tool version: 2023-09-15-ac02a9f660977426b8ec6392919fbb1d51b10998
    vcpkg-readonly: true
    vcpkg-scripts version: 2c40186

To Reproduce

vcpkg install
Failure logs

-- Downloading https://github.com/boostorg/coroutine/archive/boost-1.83.0.tar.gz -> boostorg-coroutine-boost-1.83.0.tar.gz...
-- Extracting source C:/Users/dkgh/AppData/Local/vcpkg/downloads/boostorg-coroutine-boost-1.83.0.tar.gz
-- Using source at C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/src/ost-1.83.0-554f073b34.clean
-- Getting CMake variables for x64-windows-custom
-- Configuring x64-windows-custom
-- Building x64-windows-custom-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: C:/Users/dkgh/AppData/Local/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j9
    Working Directory: C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg
    See logs for more information:
      C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\install-x64-windows-custom-dbg-out.log

Call Stack (most recent call first):
  C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows/share/boost-build/boost-modular-build.cmake:139 (vcpkg_cmake_install)
  C:/Users/dkgh/AppData/Local/vcpkg/registries/git-trees/d8a5c2cff3de497580fc8dc363ebc3e8ec0c9a1d/portfile.cmake:12 (boost_modular_build)
  scripts/ports.cmake:147 (include)



C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\install-x64-windows-custom-dbg-out.log
Change Dir: 'C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg'

Run Build Command(s): C:/Users/dkgh/AppData/Local/vcpkg/downloads/tools/ninja/1.10.2-windows/ninja.exe -v -v -j9 install
[1/2] cmd.exe /C "cd /D C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build && C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\x64-windows\tools\boost-build\b2.exe toolset=clang-win --user-config=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/user-config.jam --stagedir=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/stage --build-dir=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg runtime-link=shared link=static address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j 9 -sBOOST_ROOT=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/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:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/CMakeFiles/boost 
cmd.exe /C "cd /D C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build && C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\x64-windows\tools\boost-build\b2.exe toolset=clang-win --user-config=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/user-config.jam --stagedir=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/stage --build-dir=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg runtime-link=shared link=static address-model=64 architecture=x86 target-os=windows threadapi=win32 variant=debug --disable-icu --with-atomic --with-random --with-date_time --with-filesystem --with-system --with-thread --with-chrono -j 9 -sBOOST_ROOT=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows/tools/boost-build -sBOOST_BUILD_PATH=C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/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: loading B2 from C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/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:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\x64-windows-custom-dbg\user-config.jam
notice: Searching 'C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\x64-windows-custom-dbg' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg'.
notice: [msvc-cfg] msvc-14.3 detected, command: 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe'
notice: [clang-win] using compiler '"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe"', version '16.0.5', target 'x86_64', default address-model=64
notice: will use 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe' for clang-win, condition <toolset>clang-win-16.0.5
notice: [clang-win] x86-32: using linker '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x86\link.exe"'
notice: [clang-win] x86-32: using assembler '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x86\ml.exe"'
notice: [clang-win] x86-32: using archiver '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x86\link.exe" /lib'
notice: [clang-win] x86-32: using manifest-tool 'mt.exe'
notice: [clang-win] x86-32: using resource-compiler 'rc.exe'
notice: [clang-win] x86-32: using mc-compiler 'mc.exe'
notice: [clang-win] x86-32: using idl-compiler 'midl.exe'
notice: [clang-win] arm-32: using linker '"link.exe"'
notice: [clang-win] arm-32: using assembler 'armasm.exe"'
notice: [clang-win] arm-32: using archiver '"link.exe" /lib'
notice: [clang-win] arm-32: using manifest-tool 'mt.exe'
notice: [clang-win] arm-32: using resource-compiler 'rc.exe'
notice: [clang-win] arm-32: using mc-compiler 'mc.exe'
notice: [clang-win] arm-32: using idl-compiler 'midl.exe'
notice: [clang-win] x86-64: using linker '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\link.exe"'
notice: [clang-win] x86-64: using assembler '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\ml64.exe"'
notice: [clang-win] x86-64: using archiver '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\link.exe" /lib'
notice: [clang-win] x86-64: using manifest-tool 'mt.exe'
notice: [clang-win] x86-64: using resource-compiler 'rc.exe'
notice: [clang-win] x86-64: using mc-compiler 'mc.exe'
notice: [clang-win] x86-64: using idl-compiler 'midl.exe'
notice: [clang-win] arm-64: using linker '"link.exe"'
notice: [clang-win] arm-64: using assembler 'armasm64.exe"'
notice: [clang-win] arm-64: using archiver '"link.exe" /lib'
notice: [clang-win] arm-64: using manifest-tool 'mt.exe'
notice: [clang-win] arm-64: using resource-compiler 'rc.exe'
notice: [clang-win] arm-64: using mc-compiler 'mc.exe'
notice: [clang-win] arm-64: using idl-compiler 'midl.exe'

Building target '../build/stage'
     Build request: object(property-set)@427 <address-model>64 <architecture>x86 <debug-symbols>on <link>static <runtime-link>shared <target-os>windows <threadapi>win32 <threading>multi <toolset-clang:platform>win <toolset>clang <variant>debug
     Command line free features:
     Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <define>BOOST_COROUTINES_SOURCE <hardcode-dll-paths>false <include>../include&&/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/include <library>/boost/context//boost_context <link>shared:<define>BOOST_COROUTINES_DYN_LINK=1 <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/stage/lib <relevant>cxxflags:<relevant>segmented-stacks <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>.tag <target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <target-os>linux,<toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack <toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack <toolset>msvc,<runtime-link>shared:<threading>multi <translate-path>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build>.stage-translate-path

     Common properties:  <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <define>BOOST_COROUTINES_SOURCE <embed-manifest-via>mt <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>false <host-os>windows <include>../include&&/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/include <inlining>off <install-dependencies>off <library>/boost/context//boost_context <link>static <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <location>/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/vcpkg/blds/boost-coroutine/x64-windows-custom-dbg/stage/lib <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>cxxflags:<relevant>segmented-stacks <relevant>cxxflags:<relevant>target-os <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-clang:platform>win <toolset-clang:version>16.0.5 <toolset>clang <translate-path>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean\build>.stage-translate-path <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop

     Building target '../boost_context'
         Build request: object(property-set)@456 <address-model>64 <architecture>x86 <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <embed-manifest-via>mt <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <inlining>off <link>static <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>variant <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-clang:platform>win <toolset-clang:version>16.0.5 <toolset>clang <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
         Command line free features:
         Target requirements: <archiveflags>-machine:x64 -nologo <define>BOOST_ALL_NO_LIB=1 <file>/boost//C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/debug/lib/boost_context-vc140-mt-gd.lib <include>../include&&/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/include <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <tag>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>.tag <toolset>msvc,<runtime-link>shared:<threading>multi <variant>debug

         Common properties:  <address-model>64 <architecture>x86 <archiveflags>-machine:x64 -nologo <asynch-exceptions>off <coverage>off <debug-store>object <debug-symbols>on <define>BOOST_ALL_NO_LIB=1 <embed-manifest-via>mt <embed-manifest>on <exception-handling>on <extern-c-nothrow>off <file>/boost//C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/debug/lib/boost_context-vc140-mt-gd.lib <hardcode-dll-paths>true <host-os>windows <include>../include&&/C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/include <inlining>off <install-dependencies>off <link>static <linkflags>-machine:x64 -nologo -debug -INCREMENTAL <midl-robust>yes <midl-stubless-proxy>yes <optimization>off <os>NT <pch>on <preserve-test-targets>on <profiling>off <relevant>threading:<relevant>runtime-link <relevant>threading:<relevant>toolset <relevant>variant <response-file>auto <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>%Jamfile<C:\Users\dkgh\source\repos\vcpkg-mwes\vcpkg_installed\x64-windows-custom\vcpkg\blds\boost-coroutine\src\ost-1.83.0-554f073b34.clean>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-clang:platform>win <toolset-clang:version>16.0.5 <toolset>clang <user-interface>console <variant>debug <vectorize>off <warnings-as-errors>off <warnings>on <windows-api>desktop
error: Unable to find file or target named
error:     '/boost//C:/Users/dkgh/source/repos/vcpkg-mwes/vcpkg_installed/x64-windows-custom/x64-windows-custom/debug/lib/boost_context-vc140-mt-gd.lib'
error: referred to from project at
error:     '..'

ninja: build stopped: subcommand failed.
**Additional context**
vcpkg.json
{
  "version": "0.0.0",
  "builtin-baseline": "2a01db703fec3cdd13ca884a6a84d1505df2d235",
  "dependencies": [
    "boost-coroutine"
  ]
}

Triplet:

x64-windows-custom.cmake
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/x64-windows-llvm-toolchain.cmake")
set(VCPKG_LOAD_VCVARS_ENV ON)

Toolchain file:

x64-windows-llvm-toolchain.cmake
include_guard(GLOBAL)

set(CMAKE_C_COMPILER "clang-cl.exe" CACHE STRING "")
set(CMAKE_CXX_COMPILER "clang-cl.exe" CACHE STRING "")
set(CMAKE_AR "llvm-lib.exe" CACHE STRING "")
set(CMAKE_LINKER "lld-link.exe" CACHE STRING "")
set(CMAKE_ASM_MASM_COMPILER "ml64.exe" CACHE STRING "")
set(CMAKE_RC_COMPILER "rc.exe" CACHE STRING "")
set(CMAKE_MT "mt.exe" CACHE STRING "")

include("$ENV{VCPKG_ROOT}/scripts/toolchains/windows.cmake")

@LilyWangLL LilyWangLL added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Nov 28, 2023
@Neumann-A
Copy link
Contributor

@JavierMatosD can also be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

4 participants