Vcpkg: [llvm] llvm-tblgen.exe fails when building LLVM

Created on 25 May 2020  路  14Comments  路  Source: microsoft/vcpkg

Host Environment

  • OS: Windows 10 2004
  • Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28805 for x86

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

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

PS D:\vcpkg2> .\vcpkg install llvm
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,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,tools]:x86-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Downloading https://github.com/llvm/llvm-project/archive/llvmorg-10.0.0.tar.gz...
-- Extracting source D:/vcpkg2/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
-- Using source at D:/vcpkg2/buildtrees/llvm/src/org-10.0.0-0eb85e4539
-- Downloading https://www.python.org/ftp/python/3.7.3/python-3.7.3-embed-win32.zip...
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: D:/vcpkg2/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
    Working Directory: D:/vcpkg2/buildtrees/llvm/x86-windows-dbg
    See logs for more information:
      D:\vcpkg2\buildtrees\llvm\install-x86-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/llvm/portfile.cmake:198 (vcpkg_install_cmake)
  scripts/ports.cmake:90 (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.02.04-nohash

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

-Please attach any additional failure logs mentioned in the console output.

[444/2867] cmd.exe /C "cd /D D:\vcpkg\buildtrees\llvm\x86-windows-dbg && D:\vcpkg\buildtrees\llvm\x86-windows-dbg\bin\llvm-tblgen.exe -gen-intrinsic-enums -intrinsic-prefix=mips -I D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include/llvm/IR -I D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o include/llvm/IR/IntrinsicsMips.h -d include/llvm/IR/IntrinsicsMips.h.d"
FAILED: include/llvm/IR/IntrinsicsMips.h 
cmd.exe /C "cd /D D:\vcpkg\buildtrees\llvm\x86-windows-dbg && D:\vcpkg\buildtrees\llvm\x86-windows-dbg\bin\llvm-tblgen.exe -gen-intrinsic-enums -intrinsic-prefix=mips -I D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include/llvm/IR -I D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include D:/vcpkg/buildtrees/llvm/src/org-10.0.0-0eb85e4539/llvm/include/llvm/IR/Intrinsics.td --write-if-changed -o include/llvm/IR/IntrinsicsMips.h -d include/llvm/IR/IntrinsicsMips.h.d"
llvm-tblgen.exe: Unknown command line argument '-gen-intrinsic-enums'.  Try: 'D:\vcpkg\buildtrees\llvm\x86-windows-dbg\bin\llvm-tblgen.exe --help'
llvm-tblgen.exe: Did you mean '--version'?
llvm-tblgen.exe: Unknown command line argument '-intrinsic-prefix=mips'.  Try: 'D:\vcpkg\buildtrees\llvm\x86-windows-dbg\bin\llvm-tblgen.exe --help'
llvm-tblgen.exe: Did you mean '--info-output-file=mips'?

Additional context

port-bug port-update

Most helpful comment

current llvm master seems to compile fine in VCPKG

All 14 comments

@JackBoosY Any chance this was caused by the cmake version change?

@BillyONeal
I can reproduce it. Let me check...

Funny thing is not even --help works on the executable.

image
Looks like a very buggy OptionsMap

@Neumann-A Yes. Command line arguments don't work at all. I think it is LLVM bug.

current llvm master seems to compile fine in VCPKG

@Neumann-A Okay, so this issue will fix in next update.

Does this mean the official 10.x release is borked like this?

@BillyONeal I'm trying to fix it for release 10.

This problem is with MSVC(14.26.28801)锛孖 have tryed llvm 9.0.1 and 10.0.0
it always occured. when I tryed to complie llvm10.0.0 with MSVC(14.25.28610), I just succeeded

@napyc That's because 14.26 implements P0883

Does llvm 11 also implement that? I was pretty sure that I tried to use clang-cl and it showed the same issue.

Clang on Windows uses the MSVC++ standard library and this is a standard library change, not a compiler change. See discussion https://github.com/microsoft/STL/issues/661

LLVM is missing initializers for some of their bits so they have a variable not eligible for constant initialization, which dooms the program.

This issue was fixed in the LLVM master.
See http://llvm.org/PR41367 for details.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jack17529 picture jack17529  路  3Comments

F0I0l0I0P picture F0I0l0I0P  路  3Comments

oahzuw picture oahzuw  路  3Comments

jasjuang picture jasjuang  路  3Comments

aspioupiou picture aspioupiou  路  3Comments