halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.88k stars 1.07k forks source link

LLVM 10 is failing to build on Windows #5326

Open steven-johnson opened 4 years ago

steven-johnson commented 4 years ago

LLVM10 hasn't changed in months, so something about our build setup has changed... either changes to the buildbot script or changes to the CMake files.

See (e.g.) https://buildbot.halide-lang.org/master/#/builders/35/builds/1

FAILED: lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RTDyldMemoryManager.cpp.obj 
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x86\cl.exe  /nologo /TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_HAS_EXCEPTIONS=0 -D_LARGEFILE_SOURCE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\ExecutionEngine\RuntimeDyld -IC:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\lib\ExecutionEngine\RuntimeDyld -Iinclude -IC:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:strictStrings /Oi /Zc:rvalueCast /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4345 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /Gw /MD /O2 /Ob2   -UNDEBUG  /EHs-c- /GR -std:c++14 /showIncludes /Folib\ExecutionEngine\RuntimeDyld\CMakeFiles\LLVMRuntimeDyld.dir\RTDyldMemoryManager.cpp.obj /Fdlib\ExecutionEngine\RuntimeDyld\CMakeFiles\LLVMRuntimeDyld.dir\LLVMRuntimeDyld.pdb /FS -c C:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\lib\ExecutionEngine\RuntimeDyld\RTDyldMemoryManager.cpp
C:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\include\llvm/Support/type_traits.h(181): error C2338: inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable
C:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\include\llvm/ADT/SmallVector.h(315): note: see reference to class template instantiation 'llvm::is_trivially_copyable<T>' being compiled
        with
        [
            T=std::pair<void *,size_t>
        ]
C:\build_bot\worker\x86-32-windows-10-cmake\llvm-project\llvm\include\llvm/ADT/SmallVector.h(837): note: see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled
        with
        [
            T=std::pair<void *,size_t>
        ]
shoaibkamil commented 4 years ago

LLVM10 hasn't changed in months

While that's true, I think we should be building against a release tag, not a branch.

I wonder if this is related to changing to C++14? Most google results seem to inidicate people "solved" this by moving to the LLVM 11.x branch :-/

shoaibkamil commented 4 years ago

Vcpkg's issue: https://github.com/microsoft/vcpkg/issues/12814

steven-johnson commented 4 years ago

Maybe, but again, this is some recent injection on our side.

steven-johnson commented 4 years ago

we should be building against a release tag, not a branch

Also true.

https://github.com/halide/Halide/issues/5328

shoaibkamil commented 4 years ago

Did we recently change compiler versions on the buildbots? My local version of cl.exe doesn't seem to have this issue, but it looks like from some of the threads on the internet that it's a specific VC version showing this.

steven-johnson commented 4 years ago

Yeah, it's quite possible -- there have been a lot of tweaks in the buildbot lately. I'll do some checking on Moday.

steven-johnson commented 4 years ago

I have inserted a brutal workaround into the Buildbot (https://github.com/halide/build_bot/pull/104). I'm going to leave this open for now as a better long-term fix should be available.