Sandeep K Chaudhary
2014-Dec-08 06:04 UTC
[LLVMdev] [LLVMDev] Undefined symbol with the basic hello world pass
Hi guys, I had a pass written which was working fine earlier. I just tried to reuse the pass, and now I see the following problem. sandeep at ubuntu:~/llvm-3.2.src/lib/Transforms/Hello$ opt -load ../../../Release+Asserts/lib/Hello.so -help | grep hello Error opening '../../../Release+Asserts/lib/Hello.so': ../../../Release+Asserts/lib/Hello.so: undefined symbol: _ZN4llvm12FunctionPass16doInitializationERNS_6ModuleE -load request ignored. To see if there is any problem with my pass, I replaced it with the simple hello world pass from the below LLVM tutorial but I still got the same issue. http://llvm.org/releases/3.0/docs/WritingAnLLVMPass.html#quickstart Can someone please help me with it? I can't figure out the issue here. Thanks and regards, Sandeep. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141208/15bc5148/attachment.html>
Tim Northover
2014-Dec-08 18:12 UTC
[LLVMdev] [LLVMDev] Undefined symbol with the basic hello world pass
Hi Sandeep, On 7 December 2014 at 22:04, Sandeep K Chaudhary <babbusandy2006 at gmail.com> wrote:> sandeep at ubuntu:~/llvm-3.2.src/lib/Transforms/Hello$ opt -load > [...] > http://llvm.org/releases/3.0/docs/WritingAnLLVMPass.html#quickstart > > Can someone please help me with it? I can't figure out the issue here.These are two different (and old) versions of LLVM, and it's not clear that the "opt" you're using corresponds to either of them. The HelloWorld pass you build must be loaded into the exact same version of opt. Cheers. Tim.
Andrés Goens
2015-Jun-03 14:23 UTC
[LLVMdev] [LLVMDev] Undefined symbol with the basic hello world pass
Hi, I know this is old. I was having the same issue and found no answer online, so I thought I'd write for completeness sake. The problem I had was that I was using the wrong version of opt, not the one for which I built the pass. That's why there's some symbols that mismatch. Hope that helps someone in the future. P.S: damn this formular is picky... you should format emails automatically if you don't like long lines... I had to remove the rest of the thread for this by the way... Cheers, Andrés