After building the pass out of source with cmake, when I load it with opt, I get an undefined symbol error: _ZTIN4llvm12FunctionPassE undefined in the .so.
(_ZTVN4llvm12FunctionPassE is also undefined – a “U” when I run nm. This symbol -is- in all of the llvm libraries.)
Platform: ubuntu 12.10 LTS, x86 64
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Build: LLVM 3.2 (svn), tried debug and release
Test suite builds and runs without error
No other versions of llvm or clang are present
I also tried building debug and release versions of the pass. No build errors or warnings when producing the pass .so.
I don’t see this symbol in any of the llvm libraries, so I have no idea how it is being introduced into the pass .so.
Interestingly, when I build llvm in source with autotools, and build the pass in source with the provided makefile template, it works, and _ZTIN4llvm12FunctionPassE is not in the pass .so. (Also, _ZTVN4llvm12FunctionPassE is now “B” when I run nm.).