Ansar K.A. via llvm-dev
2016-Mar-16 13:34 UTC
[llvm-dev] Undefined symbol error while running the pass
Hi, When I run my pass I am getting the following error: *command used to run:* *opt -load /home/batman/llvm/build/lib/libMyHello.so -MyHello <prgrm1.bc > /dev/null* *Error*: *Error opening '/home/batman/llvm/build/lib/libMyHello.so': /home/batman/llvm/build/lib/libMyHello.so: undefined symbol: _ZTIN4llvm12FunctionPassE* * -load request ignored.* *opt: Unknown command line argument '-MyHello'. Try: 'opt -help'* *opt: Did you mean '-regalloc'?* What is the reason of this error ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160316/c7473a3e/attachment.html>
Tim Northover via llvm-dev
2016-Mar-16 15:06 UTC
[llvm-dev] Undefined symbol error while running the pass
> What is the reason of this error ?Looks like you forgot to include "-fno-rtti" when compiling your libMyHello.so: $ c++filt _ZTIN4llvm12FunctionPassE typeinfo for llvm::FunctionPass (Alternatively, if you really use RTTI you could recompile LLVM with it enabled; it's disabled by default for performance reasons) Cheers. Tim.