microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[boost-cobalt] Build error on x64-linux

mezdej opened this issue · comments

Package: boost-cobalt:x64-linux@1.85.0

Host Environment

  • Host: x64-linux
  • Compiler: GNU 10.2.1
  • vcpkg-tool version: 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457
    vcpkg-scripts version: cbf4a66 2024-05-09 (10 hours ago)

To Reproduce

vcpkg install boost-cobalt

Failure logs

-- Using cached boostorg-cobalt-boost-1.85.0.tar.gz.
-- Cleaning sources at /home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/src/ost-1.85.0-a6678fa3f6.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/mezdej/environment/vcpkg/downloads/boostorg-cobalt-boost-1.85.0.tar.gz
-- Using source at /home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/src/ost-1.85.0-a6678fa3f6.clean
-- Configuring x64-linux
-- Building x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /home/mezdej/environment/vcpkg/downloads/tools/cmake-3.29.2-linux/cmake-3.29.2-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j21
    Working Directory: /home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/x64-linux-dbg
    See logs for more information:
      /home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/install-x64-linux-dbg-out.log
      /home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/install-x64-linux-dbg-err.log

Call Stack (most recent call first):
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  installed/x64-linux/share/vcpkg-boost/boost-install.cmake:65 (vcpkg_cmake_install)
  ports/boost-cobalt/portfile.cmake:12 (boost_configure_and_install)
  scripts/ports.cmake:175 (include)



/home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/install-x64-linux-dbg-err.log
ninja: error: unknown target 'install'
/home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/install-x64-linux-dbg-out.log
Change Dir: '/home/mezdej/environment/vcpkg/buildtrees/boost-cobalt/x64-linux-dbg'

Run Build Command(s): /home/mezdej/environment/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -v -v -j21 install

Please check the configure log.

I have found that entry line:
"Boost.Cobalt: not building, can't include ."

config-x64-linux-out.log
config-x64-linux-dbg-CMakeCache.txt.log

try_compile(
        BOOST_COBALT_HAS_COROUTINE_INCLUDE
        ${CMAKE_CURRENT_BINARY_DIR}
        ${CMAKE_CURRENT_LIST_DIR}/coroutine.cpp
        CXX_STANDARD 20
        CXX_STANDARD_REQUIRED 20
        OUTPUT_VARIABLE TRY_COMPILE_OUTPUT)

if (NOT BOOST_COBALT_HAS_COROUTINE_INCLUDE)
    message(STATUS "Boost.Cobalt: not building, can't include <coroutine>.")
    message(DEBUG ${TRY_COMPILE_OUTPUT})
    return()
endif()

Need to check why try_compile fails

check the *.yaml file in the subfolder CMakeFiles of the build folder

gcc-10 probably needs -fcoroutines in CXXFLAGS

exactly as you said:
295 | #error "the coroutine header requires -fcoroutines"
Can you guys fix it?

Please add -fcoroutines in CXXFLAGS for gcc-10 @FrankXie05