microsoft / vcpkg

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

[boost-cobalt] Build error on x64-linux #38677

Open mezdej opened 3 weeks ago

mezdej commented 3 weeks ago

Package: boost-cobalt:x64-linux@1.85.0

Host Environment

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 ```
Neumann-A commented 3 weeks ago

Please check the configure log.

mezdej commented 2 weeks ago

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

Neumann-A commented 2 weeks ago
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

Neumann-A commented 2 weeks ago

gcc-10 probably needs -fcoroutines in CXXFLAGS

mezdej commented 2 weeks ago

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

mezdej commented 1 week ago

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

FrankXie05 commented 5 days ago

@mezdej I will do it. :)