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@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.


Can someone please help me with it? I can’t figure out the issue here.

Thanks and regards,

Hi Sandeep,


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...