[cfe-dev] Undefined LLVM reference when loading Clang Static Analyzer plugin

Gabor Kozar kozargabor at gmail.com
Wed Oct 2 08:59:07 PDT 2013


Hi,



We have a Clang Static Analyzer plugin that registers a bunch of custom
checkers. We're using LLVM and Clang 3.3.

Clang 3.3 is able to compile, and the Static Analyzer also runs without
our plugin being loaded.



On one of our test machines (a Suse Linux 11), trying to load our
plugin fails:

  > clang++ -cc1 -load lib-checkers.so
  error: unable to load plugin 'lib-checkers.so': 'lib-checkers.so:
  undefined symbol: _ZTIN4llvm18RefCountedBaseVPTRE'

Our plugin does not use llvm::RefCountedBaseVPTR, although it does make
direct use of some LLVM types, such as llvm::Optional, llvm::DenseMap
and so on.



When building our plugin, we do not link against any LLVM or Clang
libraries, except for clangASTMatchers. We also tried linking against
them, but it doesn't seem to make any difference.

Both Clang and the plugin are built with the same compiler and on the
same system.



As far as we can determine, this issue only appears when trying to load
our plugin, and Clang is able to function perfectly when we don't try
to load it.



Any idea on what could be the issue? We're totally clueless here.

Thanks!



--
Gábor Kozár -- ShdNx
kozargabor at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131002/d70b97bf/attachment.html>


More information about the cfe-dev mailing list