Mats Bertil Tegner via llvm-dev
2019-Sep-24 09:40 UTC
[llvm-dev] Errors when trying to compile LLVM 9.0.0 under Slackware Linux
Hello everyone, I'm trying to compile LLVM 9.0.0 under Slackware Linux-current x86_64 using LLVM/Clang 8.0.1 but I get errors. Build script: http://slackware.osuosl.org/slackware64-current/source/d/llvm/llvm.SlackBuild Patches: http://slackware.osuosl.org/slackware-current/source/d/llvm/clang-tools-extra.no.clangd.diff.gz http://slackware.osuosl.org/slackware-current/source/d/llvm/clang.toolchains.i586.triple.diff.gz http://slackware.osuosl.org/slackware-current/source/d/llvm/n_clang_allow_BUILD_SHARED_LIBRARY.patch.gz Sources used: http://releases.llvm.org/9.0.0/llvm-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/cfe-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/compiler-rt-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/libcxx-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/libcxxabi-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/lld-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/lldb-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/openmp-9.0.0.src.tar.xz http://releases.llvm.org/9.0.0/clang-tools-extra-9.0.0.src.tar.xz I get the following errors and the compilation restarts every time: In file included from /tmp/llvm-9.0.0.src/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp:15: In file included from /tmp/llvm-9.0.0.src/include/llvm/CodeGen/MachineFunction.h:30: In file included from /tmp/llvm-9.0.0.src/include/llvm/CodeGen/MachineBasicBlock.h:21: In file included from /tmp/llvm-9.0.0.src/include/llvm/CodeGen/MachineInstr.h:23: In file included from /tmp/llvm-9.0.0.src/include/llvm/Analysis/AliasAnalysis.h:44: In file included from /tmp/llvm-9.0.0.src/include/llvm/Analysis/MemoryLocation.h:20: In file included from /tmp/llvm-9.0.0.src/include/llvm/IR/Instructions.h:31: /tmp/llvm-9.0.0.src/include/llvm/IR/Function.h:569:59: error: no member named 'NoFree' in 'llvm::Attribute' return onlyReadsMemory() || hasFnAttribute(Attribute::NoFree); ~~~~~~~~~~~^ /tmp/llvm-9.0.0.src/include/llvm/IR/Function.h:572:26: error: no member named 'NoFree' in 'llvm::Attribute' addFnAttr(Attribute::NoFree); ~~~~~~~~~~~^ [ 4%] Linking CXX static library ../../../lib64/libLLVMSymbolize.a [ 4%] Built target LLVMSymbolize [ 4%] Building CXX object lib/ExecutionEngine/OProfileJIT/CMakeFiles/LLVMOProfileJIT.dir/OProfileWrapper.cpp.o [ 4%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/DbiModuleList.cpp.o [ 4%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/DbiStream.cpp.o /tmp/llvm-9.0.0.src/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp:115:65: error: no viable conversion from 'uint64_t' (aka 'unsigned long') to 'object::SectionedAddress' DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size); ^~~~ /tmp/llvm-9.0.0.src/include/llvm/Object/ObjectFile.h:139:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long') to 'const llvm::object::SectionedAddress &' for 1st argument struct SectionedAddress { ^ /tmp/llvm-9.0.0.src/include/llvm/Object/ObjectFile.h:139:8: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'uint64_t' (aka 'unsigned long') to 'llvm::object::SectionedAddress &&' for 1st argument /tmp/llvm-9.0.0.src/include/llvm/DebugInfo/DIContext.h:223:32: note: passing argument to parameter 'Address' here object::SectionedAddress Address, uint64_t Size, ^ [ 4%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/DbiStreamBuilder.cpp.o 3 errors generated. How do I fix these errors? Sincerely, Mats Tegner