microsoft / vcpkg

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

[llvm] build failure #17663

Closed tan-wei closed 3 years ago

tan-wei commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install llvm[clang,clang-tools-extra,compiler-rt,default-options,default-targets,enable-abi-breaking-checks,enable-assertions,enable-bindings,enable-eh,enable-ffi,enable-rtti,enable-terminfo,enable-threads,libclc,lld,lldb,mlir,polly,tools,utils,target-all]

Failure logs

Computing installation plan...
The following packages will be built and installed:
    llvm[clang,clang-tools-extra,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-abi-breaking-checks,enable-assertions,enable-bindings,enable-eh,enable-ffi,enable-rtti,enable-terminfo,enable-threads,libclc,lld,lldb,mlir,parallel-libs,polly,target-aarch64,target-all,target-amdgpu,target-arm,target-avr,target-bpf,target-hexagon,target-lanai,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-systemz,target-webassembly,target-x86,target-xcore,tools,utils]:x86-windows -> 11.1.0
Detecting compiler hash for triplet x86-windows...
Could not locate cached archive: C:\Users\Winterreise\AppData\Local\vcpkg\archives\0f\0fa29d11523be47a34fd14a3064bfec18d1b7300.zip
Starting package 1/1: llvm:x86-windows
Building package llvm[clang,clang-tools-extra,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-abi-breaking-checks,enable-assertions,enable-bindings,enable-eh,enable-ffi,enable-rtti,enable-terminfo,enable-threads,libclc,lld,lldb,mlir,parallel-libs,polly,target-aarch64,target-all,target-amdgpu,target-arm,target-avr,target-bpf,target-hexagon,target-lanai,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-systemz,target-webassembly,target-x86,target-xcore,tools,utils]:x86-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Using cached C:/vcpkg/downloads/llvm-llvm-project-llvmorg-11.1.0.tar.gz
-- Cleaning sources at C:/vcpkg/buildtrees/llvm/src/org-11.1.0-a960fe6a14.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/vcpkg/downloads/llvm-llvm-project-llvmorg-11.1.0.tar.gz
-- Applying patch 0001-add-msvc-options.patch
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0003-fix-openmp-debug.patch
-- Applying patch 0004-fix-dr-1734.patch
-- Applying patch 0005-fix-tools-path.patch
-- Applying patch 0006-workaround-msvc-bug.patch
-- Applying patch 0007-fix-compiler-rt-install-path.patch
-- Applying patch 0008-fix-libcxx-install.patch
-- Applying patch 0009-fix-tools-install-path.patch
-- Using source at C:/vcpkg/buildtrees/llvm/src/org-11.1.0-a960fe6a14.clean
-- Configuring x86-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:105 (message):
    Command failed: ninja -v
    Working Directory: C:/vcpkg/buildtrees/llvm/x86-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      C:\vcpkg\buildtrees\llvm\config-x86-windows-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_cmake.cmake:324 (vcpkg_execute_required_process)
  ports/llvm/portfile.cmake:198 (vcpkg_configure_cmake)
  scripts/ports.cmake:142 (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: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e

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

Additional context The log file is here, it complains libffi is not found. However, libffi is installed by vcpkg successfully. config-x86-windows-out.log

pratikpc commented 3 years ago

./vcpkg install llvm[clang,clang-tools-extra,compiler-rt,default-options,default-targets,enable-abi-breaking-checks,enable-assertions,enable-bindings,enable-eh,enable-rtti,enable-terminfo,enable-threads,libclc,lld,lldb,mlir,polly,tools,utils,target-all]

What happens when you run this? If this works, then the issue is with enable-ffi and the bugreport can be made much smaller.

Is there a successful build with x64 BTW? If there is a successful build with x64 with enable-ffi, while it fails with x86, then we could further refine the issue

tan-wei commented 3 years ago

@pratikpc I try to run vcpkg install llvm[enable-ffi] and vcpkg install llvm[enable-ffi]:x64-windows, they both fail with the same error. So I think the option enable-ffi does not work on Windows now.

pratikpc commented 3 years ago

@tan-wei does it get build without ffi?

Maybe it would get fixed or patched when it gets updated to 12

tan-wei commented 3 years ago

@pratikpc Thanks, seems ok if enable-ffi is off. Thanks. The issue should be closed if LLVM 12.0.0 is out in vcpkg.

NancyLi1013 commented 3 years ago

Hi @tan-wei and @pratikpc

llvmhas been updated to 12.0.0 in vcpkg now, please try to update vcpkg to the latest commit to rebuild this.

tan-wei commented 3 years ago

@NancyLi1013 OK, thanks very much. I'll try it soon.

tan-wei commented 3 years ago

Confirmed. Thanks very much!