Stéphane Letz via llvm-dev
2017-Aug-23 10:17 UTC
[llvm-dev] Linker error with libllvm 4.0 on Debian Stretch ARM
Hi, We have the following kind of error compiling our code which link to LLVM (using precompiled LLVM libraries for this Debian Stretch ARM) ================ Errors: generator/llvm/llvm_code_container.o:(.data.rel.ro._ZTIN4llvm8FCmpInstE[_ZTIN4llvm8FCmpInstE]+0x8): undefined reference to `typeinfo for llvm::CmpInst' generator/llvm/llvm_code_container.o:(.data.rel.ro._ZTIN4llvm10SelectInstE[_ZTIN4llvm10SelectInstE]+0x8): undefined reference to `typeinfo for llvm::Instruction' generator/llvm/llvm_dsp_aux.o:(.data.rel.ro._ZTI16FaustObjectCache[_ZTI16FaustObjectCache]+0x8): undefined reference to `typeinfo for llvm::ObjectCache' clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation) Caused by the following "line »: ================ I read the thread here, http://lists.llvm.org/pipermail/llvm-dev/2016-February/095654.html, but still not see what has to be done - any compilation flags we have to set in our link step? - any additional code we have to add to fix the missing symbols? Thanks Stéphane Letz
Tim Northover via llvm-dev
2017-Aug-23 13:46 UTC
[llvm-dev] Linker error with libllvm 4.0 on Debian Stretch ARM
On 23 August 2017 at 03:17, Stéphane Letz via llvm-dev <llvm-dev at lists.llvm.org> wrote:> - any compilation flags we have to set in our link step?You need to add -fno-rtti to all your compilation steps if you don't rely on RTTI for LLVM symbols. If you do, you need to rebuild LLVM itself with the "-DLLVM_ENABLE_RTTI=ON" CMake flag because the information isn't present in the default releases. Cheers. Tim.