microsoft / vcpkg

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

llvm[openmp] build failure #12377

Closed tan-wei closed 3 years ago

tan-wei commented 4 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install llvm[openmp]

Failure logs

>_ vcpkg install llvm[openmp]
Computing installation plan...
The following packages will be built and installed:
    llvm[clang,core,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,openmp,tools]:x86-windows
Starting package 1/1: llvm:x86-windows
Building package llvm[clang,core,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-rtti,lld,openmp,tools]:x86-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Using cached D:/vcpkg/downloads/llvm-llvm-project-llvmorg-10.0.0.tar.gz
-- Extracting source D:/vcpkg/downloads/llvm-llvm-project-llvmorg-10.0.0.tar.gz
-- Applying patch 0001-allow-to-use-commas.patch
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0003-fix-vs2019-v16.6.patch
-- Using source at D:/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c.clean
-- Configuring x86-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
    Command failed: ninja -v
    Working Directory: D:/vcpkg/buildtrees/llvm/x86-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      D:\vcpkg\buildtrees\llvm\config-x86-windows-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:300 (vcpkg_execute_required_process)
  ports/llvm/portfile.cmake:168 (vcpkg_configure_cmake)
  scripts/ports.cmake:76 (include)

Error: Building package llvm:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: llvm:x86-windows
  Vcpkg version: 2020.06.15-nohash

Additionally, attach any relevant sections from the log files above.

config-x86-windows-out.log install-x86-windows-dbg-err.log

PhoebeHui commented 4 years ago

Confirmed, this issue could repro, check the history, that feature added by https://github.com/microsoft/vcpkg/pull/10295, and it has never worked with feature.

Failures: CMake Error at E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1566 (add_dependencies): The dependency target "FileCheck" of target "check-openmp" does not exist. Call Stack (most recent call first): E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1587 (add_lit_target) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/cmake/OpenMPTesting.cmake:183 (add_lit_testsuite) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/cmake/OpenMPTesting.cmake:198 (add_openmp_testsuite) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/CMakeLists.txt:95 (construct_check_openmp_target)

CMake Error at E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1566 (add_dependencies): The dependency target "FileCheck" of target "check-libomp" does not exist. Call Stack (most recent call first): E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1587 (add_lit_target) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/cmake/OpenMPTesting.cmake:183 (add_lit_testsuite) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/runtime/test/CMakeLists.txt:33 (add_openmp_testsuite)

CMake Error at E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1566 (add_dependencies): The dependency target "FileCheck" of target "check-ompt" does not exist. Call Stack (most recent call first): E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/llvm/cmake/modules/AddLLVM.cmake:1587 (add_lit_target) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/cmake/OpenMPTesting.cmake:183 (add_lit_testsuite) E:/VCPKG/boost_173/vcpkg/buildtrees/llvm/src/org-10.0.0-32c002c70c/openmp/runtime/test/CMakeLists.txt:36 (add_openmp_testsuite)

PhoebeHui commented 4 years ago

Looks same issue with https://bugs.llvm.org/show_bug.cgi?id=40557#c2

tan-wei commented 4 years ago

Thanks very much. Does it mean we should wait for llvm team fixing CMake module files?

yurybura commented 4 years ago

@PhoebeHui @tan-wei Let me check this issue. I think OpenMP doesn't support build without LLVM test tools (lit, FileCheck).

PhoebeHui commented 4 years ago

@yurybura, thank you as always!

After some investigation, found it requires feature 'utils', which setting 'LLVM_INCLUDE_UTILS' to 'ON', then it configured successfully.

However, it start to build failed with 'ninja: error: 'lib/libomp.dll.lib', needed by 'lib/libomp.libd', missing and no known rule to make it'