[llvm-dev] Linker error while building a new back end in the latest LLVM from GitHub
Alex Susu via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 3 13:43:26 PST 2021
Hello.
I am trying to build against the latest LLVM source from GitHub (from Jan 23 2021) my
Connex processor back end, which is mostly inspired from the BPF and Mips back end.
I did my best to correct all the errors that appeared, but I now get a rather strange
linker error that I don't know exactly how to solve (maybe somebody is more experienced
than me on this). Maybe I have an error in lib/Target/Connex/CMakeLists.txt.
The error I get while building LLVM is:
<<cd /home/asusu/LLVM/llvm2021_01_23/llvm-project/build/lib/Target/Connex &&
/usr/bin/cmake -E cmake_link_script CMakeFiles/LLVMConnexCodeGen.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall
-Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers
-pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized
-Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wno-comment -g
-Wl,-rpath-link,/home/asusu/LLVM/llvm2021_01_23/llvm-project/build/./lib -Wl,-z,defs
-Wl,-z,nodelete -shared -Wl,-soname,libLLVMConnexCodeGen.so.12git -o
../../libLLVMConnexCodeGen.so.12git
CMakeFiles/LLVMConnexCodeGen.dir/ConnexAsmPrinter.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexFrameLowering.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexHazardRecognizer.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexInstrInfo.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexISelDAGToDAG.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexISelLowering.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexMCInstLower.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexRegisterInfo.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexSelectionDAGInfo.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexSubtarget.cpp.o
CMakeFiles/LLVMConnexCodeGen.dir/ConnexTargetMachine.cpp.o -Wl,-rpath,"\$ORIGIN/../lib"
../../libLLVMAsmPrinter.so.12git ../../libLLVMConnexDesc.so.12git
../../libLLVMConnexInfo.so.12git ../../libLLVMSelectionDAG.so.12git
../../libLLVMCodeGen.so.12git ../../libLLVMTarget.so.12git ../../libLLVMMC.so.12git
../../libLLVMCore.so.12git ../../libLLVMSupport.so.12git
-Wl,-rpath-link,/home/asusu/LLVM/llvm2021_01_23/llvm-project/build/lib
/usr/bin/ld: CMakeFiles/LLVMConnexCodeGen.dir/ConnexTargetMachine.cpp.o: in
function `llvm::TargetTransformInfo::Model<llvm::ConnexTTIImpl>::~Model()':
/home/asusu/LLVM/llvm2021_01_23/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfo.h:1672:
undefined reference to `llvm::TargetTransformInfo::Concept::~Concept()'
/usr/bin/ld: CMakeFiles/LLVMConnexCodeGen.dir/ConnexTargetMachine.cpp.o: in
function
`llvm::TargetTransformInfoImplCRTPBase<llvm::ConnexTTIImpl>::getUserCost(llvm::User
const*, llvm::ArrayRef<llvm::Value const*>, llvm::TargetTransformInfo::TargetCostKind)':
/home/asusu/LLVM/llvm2021_01_23/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:911:
undefined reference to `llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(unsigned
int, llvm::CallBase const&)'
/usr/bin/ld:
/home/asusu/LLVM/llvm2021_01_23/llvm-project/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:953:
undefined reference to `llvm::TargetTransformInfo::getOperandInfo(llvm::Value const*,
llvm::TargetTransformInfo::OperandValueProperties&)'
...
...
/usr/bin/ld:
/home/asusu/LLVM/llvm2021_01_23/llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:1805: undefined
reference to `llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(unsigned int,
llvm::Type*, llvm::ArrayRef<llvm::Type*>)'
/usr/bin/ld:
/home/asusu/LLVM/llvm2021_01_23/llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:1826: undefined
reference to `llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(unsigned int,
llvm::Type*, llvm::ArrayRef<llvm::Type*>, llvm::FastMathFlags)'
collect2: error: ld returned 1 exit status>>
Please find if you have the time also most of the source files of my Connex LLVM back
end in the ZIP archive at this address:
https://sites.google.com/site/alexsusu/myfilecabinet/Connex_be.zip (please note the file
ERROR_LINKER.txt contains the above mentioned linker error).
Please let me know if you want me to provide any further information about my build.
Thank you very much,
Alex
More information about the llvm-dev
mailing list