Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm] llvm-tblgen.exe fails when building LLVM #11558

Closed
BillyONeal opened this issue May 25, 2020 · 14 comments · Fixed by #11703
Closed

[llvm] llvm-tblgen.exe fails when building LLVM #11558

BillyONeal opened this issue May 25, 2020 · 14 comments · Fixed by #11703
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-update The issue is with a library, which is requesting update new revision

Comments

@BillyONeal
Copy link
Member

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

@BillyONeal BillyONeal added the category:port-bug The issue is with a library, which is something the port should already support label May 25, 2020
@BillyONeal
Copy link
Member Author

BillyONeal commented May 25, 2020

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

@JackBoosY JackBoosY self-assigned this May 25, 2020
@yurybura
Copy link
Contributor

yurybura commented May 25, 2020

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

@Neumann-A
Copy link
Contributor

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

@Neumann-A
Copy link
Contributor

image
Looks like a very buggy OptionsMap

@yurybura
Copy link
Contributor

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

@Neumann-A
Copy link
Contributor

current llvm master seems to compile fine in VCPKG

@JackBoosY
Copy link
Contributor

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

@JackBoosY JackBoosY added the category:port-update The issue is with a library, which is requesting update new revision label May 27, 2020
@BillyONeal
Copy link
Member Author

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

@yurybura
Copy link
Contributor

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

@napyc
Copy link

napyc commented May 28, 2020

This problem is with MSVC(14.26.28801),I 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

@BillyONeal
Copy link
Member Author

@napyc That's because 14.26 implements P0883

@Neumann-A
Copy link
Contributor

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

@BillyONeal
Copy link
Member Author

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

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

@yurybura
Copy link
Contributor

yurybura commented Jun 1, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants