JuliaHubOSS/llvm-cbe

Dockerfile fails to build

Manouchehri opened this issue · 1 comments

Just noticed that the Dockerfile still uses LLVM 8.0, and the build fails because of it I think. Do you have an updated Dockerfile for LLVM 10 by any chance? =)

docker build https://github.com/JuliaComputingOSS/llvm-cbe.git
...
[285/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/EnumTables.cpp.o
[286/1914] Linking CXX static library lib/libLLVMMC.a
[287/1914] Building CXX object projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o
FAILED: projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o 
/usr/bin/c++   -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/llvm-cbe/lib/Target/CBackend -I../projects/llvm-cbe/lib/Target/CBackend -I/usr/include/libxml2 -Iinclude -I../include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -g    -fno-exceptions -fno-rtti -MD -MT projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o -MF projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o.d -o projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CBackend.cpp.o -c /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp
In file included from ../include/llvm/IR/Argument.h:19:0,
                 from ../include/llvm/IR/Function.h:26,
                 from ../include/llvm/Analysis/LegacyDivergenceAnalysis.h:20,
                 from ../include/llvm/CodeGen/TargetLowering.h:32,
                 from /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CTargetMachine.h:17,
                 from /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.h:1,
                 from /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CBackend.cpp:15:
../include/llvm/IR/Attributes.h:74:38: fatal error: llvm/IR/Attributes.inc: No such file or directory
     #include "llvm/IR/Attributes.inc"
                                      ^
compilation terminated.
[288/1914] Building CXX object projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o
FAILED: projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o 
/usr/bin/c++   -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/llvm-cbe/lib/Target/CBackend -I../projects/llvm-cbe/lib/Target/CBackend -I/usr/include/libxml2 -Iinclude -I../include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -g    -fno-exceptions -fno-rtti -MD -MT projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o -MF projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o.d -o projects/llvm-cbe/lib/Target/CBackend/CMakeFiles/LLVMCBackendCodeGen.dir/CTargetMachine.cpp.o -c /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CTargetMachine.cpp
In file included from ../include/llvm/IR/Argument.h:19:0,
                 from ../include/llvm/IR/Function.h:26,
                 from ../include/llvm/Analysis/LegacyDivergenceAnalysis.h:20,
                 from ../include/llvm/CodeGen/TargetLowering.h:32,
                 from /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CTargetMachine.h:17,
                 from /root/llvm/projects/llvm-cbe/lib/Target/CBackend/CTargetMachine.cpp:14:
../include/llvm/IR/Attributes.h:74:38: fatal error: llvm/IR/Attributes.inc: No such file or directory
     #include "llvm/IR/Attributes.inc"
                                      ^
compilation terminated.
[289/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeIndex.cpp.o
[290/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/CVTypeVisitor.cpp.o
[291/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/StringsAndChecksums.cpp.o
[292/1914] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/GlobalISelEmitter.cpp.o
[293/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/LazyRandomTypeCollection.cpp.o
[294/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeIndexDiscovery.cpp.o
[295/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/MergingTypeTableBuilder.cpp.o
[296/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/RecordSerialization.cpp.o
[297/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SimpleTypeSerializer.cpp.o
[298/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeHashing.cpp.o
[299/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/GlobalTypeTableBuilder.cpp.o
[300/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeTableCollection.cpp.o
[301/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolSerializer.cpp.o
[302/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeDumpVisitor.cpp.o
[303/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolRecordMapping.cpp.o
[304/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeRecordHelpers.cpp.o
[305/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/RecordName.cpp.o
[306/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeRecordMapping.cpp.o
[307/1914] Building CXX object lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o
[308/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolRecordHelpers.cpp.o
[309/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeStreamMerger.cpp.o
[310/1914] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolDumper.cpp.o
ninja: build stopped: subcommand failed.
The command '/bin/sh -c set -e;   mkdir -p /root/llvm/build;   cd /root/llvm/build;   cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..;   ninja llvm-cbe;   ninja lli;   ninja CBEUnitTests;   /root/llvm/build/projects/llvm-cbe/unittests/CWriterTest;   ln -s /root/llvm/build/bin/llvm-cbe /bin/llvm-cbe;' returned a non-zero code: 1
```

It might just work if you change it to download LLVM 10 instead?