microsoft / vcpkg

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

[llvm] build failure #23299

Closed RookieTars closed 2 years ago

RookieTars commented 2 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install halide:x64-windows

Failure logs -Cut and paste the appropriate build messages from the console output.

Computing installation plan...
The following packages will be built and installed:
    halide[core,jit,target-x86]:x64-windows -> 13.0.2
  * llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-windows -> 13.0.0#1
  * vcpkg-cmake[core]:x64-windows -> 2022-01-19
  * vcpkg-cmake-config[core]:x64-windows -> 2022-02-06
  * zlib[core]:x64-windows -> 1.2.11#13
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
-- Using HTTP(S)_PROXY in environment variables.
Restored 0 packages from C:\Users\huawei\AppData\Local\vcpkg\archives in 186.3 us. Use --debug to see more details.
Starting package 1/5: vcpkg-cmake:x64-windows
Building package vcpkg-cmake[core]:x64-windows...
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_get_vars.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/cmake_get_vars
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/cmake_get_vars/CMakeLists.txt
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg-port-config.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/copyright
-- Performing post-build validation
-- Performing post-build validation done
A suitable version of 7zip was not found (required v19.0.0). Downloading portable 7zip v19.0.0...
Downloading 7zip...
  https://www.7-zip.org/a/7z1900-x64.msi -> C:\src\vcpkg\downloads\7z1900-x64.msi
Extracting 7zip...
Stored binary cache: C:\Users\huawei\AppData\Local\vcpkg\archives\3b\3b7754c671e8684467754c4a04a10f3c6af67a17ffad79b43748aeb06d55fdeb.zip
Installing package vcpkg-cmake[core]:x64-windows...
Elapsed time for package vcpkg-cmake:x64-windows: 7.438 s
Starting package 2/5: vcpkg-cmake-config:x64-windows
Building package vcpkg-cmake-config[core]:x64-windows...
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/vcpkg-port-config.cmake
-- Installing: C:/src/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\huawei\AppData\Local\vcpkg\archives\4b\4bee63aceb74c2a1d34dc2546a19a1cde15688845eae53b92fbac612f0a1e766.zip
Installing package vcpkg-cmake-config[core]:x64-windows...
Elapsed time for package vcpkg-cmake-config:x64-windows: 191.5 ms
Starting package 3/5: zlib:x64-windows
Building package zlib[core]:x64-windows...
-- Downloading https://www.zlib.net/zlib-1.2.11.tar.gz;https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz -> zlib1211.tar.gz...
-- Extracting source C:/src/vcpkg/downloads/zlib1211.tar.gz
-- Applying patch cmake_dont_build_more_than_needed.patch
-- Applying patch 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-- Applying patch add_debug_postfix_on_mingw.patch
-- Applying patch 0002-android-build-mingw.patch
-- Using source at C:/src/vcpkg/buildtrees/zlib/src/1.2.11-e9a093319e.clean
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: C:/src/vcpkg/packages/zlib_x64-windows/share/zlib/vcpkg-cmake-wrapper.cmake
-- Fixing pkgconfig file: C:/src/vcpkg/packages/zlib_x64-windows/lib/pkgconfig/zlib.pc
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst -> msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
-- Using msys root at C:/src/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Fixing pkgconfig file: C:/src/vcpkg/packages/zlib_x64-windows/debug/lib/pkgconfig/zlib.pc
-- Installing: C:/src/vcpkg/packages/zlib_x64-windows/share/zlib/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\huawei\AppData\Local\vcpkg\archives\45\45c763ac2eb7b2b4996a347bee704e37e7515f27672dbae91a936616f1d80f97.zip
Installing package zlib[core]:x64-windows...
Elapsed time for package zlib:x64-windows: 16.21 s
Starting package 4/5: llvm:x64-windows
Building package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Downloading https://github.com/llvm/llvm-project/archive/llvmorg-13.0.0.tar.gz -> llvm-llvm-project-llvmorg-13.0.0.tar.gz...
-- Extracting source C:/src/vcpkg/downloads/llvm-llvm-project-llvmorg-13.0.0.tar.gz
-- 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 0007-fix-compiler-rt-install-path.patch
-- Applying patch 0009-fix-tools-install-path.patch
-- Applying patch 0010-fix-libffi.patch
-- Applying patch 0011-fix-libxml2.patch
-- Using source at C:/src/vcpkg/buildtrees/llvm/src/org-13.0.0-41c002f263.clean
-- Downloading https://www.python.org/ftp/python/3.10.1/python-3.10.1-embed-amd64.zip -> python-3.10.1-embed-amd64.zip...
-- Configuring x64-windows
CMake Warning at installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:487 (message):
  The following variables are not used in CMakeLists.txt:

      LLDB_ENABLE_CURSES

  Please recheck them and remove the unnecessary options from the
  `vcpkg_cmake_configure` call.

  If these options should still be passed for whatever reason, please use the
  `MAYBE_UNUSED_VARIABLES` argument.
Call Stack (most recent call first):
  ports/llvm/portfile.cmake:236 (vcpkg_cmake_configure)
  scripts/ports.cmake:145 (include)

-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:158 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j9
    Working Directory: C:/src/vcpkg/buildtrees/llvm/x64-windows-dbg
    See logs for more information:
      C:\src\vcpkg\buildtrees\llvm\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:111 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
  ports/llvm/portfile.cmake:261 (vcpkg_cmake_install)
  scripts/ports.cmake:145 (include)

Error: Building package llvm:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+llvm
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[llvm]+Build+error
including:
  package: llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-windows -> 13.0.0#1
    vcpkg-tool version: 2022-02-24-7efe7f2b04912a7d674f86a406f9f2711c0221c6
    vcpkg-scripts version: 1b1ae50e1 2022-02-25 (11 hours ago)

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

-Please attach any additional failure logs mentioned in the console output. install-x64-windows-dbg-out.log

Additional context

FrankXie05 commented 2 years ago

@RookieTars Thanks for posting this issue, could you please provide the error log? I didn't find the error in the file you provided. eg: config-x64-windows-err.log install-x64-windows-dbg-err.log install-x64-windows-rel-err.log

yotamat commented 2 years ago

I'm seeing the same issue.

In my case, To Reproduce: Steps to reproduce the behavior: ./vcpkg install opencv4[*]

System Info:

Error message:

Starting package 1/35: llvm:x64-windows
Building package llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Using cached llvm-llvm-project-llvmorg-13.0.0.tar.gz.
-- Cleaning sources at C:/src/vcpkg/buildtrees/llvm/src/org-13.0.0-41c002f263.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/src/vcpkg/downloads/llvm-llvm-project-llvmorg-13.0.0.tar.gz
-- 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 0007-fix-compiler-rt-install-path.patch
-- Applying patch 0009-fix-tools-install-path.patch
-- Applying patch 0010-fix-libffi.patch
-- Applying patch 0011-fix-libxml2.patch
-- Using source at C:/src/vcpkg/buildtrees/llvm/src/org-13.0.0-41c002f263.clean
-- Configuring x64-windows
CMake Warning at installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:487 (message):
  The following variables are not used in CMakeLists.txt:

      LLDB_ENABLE_CURSES

  Please recheck them and remove the unnecessary options from the
  `vcpkg_cmake_configure` call.

  If these options should still be passed for whatever reason, please use the
  `MAYBE_UNUSED_VARIABLES` argument.
Call Stack (most recent call first):
  ports/llvm/portfile.cmake:236 (vcpkg_cmake_configure)
  scripts/ports.cmake:145 (include)

-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:158 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j17
    Working Directory: C:/src/vcpkg/buildtrees/llvm/x64-windows-dbg
    See logs for more information:
      C:\src\vcpkg\buildtrees\llvm\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:111 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
  ports/llvm/portfile.cmake:261 (vcpkg_cmake_install)
  scripts/ports.cmake:145 (include)

Error: Building package llvm:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+llvm
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[llvm]+Build+error
including:
  package: llvm[clang,compiler-rt,core,default-options,default-targets,disable-abi-breaking-checks,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,lld,target-x86,tools]:x64-windows -> 13.0.0#1
    vcpkg-tool version: 2022-02-24-7efe7f2b04912a7d674f86a406f9f2711c0221c6
    vcpkg-scripts version: b726998b8 2022-02-28 (16 hours ago)

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

Requested Logs

I cannot attach the files you requested:

RookieTars commented 2 years ago

@FrankXie05 Sorry for the missing parts. But I have the same problem like @yotamat with config-x64-windows-err.log and install-x64-windows-dbg-err.log empty. install-x64-windows-rel-err.log doesn't exist, either.

Here's all my logs that are not empty in directory buildtrees/llvm. Hope these would help. patch-x64-windows-2-err.log patch-x64-windows-3-err.log patch-x64-windows-1-err.log patch-x64-windows-6-err.log stdout-x64-windows.log install-x64-windows-dbg-out.log config-x64-windows-out.log extract-err.log patch-x64-windows-5-err.log patch-x64-windows-0-err.log patch-x64-windows-4-err.log patch-x64-windows-7-err.log

FrankXie05 commented 2 years ago

@RookieTars Which version of CMake you use? I found you use CMake which installed inC:/Program Files/CMake/bin/cmake.exe. and did you install English language package in Visual Studio Installer?

@yotamat Thank you for your commit, but this may not be a problem because it is not the same port, you can re-submit an issue to solve it, of course, if it can help you, it is the best.

RookieTars commented 2 years ago

@FrankXie05 My CMake version is 3.23.0-rc1.And I have installed English language package in Visual Studio Installer.

yotamat commented 2 years ago

@RookieTars , @FrankXie05

Hi, I can update that my error is resolved after installing latest Visual Studio 2022. Original error occurs with Visual Studio 2017.

I don't have the machine available now so can't post exact compiler version; I will update this comment later.

@FrankXie05

What do you mean by not same port? I think the failing package LLVM-13.0.0-41c002f263 is exactly the same in both cases? Or am I misunderstanding?

FrankXie05 commented 2 years ago

@RookieTars I mean you maybe use cmake which not installed by VCPKG. "C:\Program Files\CMake\bin\cmake.exe" Could you remove it and install port again? @yotamat Sorry it's my problem, according your solution, there may be a problem with VS2017, or we should use VSto install the official cmake, currently using other methods to install (eg: python's pip install) will cause errors before compiling.

RookieTars commented 2 years ago

This issue was fixed yesterday. Build successed on my desktop.

FrankXie05 commented 2 years ago

Change label to port-bug and fixed by #23334