Neumann-A / my-vcpkg-triplets

my collection of vcpkg triplets
MIT License
70 stars 12 forks source link

[boost-thread] CMake Error #12

Closed Arndt-MBE closed 7 months ago

Arndt-MBE commented 7 months ago

Boost Thread cannot be built with LLVM. Do I understand correctly that this is already covered by this issue by @Neumann-A? Quite some effort seems to have been invested already - thank you for that.

How to reproduce:

vcpkg.exe install boost-thread --overlay-triplets=..\my-vcpkg-triplets --triplet=x64-win-llvm

Result:

CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: C:/Code/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j13
    Working Directory: C:/Code/vcpkg/buildtrees/boost-thread/x64-win-llvm-dbg
    See logs for more information:
      C:\Code\vcpkg\buildtrees\boost-thread\install-x64-win-llvm-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  installed/x64-windows/share/boost-build/boost-modular-build.cmake:139 (vcpkg_cmake_install)
  ports/boost-thread/portfile.cmake:12 (boost_modular_build)
  scripts/ports.cmake:170 (include)

Log file:

install-x64-win-llvm-dbg-out.log ends with

error:     '/boost//C:/Code/vcpkg/installed/x64-win-llvm/debug/lib/boost_chronod.lib'
error: referred to from project at
error:     '..'

That boost prefix to the absolute path is unsurprisingly a problem. Luckily, I can work around this by building only our project with LLVM, and sticking with MSVC for the VCPKG stuff for now.

Neumann-A commented 7 months ago
Installing 51/51 boost-thread:x64-win-llvm@1.84.0...
Building boost-thread:x64-win-llvm@1.84.0...
-- [OVERLAY] Loading triplet configuration from: E:\all\my-vcpkg-triplets\x64-win-llvm.cmake
-- Downloading https://github.com/boostorg/thread/archive/boost-1.84.0.tar.gz -> boostorg-thread-boost-1.84.0.tar.gz...
-- Extracting source E:/vcpkg_cache/downloads/boostorg-thread-boost-1.84.0.tar.gz
-- Using source at E:/all/vcpkg/buildtrees/boost-thread/src/ost-1.84.0-19b5b607c9.clean
-- Getting CMake variables for x64-win-llvm
-- Including E:/all/vcpkg/ports/boost-thread/b2-options.cmake
-- Configuring x64-win-llvm
-- Building x64-win-llvm-dbg
-- Building x64-win-llvm-rel
-- Copying headers
-- Copying headers done
-- Installing: E:/all/vcpkg/packages/boost-thread_x64-win-llvm/share/boost-thread/usage
-- Installing: E:/all/vcpkg/packages/boost-thread_x64-win-llvm/share/boost-thread/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 110 ms.
Elapsed time to handle boost-thread:x64-win-llvm: 7.6 s
boost-thread:x64-win-llvm package ABI: 83b23558dfdbd34d272e7544650ed0145a3f38d0843d50829d1ce4f540bb7be6
Total install time: 1 min
The package boost is compatible with built-in CMake targets:

    find_package(Boost REQUIRED [COMPONENTS <libs>...])
    target_link_libraries(main PRIVATE Boost::boost Boost::<lib1> Boost::<lib2> ...)

That boost prefix to the absolute path is unsurprisingly a problem.

no that is normal. The problem is that the name boost_chronod.lib is wrong. You are probably not using my overlays for boost-moddular-build-helper, boost-uninstall and vcpkg-cmake-get-vars from https://github.com/Neumann-A/my-vcpkg-ports.

Arndt-MBE commented 7 months ago

Works like a charm, thanks.